Code

Reenabled release buttons
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 5 Jan 2010 17:19:25 +0000 (17:19 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 5 Jan 2010 17:19:25 +0000 (17:19 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@15068 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/fai/admin/fai/class_faiManagement.inc
gosa-plugins/fai/admin/fai/fai-filter.tpl

index 677ba0ea383c9d7b50965ef25a84695a85a9b759..4a6f7ab90fb6ddb20562fa04e48a5ba9f3effff4 100644 (file)
@@ -264,6 +264,14 @@ class faiManagement extends management
     }
     $headpage->setBase($this->fai_release);
     $headpage->update();
+    $smarty = get_smarty();
+    $smarty->assign("fai_release", $this->fai_release);
+    $smarty->assign("fai_base", get_ou('faiBaseRDN').$this->config->current['BASE']);
+    $r = $this->config->search("faiManagement", "POSTREMOVE",array('menu','tabs'));
+    $c = $this->config->search("faiManagement", "POSTCREATE",array('menu','tabs'));
+    $smarty->assign("allow_create", $c);
+    $smarty->assign("allow_remove", $r);
+    $smarty->assign("fai_base", get_ou('faiBaseRDN').$this->config->current['BASE']);
     $display = $headpage->render();
     return($this->getHeader().$display);
   }
index f29a2a5d49e2a09dd4dd5f5dde9308057ea74774..4bfc457ba8f049e22c2bcb6c57fe3619b591e0e9 100644 (file)
 <div style="border-top:1px solid #AAAAAA"></div>
 
 <div style='padding:4px;'>
+
+{if $allow_create}
   <input class="center" type="image" name="branch_branch" src="plugins/fai/images/branch_small.png">
-  <a href="?plug={$plug}&act=branch_branch">{t}Create release{/t}</a>
+  <a href="{$plug}&act=branch_branch">{t}Create release{/t}</a>
   <br>
   <input class="center" type="image" name="freeze_branch" src="plugins/fai/images/freeze.png">
-  <a href="?plug={$plug}&act=freeze_branch">{t}Create read-only release{/t}</a>
+  <a href="{$plug}&act=freeze_branch">{t}Create read-only release{/t}</a>
+{else}
+  <img src="plugins/fai/images/branch_small_grey.png" alt='{t}Release{/t}' class='center'>
+  {t}Create release{/t}
+  <br>
+  <img src="plugins/fai/images/freeze_grey.png" alt='{t}Freeze{/t}' class='center'>
+  {t}Create read-only release{/t}
+{/if}
+
+{if $fai_release != $fai_base && $allow_remove}
   <br>
   <input class="center" type="image" name="remove_branch" src="images/lists/trash.png">
-  <a href="?plug={$plug}&act=remove_branch">{t}Delete current release{/t}</a>
+  <a href="{$plug}&act=remove_branch">{t}Delete current release{/t}</a>
+{/if}
+
 </div>
+
 <div style="border-top:1px solid #AAAAAA"></div>
 
 {$PROFILE}   {t}Show profiles{/t}