X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=gosa-core%2Finclude%2Fclass_tabs.inc;h=6d1b5e871781daf574a885a21751473dd6e8ffe6;hb=22309e0d434aaa14851dbb616938d5f68635bbc0;hp=6be1d9d2f21bd884e986e81542666f4f04041905;hpb=85ee8dac7aa1d17d5d23eea39bf5d8818b1072e1;p=gosa.git
diff --git a/gosa-core/include/class_tabs.inc b/gosa-core/include/class_tabs.inc
index 6be1d9d2f..6d1b5e871 100644
--- a/gosa-core/include/class_tabs.inc
+++ b/gosa-core/include/class_tabs.inc
@@ -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!"), bold(get_class($this))),
"ERROR_DIALOG");
}
@@ -63,7 +63,7 @@ class tabs
foreach ($data as &$tab){
if (!plugin_available($tab['CLASS'])){
- trigger_error(sprintf("Unknown class '%s'!", $tab['CLASS']));
+ trigger_error(sprintf("Unknown class %s!", bold($tab['CLASS'])));
continue;
}
if ($this->current == "") $this->current= $tab['CLASS'];
@@ -114,6 +114,8 @@ class tabs
$this->current = key($this->by_name);
}
+ pathNavigator::registerPlugin($this);
+
// Rotate current to last
$this->last= $this->current;
@@ -140,21 +142,26 @@ class tabs
$display= $this->by_object[$this->current]->multiple_execute();
}
$tabs= $this->gen_tabs();
- $display =
- "\n {$tabs}".
- "\n ".
- "\n
".
- "\n {$display}".
- "\n
";
+ if($this->is_modal_dialog()){
+ $display =
+ "\n ".
+ "\n {$display}".
+ "\n
";
+ }else{
+
+ $display =
+ "\n {$tabs}".
+ "\n ".
+ "\n ".
+ "\n {$display}".
+ "\n
";
+ }
return ($display);
}
function save_object($save_current= FALSE)
{
-
-
-
/* Save last tab */
if ($this->last != ""){
@DEBUG (DEBUG_TRACE, __LINE__, __FUNCTION__, __FILE__,
@@ -187,14 +194,19 @@ 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 ";
$display.= "\n
";
-
foreach ($this->by_name as $class => $name){
// Shorten string if its too long for the tab headers
@@ -208,13 +220,13 @@ class tabs
// Take care about notifications
$obj = $this->by_object[$class];
- $notify ="";
+ $tabClass = ($this->current == $class) ? "current" :"";
if ( $this->by_object[$class]->pl_notify && ($obj->is_account || $obj->ignore_account)){
- $notify= "!";
+ $tabClass .= " info";
}
- $tabClass = ($this->current == $class) ? "class='current'" :"";
+ if(!empty($tabClass)) $tabClass="class='{$tabClass}'";
$onClick = "document.mainform.arg.value='{$class}'; document.mainform.submit();";
- $display.= "\n - $title{$notify}
";
+ $display.= "\n - {$title}
";
}
$display.="\n
";
$display.="\n
";
@@ -234,7 +246,7 @@ class tabs
foreach (array_reverse($this->by_object) as $key => $obj){
$reason= $obj->allow_remove();
if ($reason != ""){
- msg_dialog::display(_("Warning"), sprintf(_("Delete process has been canceled by plugin '%s': %s"), $key, $reason), WARNING_DIALOG);
+ msg_dialog::display(_("Warning"), sprintf(_("Delete process has been canceled by plugin %s: %s"), bold($key), $reason), WARNING_DIALOG);
return;
}
}
@@ -355,7 +367,7 @@ class tabs
}else{
if(!empty($tmp['string'])){
$ret .= $tmp['string'];
- $ret .= "
";
+ $ret .= "
";
}
}
}
@@ -375,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);
}
}
@@ -429,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:
?>