diff --git a/public_html/deployment/pages/act_build.php b/public_html/deployment/pages/act_build.php index 0e2c001716903dc09da8262b45daaeea31d2f9fb..e22bc21ce66d852ee1cbae29c3d319429d938e15 100644 --- a/public_html/deployment/pages/act_build.php +++ b/public_html/deployment/pages/act_build.php @@ -36,6 +36,8 @@ if (!array_key_exists("confirm", $aParams)) { // ------------------------------------------------------------ $sNext = $oPrj->getNextPhase(); $aPhaseData2 = $oPrj->getPhaseInfos($sNext); + $sBranchontarget=isset($aPhaseData2["ready2install"]["branch"]) ? $aPhaseData2["ready2install"]["branch"]: ''; + print_r($sBranchname); $bIgnoreCache = isset($aParams['reloadBranches']) ? $aParams['reloadBranches'] : false; // $sOut.='<p>Re-Read Branches (ignore caching) - '.($bIgnoreCache ? "JA" : "mein" ).'</p>'; @@ -70,7 +72,20 @@ if (!array_key_exists("confirm", $aParams)) { <tr> <td class=""> ' . $oPrj->renderSelectRemoteBranches(false, $bIgnoreCache) . ' - <form action="?" method="post" enctype="multipart/form-data"> + '.( + $sBranchontarget && $sBranchontarget != $sBranchname + ? ' + <form action="?" method="post" enctype="multipart/form-data"> + <input type="hidden" name="reloadBranches" value="1"> + <input type="hidden" name="branchname" value="' . $sBranchontarget . '"> + '.sprintf(t('page-build-branch-on-target'), $sBranchontarget).'<br> + <button type="submit" class="btn btn-default">' . sprintf(t('page-build-switch-to-target'), $sBranchontarget) . '</button> + </form> + <br><hr> + ' + : '' + ).' + <form action="?" method="post" enctype="multipart/form-data"> <input type="hidden" name="reloadBranches" value="1"> <input type="hidden" name="branchname" value="' . $sBranchname . '"> <fieldset>