Code

Allow to create new deparmtments
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 28 Oct 2009 16:51:53 +0000 (16:51 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 28 Oct 2009 16:51:53 +0000 (16:51 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@14682 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-core/plugins/admin/departments/class_departmentManagement.inc
gosa-core/plugins/admin/departments/dep-list.xml

index db86b5faa02f10b4e704f16d61029113d3de4100..c875c546d2cb9735b475547a08a7b3d8603cebbb 100644 (file)
@@ -64,8 +64,22 @@ class departmentManagement extends management
     parent::__construct($config, $ui, "departments", $headpage);
 
     $this->registerAction("open","openEntry");
+
+    $this->registerAction("new_domain","newEntry");
+    $this->registerAction("new_country","newEntry");
+    $this->registerAction("new_locality","newEntry");
+    $this->registerAction("new_dcObject","newEntry");
+    $this->registerAction("new_organization","newEntry");
+    $this->registerAction("new_department","newEntry");
+
   }
 
+  function newEntry($action="",$target=array(),$all=array(), $altTabClass ="", $altTabType = "", $altAclCategory="")
+  {
+    $types= $this->get_support_departments();
+    $type = preg_replace("/^new_/","",$action);
+    return(management::newEntry($action,$target,$all,$this->tabClass,$types[$type]['TAB'],$this->aclCategory));
+  }
 
   function editEntry($action="",$target=array(),$all=array(), $altTabClass ="", $altTabType = "", $altAclCategory="")
   {
index 4bf9deffbd7e30df3a1462bf27559160c297eaf1..f25a431dfeb19303b0a707761d5a90359beab0fb 100644 (file)
       <objectClass>locality</objectClass>
       <category>department</category>
       <class>locality</class>
+      <image>plugins/departments/images/locality.png</image>
+    </objectType>
+
+    <objectType>
+      <label>Organization</label>
+      <objectClass>department</objectClass>
+      <category>department</category>
+      <class>organization</class>
       <image>plugins/departments/images/organization.png</image>
     </objectType>
 
      <label>Create</label>
 
      <action>
-      <name>new</name>
+      <name>new_domain</name>
+      <type>entry</type>
+      <label>Domain</label>
+      <image>plugins/departments/images/domain.png</image>
+     </action>
+    
+     <action>
+      <name>new_dcObject</name>
+      <type>entry</type>
+      <label>Domain component</label>
+      <image>plugins/departments/images/dc.png</image>
+     </action>
+
+     <action>
+      <name>new_country</name>
+      <type>entry</type>
+      <label>Country</label>
+      <image>plugins/departments/images/country.png</image>
+     </action>
+
+     <action>
+      <name>new_locality</name>
       <type>entry</type>
-      <image>plugins/users/images/list_new_user.png</image>
-      <label>User</label>
+      <label>Locality</label>
+      <image>plugins/departments/images/locality.png</image>
+     </action>
+
+     <action>
+      <name>new_organization</name>
+      <type>entry</type>
+      <label>Organization</label>
+      <image>plugins/departments/images/organization.png</image>
+     </action>
+
+     <action>
+      <name>new_department</name>
+      <type>entry</type>
+      <label>Department</label>
+      <image>images/lists/folder.png</image>
      </action>
 
     </action>