From 7213c79d39fc552f206e8dd0232889b0777d61f9 Mon Sep 17 00:00:00 2001 From: cajus Date: Thu, 18 Mar 2010 18:34:22 +0000 Subject: [PATCH] Updated login and a couple of styles git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@16944 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/html/index.php | 17 +-- gosa-core/html/main.php | 2 +- gosa-core/html/themes/modern/style.css | 107 ++++++++++++++++++ gosa-core/ihtml/themes/modern/islocked.tpl | 47 ++++---- .../ihtml/themes/modern/removeEntries.tpl | 28 ++--- gosa-core/include/class_management.inc | 2 +- gosa-core/include/functions.inc | 13 +-- gosa-core/include/utils/class_msgPool.inc | 6 +- 8 files changed, 161 insertions(+), 61 deletions(-) diff --git a/gosa-core/html/index.php b/gosa-core/html/index.php index d48712db6..96f29ae92 100644 --- a/gosa-core/html/index.php +++ b/gosa-core/html/index.php @@ -52,6 +52,7 @@ function displayLogin() if(isset($_POST["username"])){ $username= $_POST["username"]; } + $smarty->assign ("logo", image(get_template_path("images/logo.png"))); $smarty->assign ('date', gmdate("D, d M Y H:i:s")); $smarty->assign ('username', $username); $smarty->assign ('personal_img', get_template_path('images/login-head.png')); @@ -66,14 +67,13 @@ function displayLogin() /* Displasy SSL mode warning? */ if ($ssl != "" && $config->get_cfg_value('warnssl') == 'true'){ - $smarty->assign ("ssl", _("Warning").": "._("Session is not encrypted!").""); + $smarty->assign ("ssl", sprintf(_("This session is not ecrypted. Click %s to enter an encrypted session."), ""._("here")."")); } else { $smarty->assign ("ssl", ""); - } + } if(!$config->check_session_lifetime()){ - $smarty->assign ("lifetime", _("Warning").": ". - _("The session lifetime configured in your gosa.conf will be overridden by php.ini settings.")); + $smarty->assign ("lifetime", _("The session lifetime configured in your gosa.conf will be overridden by php.ini settings.")); }else{ $smarty->assign ("lifetime", ""); } @@ -421,15 +421,8 @@ if (!isset($message)){ $smarty->assign ("message", $message); -/* Displasy SSL mode warning? */ -if ($ssl != "" && $config->get_cfg_value('WARNSSL') == 'true'){ - $smarty->assign ("ssl", ""._("Warning").":<\/b> "._("Session will not be encrypted.")." "._("Enter SSL session")."<\/b>!"); -} else { - $smarty->assign ("ssl", ""); -} - /* Translation of cookie-warning. Whether to display it, is determined by JavaScript */ -$smarty->assign ("cookies", ""._("Warning").":<\/b> "._("Your browser has cookies disabled. Please enable cookies and reload this page before logging in!")); +$smarty->assign ("cookies", _("Your browser has cookies disabled. Please enable cookies and reload this page before logging in!")); /* Generate server list */ $servers= array(); diff --git a/gosa-core/html/main.php b/gosa-core/html/main.php index 7bef85983..a00d2b924 100644 --- a/gosa-core/html/main.php +++ b/gosa-core/html/main.php @@ -267,7 +267,7 @@ if (isset($_GET['reset'])){ } /* show web frontend */ -$smarty->assign ("logo", "
".image("themes/modern/images/logo.png")."
"); +$smarty->assign ("logo", image("themes/modern/images/logo.png")); $smarty->assign ("date", date("l, dS F Y H:i:s O")); $smarty->assign ("lang", preg_replace('/_.*$/', '', $lang)); $smarty->assign ("must", "*"); diff --git a/gosa-core/html/themes/modern/style.css b/gosa-core/html/themes/modern/style.css index 5512ce4bd..06b1ba101 100644 --- a/gosa-core/html/themes/modern/style.css +++ b/gosa-core/html/themes/modern/style.css @@ -1353,6 +1353,17 @@ background-image:none; text-align:right; } +.object-list li span { + color:#666; + font-style:italic; +} + +.inline-warning { + font-size:18px; + text-align:bottom; +} + + /* Progress */ div.progress { @@ -1382,3 +1393,99 @@ div.progress { background-color:#FF0000; } + +/* Login */ + +.login-box-header { + padding:8px 13px; + font-size:20px; + background-color:#EEE; + background: -webkit-gradient(linear, 0 0, 0 100%, from(#F8F8F8), to(#EEE)); + background: -moz-linear-gradient(top, #F8F8F8, #EEE); + border-top-left-radius:5px; + border-top-right-radius:5px; + -moz-border-radius-topleft:5px; + -moz-border-radius-topright:5px; + -webkit-border-top-left-radius:5px; + -webkit-border-top-right-radius:5px; + border-bottom:1px solid #CCC; +} + +.login-box-container { + padding:5% 10% 3% 10%; +} + +.login-box { + position:absolute; + top:25%; + left:30%; + right:30%; + background-color:#FFF; + border:1px solid #CCC; + border-radius:5px; + -moz-border-radius:5px; + -webkit-border-radius:5px; + background: -webkit-gradient(linear, 0 0, 0 100%, from(#FFF), to(#F8F8F8)); + background: -moz-linear-gradient(top, #FFF, #F8F8F8); +} + +.login-element-container { + padding:5px 8px; + position:relative; + height:30px; +} + +.login-warning { +} + +.login-warning a{ + font-weight: bold; +} + +.login-label { + position:absolute; + left:8px; + width:10em; +} + +.login-input { + position:absolute; + left:10em; + right:5px; +} + +.login-input input{ + width:92%; +} + +.login-inline-message { + padding:0 5px; + color:red; + text-align:center; +} + +.login-warning { + border:2px solid #F00; + background-color:#FCC; + padding:10px; + margin:0 10px 10px 10px; + text-align:center; +} + + +/* Logout */ + +.logout-box { + position:absolute; + top:25%; + left:20%; + right:20%; + padding:10px; + background-color:#F8F8F8; + border:1px solid #CCC; + border-radius:5px; + -moz-border-radius:5px; + -webkit-border-radius:5px; + background: -webkit-gradient(linear, 0 0, 0 100%, from(#FFF), to(#F0F0F0)); + background: -moz-linear-gradient(top, #FFF, #F0F0F0); +} diff --git a/gosa-core/ihtml/themes/modern/islocked.tpl b/gosa-core/ihtml/themes/modern/islocked.tpl index b791e5b7c..27cf883f0 100644 --- a/gosa-core/ihtml/themes/modern/islocked.tpl +++ b/gosa-core/ihtml/themes/modern/islocked.tpl @@ -1,24 +1,29 @@ -
- {image path="images/encrypted.png"} {t}Locking conflict detected{/t} +
+
+ {image path="images/encrypted.png" align="top"} {t}Locking conflict detected{/t} +
-
- -

- {t}Warning{/t}: {$message} -

-

- {t}If this lock detection is false, the other person has obviously closed the webbrowser during the edit operation. You may want to take over the lock by pressing the 'Edit anyway' button.{/t} -

+
+ +

+ {$message} +

-

- - {if $allow_readonly} -   - - {/if} -   - -

- - +

+ {t}If this lock detection is false, the other person has obviously closed the webbrowser during the edit operation. You may want to take over the lock by pressing the 'Edit anyway' button.{/t} +

+
+ +
+ + {if $allow_readonly} +   + + {/if} +   + +
+ + +
diff --git a/gosa-core/ihtml/themes/modern/removeEntries.tpl b/gosa-core/ihtml/themes/modern/removeEntries.tpl index 95e81f6a0..30a39ac73 100644 --- a/gosa-core/ihtml/themes/modern/removeEntries.tpl +++ b/gosa-core/ihtml/themes/modern/removeEntries.tpl @@ -1,20 +1,22 @@ -
- {image path="images/warning.png" align="top"} {t}Warning{/t} -
+
+
+ {image path="images/warning.png" align="top"} {t}Attention{/t} +
+ +
-
-{$info} +
+ {$info} +
-

- {t}Please double check if you really want to do this since there is no way for GOsa to get your data back.{/t} -

+

+ {t}If you're sure you want to do this press 'Delete' to continue or 'Cancel' to abort.{/t} +

-

- {t}So - if you're sure - press 'Delete' to continue or 'Cancel' to abort.{/t} -

+
-
-
+
+
diff --git a/gosa-core/include/class_management.inc b/gosa-core/include/class_management.inc index e2fce7894..7b0bdc988 100644 --- a/gosa-core/include/class_management.inc +++ b/gosa-core/include/class_management.inc @@ -319,7 +319,7 @@ class management foreach($this->dns as $dn){ $tmp = $h->getType($dn); if(isset($map[$tmp])){ - $dns_names[] = '('._($map[$tmp]).') - '.LDAP::fix($dn); + $dns_names[LDAP::fix($dn)] = _($map[$tmp]); }else{ $dns_names[] =LDAP::fix($dn); } diff --git a/gosa-core/include/functions.inc b/gosa-core/include/functions.inc index 48cb40e92..53558553f 100644 --- a/gosa-core/include/functions.inc +++ b/gosa-core/include/functions.inc @@ -1629,15 +1629,7 @@ function gen_locked_message($user, $dn, $allow_readonly = FALSE) /* Prepare and show template */ $smarty= get_smarty(); $smarty->assign("allow_readonly",$allow_readonly); - if(is_array($dn)){ - $msg = "
";
-    foreach($dn as $sub_dn){
-      $msg .= "\n".$sub_dn.", ";
-    }
-    $msg = preg_replace("/, $/","
",$msg); - }else{ - $msg = $dn; - } + $msg= msgPool::buildList($dn); $smarty->assign ("dn", $msg); if ($remove){ @@ -1645,7 +1637,8 @@ function gen_locked_message($user, $dn, $allow_readonly = FALSE) } else { $smarty->assign ("action", _("Edit anyway")); } - $smarty->assign ("message", sprintf(_("You're going to edit the LDAP entry/entries %s"), "".$msg."", "")); + + $smarty->assign ("message", _("These entries are currently locked:"). $msg); return ($smarty->fetch (get_template_path('islocked.tpl'))); } diff --git a/gosa-core/include/utils/class_msgPool.inc b/gosa-core/include/utils/class_msgPool.inc index d58debb98..38fea968f 100644 --- a/gosa-core/include/utils/class_msgPool.inc +++ b/gosa-core/include/utils/class_msgPool.inc @@ -363,12 +363,12 @@ class msgPool public static function buildList($data) { - $objects= "
    "; + $objects= "
      "; foreach ($data as $key => $value){ if (is_numeric($key)){ - $objects.= "
    • \n$value
    • "; + $objects.= "
    • \n$value
    • "; } else { - $objects.= "
    • \n$value ($key)
    • "; + $objects.= "
    • \n$value $key
    • "; } } $objects.= "
    "; -- 2.30.2