Code

Updated mimetype listing.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 9 Nov 2009 14:32:45 +0000 (14:32 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 9 Nov 2009 14:32:45 +0000 (14:32 +0000)
-Not yet finished

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

gosa-plugins/goto/admin/mimetypes/class_mimetypeManagement.inc
gosa-plugins/goto/admin/mimetypes/main.inc
gosa-plugins/goto/admin/mimetypes/mimetype-filter-release.xml
gosa-plugins/goto/admin/mimetypes/mimetype-filter.xml
gosa-plugins/goto/admin/mimetypes/mimetype-list-release.xml
gosa-plugins/goto/admin/mimetypes/mimetype-list.xml

index 843ce1df69901104bd0cd230218ceff5cd9f45dd..bff9874151c5bbbf0ff9b9976e1bcfbb3e75633a 100644 (file)
@@ -3,7 +3,7 @@
  * This code is part of GOsa (http://www.gosa-project.org)
  * Copyright (C) 2003-2008 GONICUS GmbH
  *
- * ID: $$Id: class_applicationManagement.inc 14766 2009-11-05 14:30:35Z hickert $$
+ * ID: $$Id: class_mimetypeManagement.inc 14766 2009-11-05 14:30:35Z hickert $$
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
 
 class mimetypeManagement extends management
 {
-  var $plHeadline     = "Applications";
-  var $plDescription  = "Application management";
-  var $plIcon  = "plugins/goto/images/application.png";
+  var $plHeadline     = "Mime types";
+  var $plDescription  = "Manage mime types";
+  var $plIcon  = "plugins/goto/images/mimetypes.png";
 
-  var $app_release = ""; // The currently selected release while in release management mode!
+  var $mime_release = ""; // The currently selected release while in release management mode!
 
   // Tab definition 
-  protected $tabClass = "apptabs";
-  protected $tabType = "APPSTABS";
-  protected $aclCategory = "application";
-  protected $aclPlugin   = "application";
-  protected $objectName   = "application";
+  protected $tabClass = "mimetabs";
+  protected $tabType = "MIMETABS";
+  protected $aclCategory = "mimetypes";
+  protected $aclPlugin   = "mimetype";
+  protected $objectName   = "mimetype";
 
   function __construct($config,$ui)
   {
@@ -41,14 +41,14 @@ class mimetypeManagement extends management
     $this->ui = $ui;
 
     if($this->IsReleaseManagementActivated()){
-      $this->app_release = get_ou('applicationRDN').$this->config->current['BASE'];
+      $this->mime_release = get_ou('mimetypeRDN').$this->config->current['BASE'];
       $filter_xml = "mimetype-filter-release.xml";
       $list_xml = "mimetype-list-release.xml";
       $this->storagePoints= array();
     }else{
       $filter_xml = "mimetype-filter.xml";
       $list_xml = "mimetype-list.xml";
-      $this->storagePoints= array(get_ou("applicationRDN"));
+      $this->storagePoints= array(get_ou("mimetypeRDN"));
     }
 
 #   // Build filter
@@ -71,12 +71,7 @@ class mimetypeManagement extends management
     if($this->config->get_cfg_value("enableSnapshots") == "true"){
       $this->snapHandler = new SnapshotHandler($this->config);
     }
-    parent::__construct($config, $ui, "applications", $headpage);
-
-    $this->registerAction("edit_application","editEntry");
-    $this->registerAction("edit_environment","editEntry");
-    $this->registerAction("edit_appapplication","editEntry");
-    $this->registerAction("edit_mailapplication","editEntry");
+    parent::__construct($config, $ui, "mimetypes", $headpage);
   }
 
   function renderList()
@@ -87,9 +82,9 @@ class mimetypeManagement extends management
       $filter->setComboBoxOptions("RELEASE",$this->getReleaseList());
 
       if(isset($_POST['RELEASE'])){
-        $this->app_release = get_post('RELEASE');
+        $this->mime_release = get_post('RELEASE');
       }
-      $headpage->setBase($this->app_release);
+      $headpage->setBase($this->mime_release);
     }
 
     $headpage->update();
@@ -101,7 +96,7 @@ class mimetypeManagement extends management
   {
     $list = array();
     if(empty($base)){
-      $base = get_ou('applicationRDN').$this->config->current['BASE'];
+      $base = get_ou('mimetypeRDN').$this->config->current['BASE'];
       $list[$base] = "/";
     }
 
@@ -117,8 +112,7 @@ class mimetypeManagement extends management
 
   function IsReleaseManagementActivated()
   {
-    return(FALSE);  
-
+      return(false);
     /* Check if we should enable the release selection */
     $tmp = $this->config->search("faiManagement", "CLASS",array('menu','tabs'));
     if(!empty($tmp)){
index d2ec0ab876fef41b658c17d782bd8259fb929ea1..1efd944a478d0bf6d6a8bf9541545ed9e8da8850 100644 (file)
@@ -35,7 +35,7 @@ if ( $cleanup ){
   session::un_set('mimetypeManagement');
 }else{
 
-  /* Create applicationmanagement object on demand */
+  /* Create mimetypemanagement object on demand */
   if (!session::is_set('mimetypeManagement')){
     $mimetypeManagement= new mimetypeManagement ($config, $ui);
     session::set('mimetypeManagement',$mimetypeManagement);
index ae5852514491159d4bafb03896104c88aaea55e9..2225009306a6cf625efd73dec702e6ed23827b99 100644 (file)
@@ -2,7 +2,7 @@
 
 <filterdef>
   <definition>
-    <category>application</category>
+    <category>mimetype</category>
     <template>mimetype-filter-release.tpl</template>
     <initial>true</initial>
   </definition>
   <search>
     <query>
       <backend>LDAP</backend>
-      <filter>(&amp;(objectClass=gosaApplication)$NAME)</filter>
+      <filter>(&amp;(objectClass=gotoMimeType)$NAME)</filter>
       <attribute>dn</attribute>
       <attribute>objectClass</attribute>
       <attribute>cn</attribute>
       <attribute>description</attribute>
     </query>
-    <scope>auto</scope>
+    <scope>one</scope>
   </search>
 
   <element>
@@ -38,7 +38,7 @@
     <alphabet>true</alphabet>
     <autocomplete>
       <backend>LDAP</backend>
-      <filter>(&amp;(objectClass=gosaApplication)(|(cn=*$NAME*)(description=*$NAME*)))</filter>
+      <filter>(&amp;(objectClass=gotoMimeType)(|(cn=*$NAME*)(description=*$NAME*)))</filter>
       <attribute>cn</attribute>
       <frequency>0.5</frequency>
       <characters>3</characters>
index 7e4663f0cca2be0f967b98393693f197995ba454..cef6d425323685db0beb3a1afa16a156ac504db0 100644 (file)
@@ -2,7 +2,7 @@
 
 <filterdef>
   <definition>
-    <category>application</category>
+    <category>mimetypes</category>
     <template>mimetype-filter.tpl</template>
     <initial>true</initial>
   </definition>
@@ -10,7 +10,7 @@
   <search>
     <query>
       <backend>LDAP</backend>
-      <filter>(&amp;(objectClass=gosaApplication)$NAME)</filter>
+      <filter>(&amp;(objectClass=gotoMimeType)$NAME)</filter>
       <attribute>dn</attribute>
       <attribute>objectClass</attribute>
       <attribute>cn</attribute>
     <scope>one</scope>
   </search>
 
-  <element>
-    <tag>RELEASE</tag>
-    <type>combobox</type>
-    <value>Loading.</value>
-    <value>Loading..</value>
-    <value>Loading...</value>
-  </element>
-
   <element>
     <type>textfield</type>
     <tag>NAME</tag>
@@ -38,7 +30,7 @@
     <alphabet>true</alphabet>
     <autocomplete>
       <backend>LDAP</backend>
-      <filter>(&amp;(objectClass=gosaApplication)(|(cn=*$NAME*)(description=*$NAME*)))</filter>
+      <filter>(&amp;(objectClass=gotoMimeType)(|(cn=*$NAME*)(description=*$NAME*)))</filter>
       <attribute>cn</attribute>
       <frequency>0.5</frequency>
       <characters>3</characters>
index 374c843e3ca6eafe55212d4e7d1bf775b417d8b7..7be49fc64cdb8b3508ccd2d04fc595bfe2cf26be 100644 (file)
@@ -7,16 +7,16 @@
     <baseMode>false</baseMode>
     <multiSelect>true</multiSelect>
     <template>mimetype-list-release.tpl</template>
-    <module>application</module>
-    <label>List of applications</label>
+    <module>mimetypes</module>
+    <label>List of mimetypes</label>
     <defaultSortColumn>1</defaultSortColumn>
 
     <objectType>
-      <label>Application</label>
-      <objectClass>gosaApplication</objectClass>
-      <category>application</category>
-      <class>application</class>
-      <image>plugins/goto/images/select_application.png</image>
+      <label>Mime type</label>
+      <objectClass>gotoMimeType</objectClass>
+      <category>mimetypes</category>
+      <class>mimetype</class>
+      <image>plugins/goto/images/select_mimetype.png</image>
     </objectType>
 
   </definition>
@@ -71,7 +71,7 @@
       <name>new</name>
       <type>entry</type>
       <image>images/lists/new.png</image>
-      <label>Application</label>
+      <label>Mime type</label>
      </action>
     </action>
 
       <name>edit</name>
       <type>entry</type>
       <image>images/lists/edit.png</image>
-      <label>Edit application</label>
+      <label>Edit mimetype</label>
     </action>
 
     <action>
       <name>remove</name>
       <type>entry</type>
       <image>images/lists/trash.png</image>
-      <acl>application/application[d]</acl>
-      <label>Remove application</label>
+      <acl>mimetype/mimetype[d]</acl>
+      <label>Remove mimetype</label>
     </action>
 
   </actiontriggers>
index f322e9735fa49d3512dfa36bce8fe1f94d039866..404dd21a070c84fdb209710c0b79dd7816147660 100644 (file)
@@ -7,16 +7,16 @@
     <baseMode>true</baseMode>
     <multiSelect>true</multiSelect>
     <template>mimetype-list.tpl</template>
-    <module>application</module>
-    <label>List of applications</label>
+    <module>mimetypes</module>
+    <label>List of mimetypes</label>
     <defaultSortColumn>1</defaultSortColumn>
 
     <objectType>
-      <label>Application</label>
-      <objectClass>gosaApplication</objectClass>
-      <category>application</category>
-      <class>application</class>
-      <image>plugins/goto/images/select_application.png</image>
+      <label>Mime type</label>
+      <objectClass>gotoMimeType</objectClass>
+      <category>mimetypes</category>
+      <class>mimetype</class>
+      <image>plugins/goto/images/select_mimetype.png</image>
     </objectType>
 
   </definition>
@@ -71,7 +71,7 @@
       <name>new</name>
       <type>entry</type>
       <image>images/lists/new.png</image>
-      <label>Application</label>
+      <label>Mime type</label>
      </action>
     </action>
 
       <name>edit</name>
       <type>entry</type>
       <image>images/lists/edit.png</image>
-      <label>Edit application</label>
+      <label>Edit mimetype</label>
     </action>
 
     <action>
       <name>remove</name>
       <type>entry</type>
       <image>images/lists/trash.png</image>
-      <acl>application/application[d]</acl>
-      <label>Remove application</label>
+      <acl>mimetype/mimetype[d]</acl>
+      <label>Remove mimetype</label>
     </action>
 
   </actiontriggers>