diff --git a/module/build/control.php b/module/build/control.php index 745306a61f..36f4ea9d61 100644 --- a/module/build/control.php +++ b/module/build/control.php @@ -212,6 +212,9 @@ class build extends control $build = $this->build->getById((int)$buildID, true); if(!$build) die(js::error($this->lang->notFound) . js::locate('back')); + /* Determines whether an object is editable. */ + $changeAllowed = !common::checkParentObjectClosed('build', $build); + $product = $this->loadModel('product')->getById($build->product); if($product->type != 'normal') $this->lang->product->branch = sprintf($this->lang->product->branch, $this->lang->product->branchName[$product->type]); @@ -269,6 +272,7 @@ class build extends control $this->view->type = $type; $this->view->bugPager = $bugPager; $this->view->branchName = $build->productType == 'normal' ? '' : $this->loadModel('branch')->getById($build->branch); + $this->view->changeAllowed = $changeAllowed; $this->display(); } diff --git a/module/build/view/view.html.php b/module/build/view/view.html.php index da89fa4ad9..bd53d2f43f 100644 --- a/module/build/view/view.html.php +++ b/module/build/view/view.html.php @@ -48,7 +48,7 @@ tbody tr td:first-child input{display:none;}
deleted) + if(!$build->deleted and $changeAllowed) { echo $this->buildOperateMenu($build, 'view'); @@ -91,13 +91,13 @@ tbody tr td:first-child input{display:none;}
' id='stories'> - +
id, \"story\")", ' ' . $lang->build->linkStory, '', "class='btn btn-primary'");?>
id}")?>' id='linkedStoriesForm'> - + id}&type=story&link=$link¶m=$param&orderBy=%s";?> @@ -146,7 +146,7 @@ tbody tr td:first-child input{display:none;}
story->stageList[$story->stage];?> id&story=$story->id"); echo html::a("javascript:ajaxDelete(\"$unlinkURL\", \"storyList\", confirmUnlinkStory)", '', '', "class='btn btn-icon' title='{$lang->build->unlinkStory}'"); @@ -176,13 +176,13 @@ tbody tr td:first-child input{display:none;}
' id='bugs'> - +
id, \"bug\")", ' ' . $lang->build->linkBug, '', "class='btn btn-primary'");?>
id");?>" id='linkedBugsForm'> - + id}&type=bug&link=$link¶m=$param&orderBy=%s";?> @@ -227,7 +227,7 @@ tbody tr td:first-child input{display:none;} + + @@ -72,6 +77,7 @@ + + diff --git a/module/project/view/testtask.html.php b/module/project/view/testtask.html.php index e377e56e56..79e46fe464 100644 --- a/module/project/view/testtask.html.php +++ b/module/project/view/testtask.html.php @@ -29,7 +29,9 @@
+ config->global->closedProjectStatus) or $project->status != 'closed'):?> " . $lang->testtask->create, '', "class='btn btn-primary'");?> +
resolvedDate, 5, 11)?> id&bug=$bug->id"); echo html::a("javascript:ajaxDelete(\"$unlinkURL\", \"bugList\", confirmUnlinkBug)", '', '', "class='btn btn-icon' title='{$lang->build->unlinkBug}'"); diff --git a/module/project/control.php b/module/project/control.php index 3449b2619c..db36a93b18 100644 --- a/module/project/control.php +++ b/module/project/control.php @@ -945,6 +945,7 @@ class project extends control $this->view->title = $this->projects[$projectID] . $this->lang->colon . $this->lang->testtask->common; $this->view->position[] = html::a($this->createLink('project', 'testtask', "projectID=$projectID"), $this->projects[$projectID]); $this->view->position[] = $this->lang->testtask->common; + $this->view->project = $project; $this->view->projectID = $projectID; $this->view->projectName = $this->projects[$projectID]; $this->view->pager = $pager; @@ -1047,12 +1048,17 @@ class project extends control $project = $this->commonAction($projectID); $projectID = $project->id; + /* Determines whether an object is editable. */ + $changeAllowed = true; + if(!empty($this->config->global->closedProjectStatus) and $project->status == 'closed') $changeAllowed = false; + $title = $project->name . $this->lang->colon . $this->lang->project->team; $position[] = html::a($this->createLink('project', 'browse', "projectID=$projectID"), $project->name); $position[] = $this->lang->project->team; - $this->view->title = $title; - $this->view->position = $position; + $this->view->title = $title; + $this->view->position = $position; + $this->view->changeAllowed = $changeAllowed; $this->display(); } @@ -1923,6 +1929,7 @@ class project extends control $this->view->title = $title; $this->view->position = $position; $this->view->allProducts = $allProducts; + $this->view->project = $project; $this->view->linkedProducts = $linkedProducts; $this->view->branchGroups = $this->loadModel('branch')->getByProducts(array_keys($allProducts), '', $linkedBranches); diff --git a/module/project/view/build.html.php b/module/project/view/build.html.php index 1d16608c6f..3f87eb6e43 100644 --- a/module/project/view/build.html.php +++ b/module/project/view/build.html.php @@ -29,7 +29,9 @@ project->byQuery;?>
+ config->global->closedProjectStatus) or $project->status != 'closed'):?> id", " " . $lang->build->create, '', "class='btn btn-primary'");?> +
diff --git a/module/project/view/manageproducts.html.php b/module/project/view/manageproducts.html.php index 20d06bb628..0275b6c339 100644 --- a/module/project/view/manageproducts.html.php +++ b/module/project/view/manageproducts.html.php @@ -57,7 +57,7 @@
- + config->global->closedProjectStatus) or $project->status != 'closed') echo html::submitButton();?>
diff --git a/module/project/view/team.html.php b/module/project/view/team.html.php index 2335c0bab7..4d9c6a7a57 100644 --- a/module/project/view/team.html.php +++ b/module/project/view/team.html.php @@ -18,14 +18,17 @@
id"); - echo html::a($this->createLink('tutorial', 'wizard', "module=project&method=manageMembers¶ms=$wizardParams"), " " . $lang->project->manageMembers, '', "class='btn btn-primary manage-team-btn'"); - } - else - { - if(!empty($app->user->admin) or empty($app->user->rights['rights']['my']['limited'])) common::printLink('project', 'manageMembers', "projectID=$project->id", " " . $lang->project->manageMembers, '', "class='btn btn-primary manage-team-btn'"); + if(commonModel::isTutorialMode()) + { + $wizardParams = helper::safe64Encode("projectID=$project->id"); + echo html::a($this->createLink('tutorial', 'wizard', "module=project&method=manageMembers¶ms=$wizardParams"), " " . $lang->project->manageMembers, '', "class='btn btn-primary manage-team-btn'"); + } + else + { + if(!empty($app->user->admin) or empty($app->user->rights['rights']['my']['limited'])) common::printLink('project', 'manageMembers', "projectID=$project->id", " " . $lang->project->manageMembers, '', "class='btn btn-primary manage-team-btn'"); + } } ?>
@@ -52,7 +55,9 @@
team->hours;?> team->totalHours;?> team->limited;?> actions;?>
hours . $lang->project->workHour;?> project->workHour;?> team->limitedList[$member->limited];?>