X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=plugins%2Fadmin%2Fsystems%2Fclass_divListSystem.inc;h=34dfaac5cd5c3a36f6f08feca84bf646618fceb7;hb=ecabf2056dc1350d73115d5fa226676be30017d6;hp=bf73c5504f8c0cf58adf570a0c2678e113f01373;hpb=47f45f247c547999858874eac073796ce4d6e30b;p=gosa.git diff --git a/plugins/admin/systems/class_divListSystem.inc b/plugins/admin/systems/class_divListSystem.inc index bf73c5504..34dfaac5c 100644 --- a/plugins/admin/systems/class_divListSystem.inc +++ b/plugins/admin/systems/class_divListSystem.inc @@ -52,7 +52,7 @@ class divListSystem extends MultiSelectWindow $this->EnableSaveButton (false); /* Dynamic action col, depending on snapshot icons */ - $action_col_size = 50; + $action_col_size = 70; if($this->parent->snapshotEnabled()){ $action_col_size += 38; } @@ -82,17 +82,57 @@ class divListSystem extends MultiSelectWindow function GenHeader() { - /* Prepare departments, + /* Prepare departments, which are shown in the listbox on top of the listbox */ $options= ""; - foreach ($this->config->idepartments as $key => $value){ - if ($this->selectedBase == $key){ - $options.= ""; - } else { - $options.= ""; + + /* Get all departments within this subtree */ + $base = $this->config->current['BASE']; + $deps= get_list("(&(|(ou=*)(description=*))(objectClass=gosaDepartment))", $this->module, $base, + array("ou", "description"), GL_SIZELIMIT | GL_SUBSEARCH); + + $tmp =array(); + foreach($deps as $dep){ + $tmp[$dep['dn']] = $dep; + } + $deps = $tmp; + + /* Load possible departments */ + $ui= get_userinfo(); + $department = array(); + foreach($this->module as $module){ + $d = $ui->get_module_departments($module); + foreach($d as $department){ + $departments[$department] = $department; } } + + $ids = $this->config->idepartments; + + foreach($deps as $dep){ + if(isset($ids[$dep['dn']]) && in_array_ics($dep['dn'], $departments)){ + + $value = $ids[$dep['dn']]; + if ($this->selectedBase == $dep['dn']){ + $options.= ""; + } else { + $options.= ""; + } + } + } + + /* If there is at least one c (Create) and one w (Write) acl in this combination + display the snapshot paste icon. BUT check the correct acls in the management plugin */ + $all_module_acls = ""; + foreach($this->module as $module){ + $all_module_acls .= $ui->has_complete_category_acls($this->selectedBase,$module); + } + + /* Must we add an additional seperator */ + $add_sep = false; + + /* Add the basic icons for navigation */ $listhead = "