Code

Added style to hide the menu part, if there are none to display
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 26 Nov 2010 15:34:41 +0000 (15:34 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 26 Nov 2010 15:34:41 +0000 (15:34 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@20391 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/html/main.php
gosa-core/html/themes/default/style.css
gosa-core/ihtml/themes/default/framework.tpl
gosa-core/include/class_pluglist.inc

index ded3e1156202559325ea189c5fafaf95af1dbbce..1af718b5bf00ba4fa98076f0399faa0408d6d992 100644 (file)
@@ -236,6 +236,7 @@ if ($config->boolValueIsTrue("core","handleExpiredAccounts")){
     }
 }
 
+$smarty->assign("noMenuMode", FALSE);
 if (isset($_GET['plug']) && $plist->plugin_access_allowed($_GET['plug'])){
   $plug= validate($_GET['plug']);
   $plugin_dir= $plist->get_path($plug);
@@ -252,6 +253,7 @@ if (isset($_GET['plug']) && $plist->plugin_access_allowed($_GET['plug'])){
     if(count($plist->getRegisteredMenuEntries()) == 0){
         session::global_set('plugin_dir',"infoPage");
         $plugin_dir= "$BASE_DIR/plugins/generic/infoPage";
+        $smarty->assign("noMenuMode", TRUE);
     }else{
         session::global_set('plugin_dir',"welcome");
         $plugin_dir= "$BASE_DIR/plugins/generic/welcome";
index c337af699ee8e79d26f58c2873b3626277220904..cc9118d46250684e284ecd269c7ac50556615714 100644 (file)
@@ -286,6 +286,15 @@ div.plugin-area {
   cursor:default;
 }
 
+div.plugin-area-noMenu {
+  position:relative;
+  margin-left:6px;
+  padding-right:6px;
+  min-height:600px;
+  min-width:700px;
+  cursor:default;
+}
+
 
 /* Plugin decorations */
 
index 288f0f2df109a2fc89f2e2064dcc219198d48df1..7c58dcb0d4b264ccaa8bd7c9423d3dba82d49288 100644 (file)
@@ -35,7 +35,7 @@
 
     {$menu}
     {$msg_dialogs}
-    <div class='plugin-area'>
+    <div class='plugin-area{if $noMenuMode}-noMenu{/if}'>
       {$pathMenu}
       {$contents}
     </div>
index d4475497a03b659f60da8050f74d7793d6bdf554..857e98a31e1a026b97b49934fa0369050c40ba1b 100644 (file)
@@ -252,7 +252,7 @@ class pluglist
             $disabledPlugins = $this->config->configRegistry->getDisabledPlugins();
 
             $cfg= $this->config->data['MENU'];
-            $menu = "\n      <div class='navigation'>";
+            $menu = "";
             foreach ($cfg as $headline => $plug){
 
 
@@ -283,8 +283,9 @@ class pluglist
                 $menu.= "\n        <div style='font-size:0'>&nbsp;</div>";
                 $menu.= "\n        <div class='v-spacer'></div>\n";
             }
-            $menu.= "\n      </div>\n";
-            $this->menu = $menu;
+            if(count($this->registeredMenuEntries)){
+                $this->menu = "\n<div class='navigation'>\n{$menu}</div>";
+            }
 
             // Add javascript method to print out warning messages while leaving an unsaved form.
             // We do it in here to get the string translated.