Code

Added check if fai is enabled. If not, hide release selection.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 22 Mar 2006 09:18:56 +0000 (09:18 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Wed, 22 Mar 2006 09:18:56 +0000 (09:18 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@2890 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/applications/class_applicationManagement.inc
plugins/admin/applications/headpage.tpl

index 61a6fff0a181cc54f2f04be0b96b91db08439a1b..d97d4fa0e86a02f383573752f0add62ec483840e 100644 (file)
@@ -36,7 +36,9 @@ class applicationManagement extends plugin
   var $Release  = "";
   var $Releases = array();
 
-  var $enableCopyPaste = false;
+  var $enableCopyPaste         = false;
+  var $enableReleaseManagement = false;
+
 
   function applicationManagement ($config, $ui)
   {
@@ -52,6 +54,12 @@ class applicationManagement extends plugin
 
     $this->CopyPasteHandler = new CopyPasteHandler($this->config);
 
+    /* Check if we should enable the release selection */
+    $tmp = search_config($this->config->data,"faiManagement","CLASS");
+    if(!empty($tmp)){
+      $this->enableReleaseManagement = true;
+    }
+
     /* Get global filter config */
     if (!is_global("appfilter")){
       $base= get_base_from_people($ui->dn);
@@ -558,9 +566,13 @@ class applicationManagement extends plugin
     $smarty->assign("deplist", $this->config->idepartments);
     $smarty->assign("regex", $appfilter['regex']);
 
-    $smarty->assign("releases",     $this->Releases );
-    $smarty->assign("releaseKeys",   array_flip($this->Releases));
-    $smarty->assign("select_release",$this->Release);
+    if($this->enableReleaseManagement){
+      $smarty->assign("releases",     $this->Releases );
+      $smarty->assign("releaseKeys",   array_flip($this->Releases));
+      $smarty->assign("select_release",$this->Release);
+    }
+
+    $smarty->assign("enableReleaseManagement",$this->enableReleaseManagement);
 
     /* Extend if we are not using javascript */
     $smarty->assign("apply", apply_filter());
index 7d9bb7f65fce4bcccda0dcc7d45dc75c3c0ce56d..91ccb3c305ef1097f0f34c87c3b61b37367d939e 100644 (file)
@@ -24,6 +24,7 @@
     {t}This menu allows you to add, edit and remove selected applications. You may want to use the range selector on top of the application listbox, when working with a large number of applications.{/t}
    </p>
    </div>
+       {if $enableReleaseManagement == true}
    <br>
    <div class="contentboxh" style="border-bottom:1px solid #B0B0B0;">
     <p class="contentboxh"><img src="{$releaseimage}" align="right" alt="[F]">{t}Branches{/t}</p>
@@ -40,6 +41,7 @@
          </tr>
         </table>
    </div>
+       {/if}
    <br>
    <div class="contentboxh">
     <p class="contentboxh"><img src="{$launchimage}" align="right" alt="[F]">{t}Filters{/t}</p>