summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: db948a1)
raw | patch | inline | side by side (parent: db948a1)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 28 Nov 2007 10:12:23 +0000 (10:12 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 28 Nov 2007 10:12:23 +0000 (10:12 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@7927 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/admin/fai/branch_selector.tpl | patch | blob | history | |
plugins/admin/fai/class_divListFai.inc | patch | blob | history | |
plugins/admin/fai/class_faiManagement.inc | patch | blob | history |
index 2285737e5567c3d9c0f318292b0bad55dfc4ea08..addb5a7a2921c6c7f8da3d3081107a412f24f18c 100644 (file)
<tr>
<td>
{if $allow_create}
- <input type="image" align="middle" value="branch" name="branch_branch" src="images/branch_small.png">
-
- {t}Create new branch{/t}
+ <input class="center" type="image" name="branch_branch" src="images/branch_small.png">
+ <a href="?plug={$plug_id}&act=branch_branch">{t}Create new branch{/t}</a>
<br>
- <input type="image" align="middle" value="freeze" name="freeze_branch" src="images/freeze.png">
+ <input class="center" type="image" name="freeze_branch" src="images/freeze.png">
+ <a href="?plug={$plug_id}&act=freeze_branch">{t}Create new locked branch{/t}</a>
{else}
<img src="images/branch_small_grey.png" alt='{t}Branch{/t}' class='center'>
-
{t}Create new branch{/t}
<br>
<img src="images/freeze_grey.png" alt='{t}Freeze{/t}' class='center'>
+ {t}Create new locked branch{/t}
{/if}
-
- {t}Create new locked branch{/t}
{if $selectedBranch != "main" && $allow_remove}
<br>
- <input type="image" align="middle" value="delete" name="remove_branch" src="images/edittrash.png">
-
- {t}Delete current release{/t}
+ <input class="center" type="image" name="remove_branch" src="images/edittrash.png">
+ <a href="?plug={$plug_id}&act=remove_branch">{t}Delete current release{/t}</a>
{/if}
</td>
</tr>
index c2ae1b9b56f6dcdc9f4eb393b13ea824ddc9ef10..b42bac3480f8d6a84b06e8333d8a078a4c988ed5 100644 (file)
$smarty->assign("selectedBranch",$this->selectedBranch);
$smarty->assign("branchimage","images/branch.png");
$smarty->assign("branches",$this->AvailableBranches);
+ $plug_id = 0;
+ if(isset($_GET['plug'])){
+ $plug_id = $_GET['plug'];
+ }
+ $smarty->assign("plug_id",$plug_id);
$str = $smarty->fetch(get_template_path('branch_selector.tpl', TRUE));
}
return($str);
index 67446d5e43680236dad965d03f51a7b437e57d57..f7004efa28e715e5d11955f04a1637d4f14ebf80 100644 (file)
$s_entry = $_GET['edit_entry'];
$s_action = "edit";
}
+
+ if(isset($_GET['act']) && $_GET['act'] == "freeze_branch"){
+ $s_action = "freeze_branch";
+ }
+ if(isset($_GET['act']) && $_GET['act'] == "branch_branch"){
+ $s_action = "branch_branch";
+ }
+ if(isset($_GET['act']) && $_GET['act'] == "remove_branch"){
+ $s_action = "remove_branch";
+ }
if((isset($_POST['CancelBranchName'])) || (isset($_POST['CloseIFrame']))){
$this->dispNewBranch = false;
****************/
if(isset($_GET['PerformBranch'])){
-
+
+ $base= $this->DivListFai->selectedBranch;
+ $this->set_acl_base($base);
if(!$this->acl_is_createable()){
print_red(_("You are not allowed to create a new branch."));
}else{
*/
if("" != $this->config->search("faiManagement", "POSTCREATE",array('menu','tabs'))){
if(($s_action == "branch_branch")||($this->dispNewBranch)){
- $this->dispNewBranch=true;
- $smarty->assign("iframe",false);
- $display .= $smarty->fetch(get_template_path('faiNewBranch.tpl', TRUE, dirname(__FILE__)));
- return($display);
+ $base= $this->DivListFai->selectedBranch;
+ $this->set_acl_base($base);
+ if(!$this->acl_is_createable()){
+ print_red(_("You are not allowed to create a new branch."));
+ }else{
+ $this->dispNewBranch=true;
+ $smarty->assign("iframe",false);
+ $display .= $smarty->fetch(get_template_path('faiNewBranch.tpl', TRUE, dirname(__FILE__)));
+ return($display);
+ }
}
}
*/
if("" != $this->config->search("faiManagement", "POSTCREATE",array('menu','tabs'))){
if(($s_action == "freeze_branch")||($this->dispNewFreeze)){
- $this->dispNewFreeze = true;
- $smarty->assign("iframe",false);
- $display .= $smarty->fetch(get_template_path('faiNewBranch.tpl', TRUE, dirname(__FILE__)));
- return($display);
+ $base= $this->DivListFai->selectedBranch;
+ $this->set_acl_base($base);
+ if(!$this->acl_is_createable()){
+ print_red(_("You are not allowed to create a new branch."));
+ }else{
+ $this->dispNewFreeze = true;
+ $smarty->assign("iframe",false);
+ $display .= $smarty->fetch(get_template_path('faiNewBranch.tpl', TRUE, dirname(__FILE__)));
+ return($display);
+ }
}
}
/* Get available branches for current base */
function getBranches($base = false,$prefix = "")
{
- $ret = array("main"=>"/");
+ $ret = array("/"=>"main");
$ldap = $this->config->get_ldap_link();
if(!$base){
$base= $_SESSION['CurrentMainBase'];
}
natcasesort($ret);
$ret = array_flip($ret);
+
return ($ret);
}