Code

Updated application listing
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 31 Mar 2010 08:24:25 +0000 (08:24 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 31 Mar 2010 08:24:25 +0000 (08:24 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@17421 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/goto/admin/applications/application-filter.xml
gosa-plugins/goto/admin/applications/class_applicationManagement.inc
gosa-plugins/goto/admin/applications/generic.tpl
gosa-plugins/goto/admin/applications/tabs_application.inc

index 899126a2fcfd403f74a07e1a1efd165c8f6cb081..0cfdd58d3270e17313a774d99774fd8d45c942c3 100644 (file)
@@ -5,7 +5,7 @@
     <category>application</category>
     <initial>true</initial>
     <default>default</default>
-    <scope>one</scope>
+    <scope>auto</scope>
     <attribute>dn</attribute>
     <attribute>objectClass</attribute>
     <attribute>cn</attribute>
     </autocomplete>
   </search>
 
-  <element>
-    <tag>RELEASE</tag>
-    <type>combobox</type>
-    <value>Loading.</value>
-    <value>Loading..</value>
-    <value>Loading...</value>
-  </element>
-
 </filterdef>
index aec27779e8660a9311ee619697e4b3c640170e5f..08605166e038c57a0c23db063f8fdab8814d0f85 100644 (file)
@@ -58,7 +58,7 @@ class applicationManagement extends management
     }
 
     // Build filter
-    if (session::global_is_set(get_class($this)."_filter")){
+    if (0 && session::global_is_set(get_class($this)."_filter")){
       $filter= session::global_get(get_class($this)."_filter");
     } else {
       $filter = new filter(get_template_path($filter_xml, true));
@@ -95,35 +95,20 @@ class applicationManagement extends management
     $filter = $this->getFilter();
     $headpage = $this->getHeadpage();
 
-    $this->releaseSelector->update();
-    $this->app_release = $this->releaseSelector->getBase();
+    // Display release selector
+    if($this->IsReleaseManagementActivated()){
+      $this->releaseSelector->update();
+      $this->app_release = $this->releaseSelector->getBase();
+      $headpage->setBase($this->app_release);
+      $smarty->assign("RELEASE", $this->releaseSelector->render());
+    }
 
-    $headpage->setBase($this->app_release);
     $headpage->update();
-    $smarty->assign("RELEASE", $this->releaseSelector->render());
     $display = $headpage->render();
     return($this->getHeader().$display);
   }
 
 
-  function getReleaseList($base = "", $prefix ="")
-  {
-    $list = array();
-    if(empty($base)){
-      $base = get_ou('applicationRDN').$this->config->current['BASE'];
-      $list[$base] = "/";
-    }
-
-    $ldap = $this->config->get_ldap_link();
-    $ldap->ls("(objectClass=FAIbranch)",$base,array("ou","FAIstate"));
-    while($release = $ldap->fetch()){
-      $list[$release['dn']] = $prefix.$release['ou'][0];
-      $list = array_merge($list,$this->getReleaseList($release['dn'],$prefix."&nbsp; "));
-    }
-    return($list);
-  }
-  
-
   function IsReleaseManagementActivated()
   {
     /* Check if we should enable the release selection */
index f7778ad222a5e7495fc6ccc1ec25e717ab8c62c1..4baf3926266dcbc431f29d71ea3d58f5554a30c2 100644 (file)
@@ -37,6 +37,7 @@
 {/render}
      </td>
     </tr>
+{if !$isReleaseApplikation}
     <tr><td colspan=2><div style="height:15px;"></div></td></tr>
     <tr>
       <td><LABEL for="base">{t}Base{/t}{$must}</LABEL></td>
@@ -55,6 +56,7 @@
 {/if}
       </td>
      </tr>
+{/if}
    </table>
   </td>
   <td class='left-border'>
index b9373aeaff912209c5b2dafd5d41731b3a4afdb4..bf7a311f27bc76114d6e7572b4b39ee82ffbf475 100644 (file)
@@ -27,8 +27,8 @@ class apptabs extends tabs
 
     /* Check for new 'dn', in order to propagate the
        'dn' to all plugins */
-    if($this->parent->IsReleaseManagementActivated()){
-      $new_dn= "cn=".$baseobject->cn.",".$this->parent->app_release;
+    if($baseobject->parent->parent->IsReleaseManagementActivated()){
+      $new_dn= "cn=".$baseobject->cn.",".$baseobject->parent->parent->app_release;
     }else{
       $new_dn= "cn=".$baseobject->cn.",".get_ou('applicationRDN').$baseobject->base;
     }