Code

Updated department Management
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 25 Jun 2008 08:04:34 +0000 (08:04 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 25 Jun 2008 08:04:34 +0000 (08:04 +0000)
-Updated listing of entries. images source, alt tags etc.
-Disabled alias and referal

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11433 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/plugins/admin/departments/class_departmentManagement.inc
gosa-core/plugins/admin/departments/class_divListDepartment.inc

index 0ef47749bc0fab56c5fef825a38bd0b86609e61b..5061b98384c8696b326b8febfdebe7d728f3a926 100644 (file)
@@ -53,7 +53,7 @@ class departmentManagement extends plugin
   function execute()
   {
     global $config;
-  
     /* Call parent execute */
     plugin::execute();
 
@@ -632,34 +632,35 @@ class departmentManagement extends plugin
     $types['organizationalUnit']['TAB']     = "DEPTABS";
     $types['organizationalUnit']['ATTR']    = "ou";
     $types['organizationalUnit']['OC']      = "organizationalUnit";
-    $types['organizationalUnit']['IMG']     = "plugins/departments/images/department.png";
-    $types['organizationalUnit']['IMG_FULL']= "plugins/departments/images/department.png";
+    $types['organizationalUnit']['IMG']     = "images/lists/folder.png";//plugins/departments/images/department.png";
+    $types['organizationalUnit']['IMG_FULL']= "images/lists/folder-full.png";//:wplugins/departments/images/department.png";
     $types['organizationalUnit']['TITLE']   = _("Department");
     $types['organizationalUnit']['TPL']     = "generic.tpl";
 
-    /* Alias
-     */
-    $types['alias']['ACL']     = "alias";
-    $types['alias']['CLASS']   = "alias";
-    $types['alias']['TAB']     = "ALIASTABS";
-    $types['alias']['ATTR']    = "???";
-    $types['alias']['OC']      = "???";
-    $types['alias']['IMG']     = "plugins/departments/images/alias.png";
-    $types['alias']['IMG_FULL']= "plugins/departments/images/alias.png";
-    $types['alias']['TITLE']   = _("Alias");
-    $types['alias']['TPL']     = "alias.tpl";
-
-    /* Referal
-     */
-    $types['referal']['ACL']     = "referal";
-    $types['referal']['CLASS']   = "referal";
-    $types['referal']['TAB']     = "REFERALTABS";
-    $types['referal']['ATTR']    = "???";
-    $types['referal']['OC']      = "???";
-    $types['referal']['IMG']     = "plugins/departments/images/referal.png";
-    $types['referal']['IMG_FULL']= "plugins/departments/images/referal.png";
-    $types['referal']['TITLE']   = _("Referal");
-    $types['referal']['TPL']     = "referal.tpl";
+
+#  /* Alias
+#   */
+#  $types['alias']['ACL']     = "alias";
+#  $types['alias']['CLASS']   = "alias";
+#  $types['alias']['TAB']     = "ALIASTABS";
+#  $types['alias']['ATTR']    = "???";
+#  $types['alias']['OC']      = "???";
+#  $types['alias']['IMG']     = "plugins/departments/images/department_alias.png";
+#  $types['alias']['IMG_FULL']= "plugins/departments/images/department_alias.png";
+#  $types['alias']['TITLE']   = _("Alias");
+#  $types['alias']['TPL']     = "alias.tpl";
+#
+#  /* Referal
+#   */
+#  $types['referal']['ACL']     = "referal";
+#  $types['referal']['CLASS']   = "referal";
+#  $types['referal']['TAB']     = "REFERALTABS";
+#  $types['referal']['ATTR']    = "???";
+#  $types['referal']['OC']      = "???";
+#  $types['referal']['IMG']     = "plugins/departments/images/department_referal.png";
+#  $types['referal']['IMG_FULL']= "plugins/departments/images/department_referal.png";
+#  $types['referal']['TITLE']   = _("Referal");
+#  $types['referal']['TPL']     = "referal.tpl";
 
     return($types);
   }
index 8a8a868a21fcdeb7f2d8ae6131c5e6ffbbc13629..ce26e767b2e3642a79108aab224884058a0414cc 100644 (file)
@@ -55,8 +55,6 @@ class divListDepartment extends MultiSelectWindow
     $this->EnableCloseButton(false);
     $this->EnableSaveButton (false);
 
-
-
    /* Toggle all selected / deselected */
     $chk = "<input type='checkbox' id='select_all' name='select_all' title='"._("Select all")."'
                onClick='toggle_all_(\"^item_selected_[a-zA-Z0-9\\/\=]*$\",\"select_all\");' >";
@@ -151,43 +149,18 @@ class divListDepartment extends MultiSelectWindow
     $s .= "..|<img src='images/lists/new.png' alt='' border='0' class='center'>".
       "&nbsp;"._("Create")."|\n";
 
-    if(preg_match("/c/",$ui->get_permissions("ou=dummy,".$this->selectedBase  ,"department/department"))) {
-      $s.= "...|<input class='center' type='image' src='plugins/departments/images/department.png' alt=''>".
-        "&nbsp;"._("Department")."&nbsp;(ou)|dep_new_ou|\n";
-
-    }
-
-    if(preg_match("/c/",$ui->get_permissions("ou=dummy,".$this->selectedBase  ,"department/organization"))) {
-      $s.= "...|<input class='center' type='image' src='plugins/departments/images/organization.png' alt=''>".
-        "&nbsp;"._("Organization")."&nbsp;(o)|dep_new_o|\n";
-    }
-
-    if(preg_match("/c/",$ui->get_permissions("ou=dummy,".$this->selectedBase  ,"department/country"))) {
-      $s.= "...|<input class='center' type='image' src='plugins/departments/images/country.png' alt=''>".
-        "&nbsp;"._("Country")."&nbsp;(c)"."|dep_new_c|\n";
-    }
-
-    if(preg_match("/c/",$ui->get_permissions("ou=dummy,".$this->selectedBase  ,"department/locality"))) {
-      $s.= "...|<input class='center' type='image' src='plugins/departments/images/locality.png' alt=''>".
-        "&nbsp;"._("Locality")."&nbsp;(l)|dep_new_l|\n";
-    }
-
-    if(preg_match("/c/",$ui->get_permissions("ou=dummy,".$this->selectedBase  ,"department/dcObject"))) {
-      $s.= "...|<input class='center' type='image' src='plugins/departments/images/dcObject.png' alt=''>".
-        "&nbsp;"._("Domain component")."&nbsp;(l)|dep_new_dc|\n";
+    /* Add all createable department types 
+     */
+    $types = $this->parent->get_support_departments();
+    foreach($types as $type){
+      if(preg_match("/c/",$ui->get_permissions("ou=dummy,".$this->selectedBase  ,"department/".$type['ACL']))){
+      $s.= "...|<input class='center' type='image' src='".$type['IMG']."' alt='".$type['ATTR']."'>".
+        "&nbsp;".$type['TITLE']."&nbsp;(".$type['ATTR'].")|dep_new_".$type['ATTR']."|\n";
+      }
     }
 
-
-#   if(preg_match("/c/",$ui->get_permissions("ou=dummy,".$this->selectedBase  ,"department/alias"))) {
-#     $s.= "...|<input class='center' type='image' src='plugins/departments/images/department_alias.png' alt=''>".
-#       "&nbsp;"._("Alias")."|dep_new_alias|\n";
-#   }
-#
-#   if(preg_match("/c/",$ui->get_permissions("ou=dummy,".$this->selectedBase  ,"department/referal"))) {
-#     $s.= "...|<input class='center' type='image' src='plugins/departments/images/department_referal.png' alt=''>".
-#       "&nbsp;"._("Referal")."|dep_new_referal|\n";
-#   }
-
+    /* Add remove action 
+     */
     $s.= "..|---|\n";
     $s.= "..|<img src='images/lists/trash.png' alt='' border='0' class='center'>".
       "&nbsp;"._("Remove")."|"."remove_multiple|\n";
@@ -281,9 +254,11 @@ class divListDepartment extends MultiSelectWindow
       /* Create image 
        */
       if($sub_folders){
-        $img =  "<img src='".$dep_data['IMG_FULL']."' class='center' title='".$dep_data['TITLE']."'>";
+        $img =  "<img alt='".$dep_data['ATTR']."' src='".$dep_data['IMG_FULL']."' 
+          class='center' title='".$dep_data['TITLE']."'>";
       }else{
-        $img =  "<img src='".$dep_data['IMG']."' class='center' title='".$dep_data['TITLE']."'>";
+        $img =  "<img alt='".$dep_data['ATTR']."' src='".$dep_data['IMG']."' 
+          class='center' title='".$dep_data['TITLE']."'>";
       }
      
       /* Append data to the listing