From: hickert Date: Fri, 15 Dec 2006 08:04:51 +0000 (+0000) Subject: Added gray out to navigation icons in divlist X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=9695395f399e680d3fbb0c6b7a2df7d8b37d17c8;p=gosa.git Added gray out to navigation icons in divlist git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5408 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/include/class_MultiSelectWindow.inc b/include/class_MultiSelectWindow.inc index 6f939f96c..2dac54752 100644 --- a/include/class_MultiSelectWindow.inc +++ b/include/class_MultiSelectWindow.inc @@ -166,13 +166,14 @@ class MultiSelectWindow{ /* Check if selectedBase = first available base */ $deps = $ui->get_module_departments($this->module); - if($deps[0] == $this->selectedBase){ + + if(!count($deps) || $deps[0] == $this->selectedBase){ $enable_back = FALSE; $enable_root = FALSE; } /* Check if we are in users home department */ - if($this->selectedBase == get_base_from_people($ui->dn)){ + if(!count($deps) ||$this->selectedBase == get_base_from_people($ui->dn)){ $enable_home = FALSE; } diff --git a/plugins/admin/acl/class_divListACL.inc b/plugins/admin/acl/class_divListACL.inc index ed888806b..e75b84ce2 100644 --- a/plugins/admin/acl/class_divListACL.inc +++ b/plugins/admin/acl/class_divListACL.inc @@ -91,17 +91,9 @@ class divListACL extends MultiSelectWindow /* Get copy & paste icon */ $acl = $ui->get_permissions($this->selectedBase,"acl/aclManagement"); - /* Create header with selected base */ - $listhead = "
". - "  ". - "  ". - "  ". - "  ". - "  "; + + /* Add default header */ + $listhead = MultiSelectWindow::get_default_header(); $listhead .= _("Base")." ". "  ". - "  ". - "  ". - "  ". - "  "; + /* Add default header */ + $listhead = MultiSelectWindow::get_default_header(); /* Add snapshot header icons */ if(preg_match("/(c.*w|w.*c)/",$acl_all)){ diff --git a/plugins/admin/departments/class_divListDepartment.inc b/plugins/admin/departments/class_divListDepartment.inc index 712ba8790..32b79bf88 100755 --- a/plugins/admin/departments/class_divListDepartment.inc +++ b/plugins/admin/departments/class_divListDepartment.inc @@ -84,17 +84,10 @@ class divListDepartment extends MultiSelectWindow /* Generate list head */ $ui = get_userinfo(); $acl = $ui->get_permissions("ou=dummy,".$this->selectedBase ,"department/department"); - - $listhead = "
". - "  ". - "  ". - "  ". - "  "; + /* Add default header */ + $listhead = MultiSelectWindow::get_default_header(); + if(preg_match("/c/",$acl)){ $listhead .= "  ". " has_complete_category_acls($this->selectedBase,$this->module); - /* Create listhead, it will be shown on top of the divlist. - * It provides general navigation and object creation - */ - $listhead = - "
 ". - " ". - " ". - " ". - "  ". - "\"\" "; + /* Add default header */ + $listhead = MultiSelectWindow::get_default_header(); $acl = $ui->get_permissions($this->selectedBase,"fai/faiProfile"); if(preg_match("/c/",$acl)){ diff --git a/plugins/admin/groups/class_divListGroup.inc b/plugins/admin/groups/class_divListGroup.inc index 2a270b34e..ab9fd612c 100644 --- a/plugins/admin/groups/class_divListGroup.inc +++ b/plugins/admin/groups/class_divListGroup.inc @@ -119,15 +119,9 @@ class divListGroup extends MultiSelectWindow $addsep = true; } - // Managment - $listhead = " -
". - "  ". - "  ". - "  ". - "  ". - "  "; - + /* Add default header */ + $listhead = MultiSelectWindow::get_default_header(); + /* Add snapshot restore icon and force a following seperator */ if(preg_match("/(c.*w|w.*c)/",$acl_all)){ $listhead .= $this->get_snapshot_header($this->selectedBase); diff --git a/plugins/admin/mimetypes/class_divListMimeTypes.inc b/plugins/admin/mimetypes/class_divListMimeTypes.inc index b1fd3768e..66bfd3156 100755 --- a/plugins/admin/mimetypes/class_divListMimeTypes.inc +++ b/plugins/admin/mimetypes/class_divListMimeTypes.inc @@ -125,21 +125,9 @@ class divListMimeTypes extends MultiSelectWindow $add_sep = true; } - /* Create listhead, it will be shown on top of the divlist. - * It provides general navigation and object creation - */ + /* Add default header */ + $listhead = MultiSelectWindow::get_default_header(); - $listhead = "
". - "  ". - "  ". - "  ". - "  ". - "  "; - /* Create snapshot icons */ if(preg_match("/(c.*w|w.*c)/",$acl_all)){ $listhead .= $this->get_snapshot_header($this->selectedBase); diff --git a/plugins/admin/ogroups/class_divListOGroup.inc b/plugins/admin/ogroups/class_divListOGroup.inc index c661eb577..204ecbfce 100755 --- a/plugins/admin/ogroups/class_divListOGroup.inc +++ b/plugins/admin/ogroups/class_divListOGroup.inc @@ -121,17 +121,8 @@ class divListOGroup extends MultiSelectWindow $add_sep = true; } - // Managment - $listhead = "
". - "  ". - "  ". - "  ". - "  ". - "  "; + /* Add default header */ + $listhead = MultiSelectWindow::get_default_header(); /* Add snapshot restore icons */ if(preg_match("/(c.*w|w.*c)/",$acl_all)){ diff --git a/plugins/admin/systems/class_divListSystem.inc b/plugins/admin/systems/class_divListSystem.inc index 88380ad5f..488e882f6 100644 --- a/plugins/admin/systems/class_divListSystem.inc +++ b/plugins/admin/systems/class_divListSystem.inc @@ -132,16 +132,8 @@ class divListSystem extends MultiSelectWindow /* Must we add an additional seperator */ $add_sep = false; - /* Add the basic icons for navigation */ - $listhead = "
". - "  ". - "  ". - "  ". - "  ". - "  "; + /* Add default header */ + $listhead = MultiSelectWindow::get_default_header(); /* Add snapshot icons */ if(preg_match("/(c.*w|w.*c)/",$all_module_acls)){ diff --git a/plugins/admin/users/class_divListUsers.inc b/plugins/admin/users/class_divListUsers.inc index 499eb1762..f3f2bbe1d 100644 --- a/plugins/admin/users/class_divListUsers.inc +++ b/plugins/admin/users/class_divListUsers.inc @@ -109,18 +109,8 @@ class divListUsers extends MultiSelectWindow $Copy_Paste =""; } - /* Create header with selected base */ - $listhead = "
". - "  ". - "  ". - "  ". - "  ". - " - "; - + /* Add default header */ + $listhead = MultiSelectWindow::get_default_header(); if(preg_match("/(c.*w|w.*c)/",$acl_all)){ $listhead .= $this->get_snapshot_header($this->selectedBase); diff --git a/plugins/gofax/blocklists/class_divListBlocklists.inc b/plugins/gofax/blocklists/class_divListBlocklists.inc index 565780e9e..19fe00bda 100755 --- a/plugins/gofax/blocklists/class_divListBlocklists.inc +++ b/plugins/gofax/blocklists/class_divListBlocklists.inc @@ -96,17 +96,8 @@ class divListBlocklist extends MultiSelectWindow $acl = $ui->get_permissions($this->selectedBase,"gofaxlist/blocklist"); $acl_all = $ui->has_complete_category_acls($this->selectedBase,"gofaxlist"); - /* NEW LIST MANAGMENT */ - $listhead = "
". - "  ". - "  ". - "  ". - "  ". - "  "; + /* Add default header */ + $listhead = MultiSelectWindow::get_default_header(); /* Add snaphot icons, if allowed */ if(preg_match("/(c.*w|w.*c)/",$acl_all)){ diff --git a/plugins/gofon/conference/class_divListConferences.inc b/plugins/gofon/conference/class_divListConferences.inc index 62fb38bbc..c2cedad4e 100755 --- a/plugins/gofon/conference/class_divListConferences.inc +++ b/plugins/gofon/conference/class_divListConferences.inc @@ -94,16 +94,8 @@ class divListConference extends MultiSelectWindow $acls = $ui->get_permissions($this->selectedBase,"gofonconference/conference"); $acl_all = $ui->has_complete_category_acls($this->selectedBase,"gofonconference") ; - /* NEW LIST MANAGMENT */ - $listhead = "
". - "  ". - "  ". - "  ". - "  "; + /* Add default header */ + $listhead = MultiSelectWindow::get_default_header(); /* Only display create new conference if we are allowed to create new confe... */ if(preg_match("/c/",$acls)){ diff --git a/plugins/gofon/macro/class_divListMacros.inc b/plugins/gofon/macro/class_divListMacros.inc index 8396b603e..c62a3e1fc 100755 --- a/plugins/gofon/macro/class_divListMacros.inc +++ b/plugins/gofon/macro/class_divListMacros.inc @@ -92,17 +92,9 @@ class divListMacro extends MultiSelectWindow $acls = $ui->get_permissions($this->selectedBase,"gofonmacro/macro"); - /* NEW LIST MANAGMENT */ - $listhead = "
". - "  ". - "  ". - "  ". - "  ". - "  "; + /* Add default header */ + $listhead = MultiSelectWindow::get_default_header(); + if(preg_match("/w/",$acls) && preg_match("/c/",$acls)){ $listhead .= $this->get_snapshot_header($this->selectedBase); }