Code

Updated strings
[gosa.git] / gosa-core / include / class_tabs.inc
index a6a80070dc6f7be50cbdb8b42cdfc2b6694a31c5..ac772eeeff46e04221f6cf5f8fc582bcd8839521 100644 (file)
@@ -54,7 +54,7 @@ class tabs
     if(!count($data)) {
       $data[] = array("CLASS" => 'plugin',"NAME" => 'Error');
       msg_dialog::display(_("Error"),
-        sprintf(_("No plugin definitions found to initialize '%s', please check your configuration file."),get_class($this)),
+        sprintf(_("No plugin definition for '%s' found: please check the configuration file!"),get_class($this)),
         "ERROR_DIALOG");
     }
 
@@ -114,6 +114,8 @@ class tabs
       $this->current = key($this->by_name);
     }
 
+    pathNavigator::registerPlugin($this);
+
     // Rotate current to last 
     $this->last= $this->current;
 
@@ -140,13 +142,21 @@ class tabs
       $display= $this->by_object[$this->current]->multiple_execute();
     }
     $tabs= $this->gen_tabs();
-    $display =   
-      "\n        {$tabs}".
-      "\n        <input type='hidden' name='arg' value=''>".
-      "\n        <div class='tab-content'>".
-      "\n          {$display}".
-      "\n        </div>";
 
+    if($this->is_modal_dialog()){
+        $display =   
+            "\n        <div class='plugin'>".
+            "\n          {$display}".
+            "\n        </div>";
+    }else{
+
+        $display =   
+            "\n        {$tabs}".
+            "\n        <input type='hidden' name='arg' value=''>".
+            "\n        <div class='tab-content'>".
+            "\n          {$display}".
+            "\n        </div>";
+    }
     return ($display);
   }
 
@@ -184,9 +194,15 @@ class tabs
     }
   }
 
+
+  function is_modal_dialog()
+  {
+    return($this->by_object[$this->current]->is_modal_dialog());
+  }
+
   function gen_tabs()
   {
-    if($this->by_object[$this->current]->is_modal_dialog()) return("");
+    if($this->is_modal_dialog()) return("");
 
     $display = "\n  <div class='tabs'>";
     $display.= "\n    <ul>";
@@ -351,7 +367,7 @@ class tabs
         }else{
           if(!empty($tmp['string'])){
             $ret .= $tmp['string'];
-            $ret .= "<p class='seperator'>&nbsp;</p>";
+            $ret .= "<hr>";
           }
         }
       }
@@ -371,6 +387,7 @@ class tabs
       $this->by_name['reference']= _("References");
       $this->by_object['reference']= new reference($this->config, $this->dn);
       $this->by_object['reference']->parent= &$this;
+      $this->by_object['reference']->set_acl_category($this->acl_category);
     }
   }
 
@@ -425,6 +442,14 @@ class tabs
     }
     return(TRUE);
   }
+
+  function setReadOnly($s = TRUE)
+  {
+    foreach($this->by_object as $name => $obj){
+      $this->by_object[$name]->read_only = $s;
+    }
+    $this->read_only = $s;
+  }
 }
 // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
 ?>