From 97770dd00f7dbc975d1d2884ac4370167a462dc1 Mon Sep 17 00:00:00 2001 From: holan20180123 <56391770@qq.com> Date: Tue, 17 Nov 2020 13:17:15 +0800 Subject: [PATCH] * Finish task #8379. --- module/bug/model.php | 18 +-- module/bug/view/browse.html.php | 16 +- module/build/control.php | 26 +-- module/build/view/view.html.php | 14 +- module/doc/control.php | 44 ++--- module/doc/model.php | 4 +- module/doc/view/objectlibs.html.php | 2 +- module/doc/view/objectlibsbylist.html.php | 2 +- module/doc/view/showfiles.html.php | 4 +- module/my/view/bug.html.php | 6 +- module/my/view/story.html.php | 12 +- module/my/view/task.html.php | 6 +- module/my/view/testcase.html.php | 10 +- module/product/view/browse.html.php | 16 +- module/productplan/control.php | 40 ++--- module/productplan/view/browse.html.php | 6 +- module/productplan/view/view.html.php | 10 +- module/project/control.php | 186 +++++++++++----------- module/project/js/storykanban.js | 2 +- module/project/view/bug.html.php | 8 +- module/project/view/kanban.html.php | 6 +- module/project/view/story.html.php | 6 +- module/project/view/storykanban.html.php | 10 +- module/project/view/task.html.php | 8 +- module/project/view/team.html.php | 6 +- module/project/view/testtask.html.php | 4 +- module/project/view/view.html.php | 4 +- module/release/view/browse.html.php | 4 +- module/release/view/view.html.php | 34 ++-- module/story/model.php | 4 +- module/testcase/model.php | 6 +- module/testreport/control.php | 26 +-- module/testreport/view/browse.html.php | 2 +- module/testsuite/control.php | 20 +-- module/testsuite/view/view.html.php | 8 +- module/testtask/control.php | 60 +++---- module/testtask/view/cases.html.php | 4 +- module/testtask/view/groupcase.html.php | 2 +- module/tree/control.php | 8 +- module/tree/view/browse.html.php | 12 +- module/tree/view/browsetask.html.php | 10 +- 41 files changed, 338 insertions(+), 338 deletions(-) diff --git a/module/bug/model.php b/module/bug/model.php index dfd5705ccd..4643862271 100644 --- a/module/bug/model.php +++ b/module/bug/model.php @@ -2507,16 +2507,16 @@ class bugModel extends model public function printCell($col, $bug, $users, $builds, $branches, $modulePairs, $projects = array(), $plans = array(), $stories = array(), $tasks = array(), $mode = 'datatable') { /* Check the product is closed. */ - $changeAllowed = common::checkObjectChangeAllowed('bug', $bug); + $canBeChanged = common::checkObjectChangeAllowed('bug', $bug); - $canBatchEdit = ($changeAllowed and common::hasPriv('bug', 'batchEdit')); - $canBatchConfirm = ($changeAllowed and common::hasPriv('bug', 'batchConfirm')); + $canBatchEdit = ($canBeChanged and common::hasPriv('bug', 'batchEdit')); + $canBatchConfirm = ($canBeChanged and common::hasPriv('bug', 'batchConfirm')); $canBatchClose = common::hasPriv('bug', 'batchClose'); - $canBatchActivate = ($changeAllowed and common::hasPriv('bug', 'batchActivate')); - $canBatchChangeBranch = ($changeAllowed and common::hasPriv('bug', 'batchChangeBranch')); - $canBatchChangeModule = ($changeAllowed and common::hasPriv('bug', 'batchChangeModule')); - $canBatchResolve = ($changeAllowed and common::hasPriv('bug', 'batchResolve')); - $canBatchAssignTo = ($changeAllowed and common::hasPriv('bug', 'batchAssignTo')); + $canBatchActivate = ($canBeChanged and common::hasPriv('bug', 'batchActivate')); + $canBatchChangeBranch = ($canBeChanged and common::hasPriv('bug', 'batchChangeBranch')); + $canBatchChangeModule = ($canBeChanged and common::hasPriv('bug', 'batchChangeModule')); + $canBatchResolve = ($canBeChanged and common::hasPriv('bug', 'batchResolve')); + $canBatchAssignTo = ($canBeChanged and common::hasPriv('bug', 'batchAssignTo')); $canBatchAction = ($canBatchEdit or $canBatchConfirm or $canBatchClose or $canBatchActivate or $canBatchChangeBranch or $canBatchChangeModule or $canBatchResolve or $canBatchAssignTo); @@ -2730,7 +2730,7 @@ class bugModel extends model break; case 'actions': $params = "bugID=$bug->id"; - if($changeAllowed) + if($canBeChanged) { common::printIcon('bug', 'confirmBug', $params, $bug, 'list', 'confirm', '', 'iframe', true); common::printIcon('bug', 'resolve', $params, $bug, 'list', 'checked', '', 'iframe', true); diff --git a/module/bug/view/browse.html.php b/module/bug/view/browse.html.php index b37104f9d1..7b7d20c1df 100644 --- a/module/bug/view/browse.html.php +++ b/module/bug/view/browse.html.php @@ -211,15 +211,15 @@ $currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($brow $widths = $this->datatable->setFixedFieldWidth($setting); $columns = 0; - $changeAllowed = (empty($config->global->closedProductStatus) or $product->status != 'closed'); - $canBatchEdit = ($changeAllowed and common::hasPriv('bug', 'batchEdit')); - $canBatchConfirm = ($changeAllowed and common::hasPriv('bug', 'batchConfirm')); + $canBeChanged = (empty($config->global->closedProductStatus) or $product->status != 'closed'); + $canBatchEdit = ($canBeChanged and common::hasPriv('bug', 'batchEdit')); + $canBatchConfirm = ($canBeChanged and common::hasPriv('bug', 'batchConfirm')); $canBatchClose = common::hasPriv('bug', 'batchClose'); - $canBatchActivate = ($changeAllowed and common::hasPriv('bug', 'batchActivate')); - $canBatchChangeBranch = ($changeAllowed and common::hasPriv('bug', 'batchChangeBranch')); - $canBatchChangeModule = ($changeAllowed and common::hasPriv('bug', 'batchChangeModule')); - $canBatchResolve = ($changeAllowed and common::hasPriv('bug', 'batchResolve')); - $canBatchAssignTo = ($changeAllowed and common::hasPriv('bug', 'batchAssignTo')); + $canBatchActivate = ($canBeChanged and common::hasPriv('bug', 'batchActivate')); + $canBatchChangeBranch = ($canBeChanged and common::hasPriv('bug', 'batchChangeBranch')); + $canBatchChangeModule = ($canBeChanged and common::hasPriv('bug', 'batchChangeModule')); + $canBatchResolve = ($canBeChanged and common::hasPriv('bug', 'batchResolve')); + $canBatchAssignTo = ($canBeChanged and common::hasPriv('bug', 'batchAssignTo')); $canBatchAction = ($canBatchEdit or $canBatchConfirm or $canBatchClose or $canBatchActivate or $canBatchChangeBranch or $canBatchChangeModule or $canBatchResolve or $canBatchAssignTo); ?> diff --git a/module/build/control.php b/module/build/control.php index ee60eb135f..329160c247 100644 --- a/module/build/control.php +++ b/module/build/control.php @@ -213,7 +213,7 @@ class build extends control if(!$build) die(js::error($this->lang->notFound) . js::locate('back')); /* Determines whether an object is editable. */ - $changeAllowed = common::checkObjectChangeAllowed('build', $build); + $canBeChanged = common::checkObjectChangeAllowed('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]); @@ -261,18 +261,18 @@ class build extends control $this->executeHooks($buildID); /* Assign. */ - $this->view->users = $this->loadModel('user')->getPairs('noletter'); - $this->view->build = $build; - $this->view->buildPairs = $this->build->getProjectBuildPairs($build->project, 0, 0, 'noempty,notrunk'); - $this->view->actions = $this->loadModel('action')->getList('build', $buildID); - $this->view->link = $link; - $this->view->param = $param; - $this->view->orderBy = $orderBy; - $this->view->bugs = $bugs; - $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->view->users = $this->loadModel('user')->getPairs('noletter'); + $this->view->build = $build; + $this->view->buildPairs = $this->build->getProjectBuildPairs($build->project, 0, 0, 'noempty,notrunk'); + $this->view->actions = $this->loadModel('action')->getList('build', $buildID); + $this->view->link = $link; + $this->view->param = $param; + $this->view->orderBy = $orderBy; + $this->view->bugs = $bugs; + $this->view->type = $type; + $this->view->bugPager = $bugPager; + $this->view->branchName = $build->productType == 'normal' ? '' : $this->loadModel('branch')->getById($build->branch); + $this->view->canBeChanged = $canBeChanged; $this->display(); } diff --git a/module/build/view/view.html.php b/module/build/view/view.html.php index bd53d2f43f..3da4c2abb6 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 and $changeAllowed) + if(!$build->deleted and $canBeChanged) { 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;} @@ -135,7 +135,7 @@ diff --git a/module/my/view/bug.html.php b/module/my/view/bug.html.php index cef75a175d..beb4899cd3 100644 --- a/module/my/view/bug.html.php +++ b/module/my/view/bug.html.php @@ -73,12 +73,12 @@ ?> - + createLink('story', 'view', "id=$story->id"); - $changeAllowed = common::checkObjectChangeAllowed('story', $story); + $storyLink = $this->createLink('story', 'view', "id=$story->id"); + $canBeChanged = common::checkObjectChangeAllowed('story', $story); ?> - + case : $case->id; - $runID = $type == 'assigntome' ? $case->id : 0; - $changeAllowed = common::checkObjectChangeAllowed('testcase', $case); + $caseID = $type == 'assigntome' ? $case->case : $case->id; + $runID = $type == 'assigntome' ? $case->id : 0; + $canBeChanged = common::checkObjectChangeAllowed('testcase', $case); ?> @@ -165,7 +165,7 @@
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/doc/control.php b/module/doc/control.php index 260e11bd74..ae9fc540ff 100644 --- a/module/doc/control.php +++ b/module/doc/control.php @@ -759,9 +759,9 @@ class doc extends control $object = $this->dao->select('id,name,status')->from($table)->where('id')->eq($objectID)->fetch(); /* Determines whether an object is editable. */ - $changeAllowed = true; - if($type == 'product' and !empty($this->config->global->closedProductStatus) and $object->status == 'closed') $changeAllowed = false; - if($type == 'project' and !empty($this->config->global->closedProjectStatus) and $object->status == 'closed') $changeAllowed = false; + $canBeChanged = true; + if($type == 'product' and !empty($this->config->global->closedProductStatus) and $object->status == 'closed') $canBeChanged = false; + if($type == 'project' and !empty($this->config->global->closedProjectStatus) and $object->status == 'closed') $canBeChanged = false; /* According the from, set menus. */ if($this->from == 'product') @@ -806,18 +806,18 @@ class doc extends control $this->app->loadClass('pager', $static = true); $pager = new pager($recTotal, $recPerPage, $pageID); - $this->view->title = $object->name; - $this->view->position[] = $object->name; + $this->view->title = $object->name; + $this->view->position[] = $object->name; - $this->view->type = $type; - $this->view->object = $object; - $this->view->files = $this->doc->getLibFiles($type, $objectID, $orderBy, $pager); - $this->view->users = $this->loadModel('user')->getPairs('noletter'); - $this->view->pager = $pager; - $this->view->viewType = $viewType; - $this->view->orderBy = $orderBy; - $this->view->objectID = $objectID; - $this->view->changeAllowed = $changeAllowed; + $this->view->type = $type; + $this->view->object = $object; + $this->view->files = $this->doc->getLibFiles($type, $objectID, $orderBy, $pager); + $this->view->users = $this->loadModel('user')->getPairs('noletter'); + $this->view->pager = $pager; + $this->view->viewType = $viewType; + $this->view->orderBy = $orderBy; + $this->view->objectID = $objectID; + $this->view->canBeChanged = $canBeChanged; $this->display(); } @@ -859,9 +859,9 @@ class doc extends control if(empty($object)) $this->locate($this->createLink($type, 'create')); /* Determines whether an object is editable. */ - $changeAllowed = true; - if($type == 'product' and !empty($this->config->global->closedProductStatus) and $object->status == 'closed') $changeAllowed = false; - if($type == 'project' and !empty($this->config->global->closedProjectStatus) and $object->status == 'closed') $changeAllowed = false; + $canBeChanged = true; + if($type == 'product' and !empty($this->config->global->closedProductStatus) and $object->status == 'closed') $canBeChanged = false; + if($type == 'project' and !empty($this->config->global->closedProjectStatus) and $object->status == 'closed') $canBeChanged = false; if($from == 'product') { @@ -899,11 +899,11 @@ class doc extends control $this->view->title = $object->name; $this->view->position[] = $object->name; - $this->view->type = $type; - $this->view->object = $object; - $this->view->from = $from; - $this->view->libs = $this->doc->getLibsByObject($type, $objectID); - $this->view->changeAllowed = $changeAllowed; + $this->view->type = $type; + $this->view->object = $object; + $this->view->from = $from; + $this->view->libs = $this->doc->getLibsByObject($type, $objectID); + $this->view->canBeChanged = $canBeChanged; $this->display(); } } diff --git a/module/doc/model.php b/module/doc/model.php index baee999320..69c52605e0 100644 --- a/module/doc/model.php +++ b/module/doc/model.php @@ -111,11 +111,11 @@ class docModel extends model $docLib = new stdClass(); $docLib->product = $productID; $docLib->project = $projectID; - $changeAllowed = common::checkObjectChangeAllowed('doc', $docLib); + $canBeChanged = common::checkObjectChangeAllowed('doc', $docLib); $lib = isset($lib) ? $lib : new stdClass(); $actions = $this->setFastMenu($fastLib); - $actions .= ($changeAllowed and common::hasPriv('doc', 'createLib', $lib)) ? html::a(helper::createLink('doc', 'createLib', "type={$type}&objectID={$currentLib}"), " " . $this->lang->doc->createLib, '', "class='btn btn-secondary iframe'") : ''; + $actions .= ($canBeChanged and common::hasPriv('doc', 'createLib', $lib)) ? html::a(helper::createLink('doc', 'createLib', "type={$type}&objectID={$currentLib}"), " " . $this->lang->doc->createLib, '', "class='btn btn-secondary iframe'") : ''; $this->lang->TRActions = $actions; } diff --git a/module/doc/view/objectlibs.html.php b/module/doc/view/objectlibs.html.php index b77fad66d9..ab224bd850 100644 --- a/module/doc/view/objectlibs.html.php +++ b/module/doc/view/objectlibs.html.php @@ -57,7 +57,7 @@ collector, ',' . $this->app->user->account . ',') !== false ? 'icon-star text-yellow' : 'icon-star-empty';?> collector, ',' . $this->app->user->account . ',') !== false ? $lang->doc->cancelCollection : $lang->doc->collect;?>
- + " title="" class='btn btn-link ajaxCollect'> diff --git a/module/doc/view/objectlibsbylist.html.php b/module/doc/view/objectlibsbylist.html.php index 1e32f50ed2..404635cb48 100644 --- a/module/doc/view/objectlibsbylist.html.php +++ b/module/doc/view/objectlibsbylist.html.php @@ -34,7 +34,7 @@
name);?> allCount . $lang->doc->item;?> - + collector, ',' . $this->app->user->account . ',') !== false ? 'icon-star text-yellow' : 'icon-star-empty';?> collector, ',' . $this->app->user->account . ',') !== false ? $lang->doc->cancelCollection : $lang->doc->collect;?> diff --git a/module/doc/view/showfiles.html.php b/module/doc/view/showfiles.html.php index 46eab0d8e8..a0e77b97fe 100644 --- a/module/doc/view/showfiles.html.php +++ b/module/doc/view/showfiles.html.php @@ -79,7 +79,7 @@ id", '', "data-toggle='modal'", "class='btn' title={$lang->doc->download}", true, false, $file); - if($changeAllowed) common::printLink('file', 'delete', "fileID=$file->id", '', 'hiddenwin', "class='btn' title={$lang->delete}", true, false, $file); + if($canBeChanged) common::printLink('file', 'delete', "fileID=$file->id", '', 'hiddenwin', "class='btn' title={$lang->delete}", true, false, $file); ?>
- /> + />
@@ -100,7 +100,7 @@
bug->resolutionList, $bug->resolution);?> id"; common::printIcon('bug', 'confirmBug', $params, $bug, 'list', 'confirm', '', 'iframe', true); diff --git a/module/my/view/story.html.php b/module/my/view/story.html.php index 4022afafec..860cc550a1 100644 --- a/module/my/view/story.html.php +++ b/module/my/view/story.html.php @@ -63,14 +63,14 @@
- /> + />
@@ -86,7 +86,7 @@
story->stageList, $story->stage);?> id}"; common::printIcon('story', 'change', $vars, $story, 'list', 'fork'); @@ -105,7 +105,7 @@
- /> + />
@@ -121,7 +121,7 @@
story->stageList, $child->stage);?> id}"; common::printIcon('story', 'change', $vars, $child, 'list', 'fork'); diff --git a/module/my/view/task.html.php b/module/my/view/task.html.php index a48eca713f..3d472fb57a 100644 --- a/module/my/view/task.html.php +++ b/module/my/view/task.html.php @@ -61,12 +61,12 @@
- /> + />
@@ -93,7 +93,7 @@
needConfirm) { diff --git a/module/my/view/testcase.html.php b/module/my/view/testcase.html.php index 9fdf9645fc..0b84fc312f 100644 --- a/module/my/view/testcase.html.php +++ b/module/my/view/testcase.html.php @@ -67,15 +67,15 @@
- /> + />
@@ -93,7 +93,7 @@
processStatus('testcase', $case);?> product&branch=$case->branch&extra=caseID=$caseID,version=$case->version,runID=$runID", $case, 'list', 'bug'); common::printIcon('testcase', 'create', "productID=$case->product&branch=$case->branch&moduleID=$case->module&from=testcase¶m=$caseID", $case, 'list', 'copy'); diff --git a/module/product/view/browse.html.php b/module/product/view/browse.html.php index 3068fc47e1..8a4d07e12f 100644 --- a/module/product/view/browse.html.php +++ b/module/product/view/browse.html.php @@ -189,15 +189,15 @@ js::set('foldAll', $lang->project->treeLevel['root']); $widths = $this->datatable->setFixedFieldWidth($setting); $columns = 0; - $changeAllowed = (empty($config->global->closedProductStatus) or $product->status != 'closed'); - $canBatchEdit = ($changeAllowed and common::hasPriv('story', 'batchEdit')); + $canBeChanged = (empty($config->global->closedProductStatus) or $product->status != 'closed'); + $canBatchEdit = ($canBeChanged and common::hasPriv('story', 'batchEdit')); $canBatchClose = (common::hasPriv('story', 'batchClose') and strtolower($browseType) != 'closedbyme' and strtolower($browseType) != 'closedstory'); - $canBatchReview = ($changeAllowed and common::hasPriv('story', 'batchReview')); - $canBatchChangeStage = ($changeAllowed and common::hasPriv('story', 'batchChangeStage')); - $canBatchChangeBranch = ($changeAllowed and common::hasPriv('story', 'batchChangeBranch')); - $canBatchChangeModule = ($changeAllowed and common::hasPriv('story', 'batchChangeModule')); - $canBatchChangePlan = ($changeAllowed and common::hasPriv('story', 'batchChangePlan')); - $canBatchAssignTo = ($changeAllowed and common::hasPriv('story', 'batchAssignTo')); + $canBatchReview = ($canBeChanged and common::hasPriv('story', 'batchReview')); + $canBatchChangeStage = ($canBeChanged and common::hasPriv('story', 'batchChangeStage')); + $canBatchChangeBranch = ($canBeChanged and common::hasPriv('story', 'batchChangeBranch')); + $canBatchChangeModule = ($canBeChanged and common::hasPriv('story', 'batchChangeModule')); + $canBatchChangePlan = ($canBeChanged and common::hasPriv('story', 'batchChangePlan')); + $canBatchAssignTo = ($canBeChanged and common::hasPriv('story', 'batchAssignTo')); $canBatchAction = ($canBatchEdit or $canBatchClose or $canBatchReview or $canBatchChangeStage or $canBatchChangeModule or $canBatchChangePlan or $canBatchAssignTo); ?> diff --git a/module/productplan/control.php b/module/productplan/control.php index 948efa87dd..c85fb01f13 100644 --- a/module/productplan/control.php +++ b/module/productplan/control.php @@ -250,7 +250,7 @@ class productplan extends control $this->session->set('bugList', $this->app->getURI(true) . '&type=' . 'bug'); /* Determines whether an object is editable. */ - $changeAllowed = common::checkObjectChangeAllowed('plan', $plan); + $canBeChanged = common::checkObjectChangeAllowed('plan', $plan); /* Load pager. */ $this->app->loadClass('pager', $static = true); @@ -274,25 +274,25 @@ class productplan extends control if($plan->parent == '-1') $this->view->childrenPlans = $this->productplan->getChildren($plan->id); $this->loadModel('datatable'); - $this->view->modulePairs = $this->loadModel('tree')->getOptionMenu($plan->product, 'story'); - $this->view->title = "PLAN #$plan->id $plan->title/" . $products[$plan->product]; - $this->view->position[] = $this->lang->productplan->view; - $this->view->planStories = $planStories; - $this->view->planBugs = $this->loadModel('bug')->getPlanBugs($planID, 'all', $type == 'bug' ? $sort : 'id_desc', $bugPager); - $this->view->products = $products; - $this->view->summary = $this->product->summary($this->view->planStories); - $this->view->plan = $plan; - $this->view->actions = $this->loadModel('action')->getList('productplan', $planID); - $this->view->users = $this->loadModel('user')->getPairs('noletter'); - $this->view->plans = $this->productplan->getPairs($plan->product, $plan->branch); - $this->view->modules = $this->loadModel('tree')->getOptionMenu($plan->product); - $this->view->type = $type; - $this->view->orderBy = $orderBy; - $this->view->link = $link; - $this->view->param = $param; - $this->view->storyPager = $storyPager; - $this->view->bugPager = $bugPager; - $this->view->changeAllowed = $changeAllowed; + $this->view->modulePairs = $this->loadModel('tree')->getOptionMenu($plan->product, 'story'); + $this->view->title = "PLAN #$plan->id $plan->title/" . $products[$plan->product]; + $this->view->position[] = $this->lang->productplan->view; + $this->view->planStories = $planStories; + $this->view->planBugs = $this->loadModel('bug')->getPlanBugs($planID, 'all', $type == 'bug' ? $sort : 'id_desc', $bugPager); + $this->view->products = $products; + $this->view->summary = $this->product->summary($this->view->planStories); + $this->view->plan = $plan; + $this->view->actions = $this->loadModel('action')->getList('productplan', $planID); + $this->view->users = $this->loadModel('user')->getPairs('noletter'); + $this->view->plans = $this->productplan->getPairs($plan->product, $plan->branch); + $this->view->modules = $this->loadModel('tree')->getOptionMenu($plan->product); + $this->view->type = $type; + $this->view->orderBy = $orderBy; + $this->view->link = $link; + $this->view->param = $param; + $this->view->storyPager = $storyPager; + $this->view->bugPager = $bugPager; + $this->view->canBeChanged = $canBeChanged; $this->display(); } diff --git a/module/productplan/view/browse.html.php b/module/productplan/view/browse.html.php index 75fa9a882e..242a8cd17e 100644 --- a/module/productplan/view/browse.html.php +++ b/module/productplan/view/browse.html.php @@ -75,8 +75,8 @@ loadModel('file');?> file->replaceImgURL($plan, 'desc'); if($plan->parent == '-1') @@ -100,7 +100,7 @@
- id => ''), '', $disabled) . html::a(helper::createLink('productplan', 'view', "planID=$plan->id"), sprintf('%03d', $plan->id));?> + id => ''), '', $attribute) . html::a(helper::createLink('productplan', 'view', "planID=$plan->id"), sprintf('%03d', $plan->id));?> id);?> diff --git a/module/productplan/view/view.html.php b/module/productplan/view/view.html.php index 03476cd12b..b3105d69fb 100644 --- a/module/productplan/view/view.html.php +++ b/module/productplan/view/view.html.php @@ -62,7 +62,7 @@
'>
- deleted and $plan->parent >= 0 and $changeAllowed):?> + deleted and $plan->parent >= 0 and $canBeChanged):?>
story->stageList[$story->stage];?> createLink('productplan', 'unlinkStory', "story=$story->id&plan=$plan->id&confirm=yes"); echo html::a("javascript:ajaxDelete(\"$unlinkURL\", \"storyList\", confirmUnlinkStory)", '', '', "class='btn' title='{$lang->productplan->unlinkStory}'"); @@ -363,7 +363,7 @@ id&orderBy=$orderBy");?>"> - + id}&type=bug&orderBy=%s&link=$link¶m=$param"; ?> @@ -404,7 +404,7 @@ - + @@ -77,7 +77,7 @@ - + recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}";?> - + '> - + ";?>
createLink('productplan', 'unlinkBug', "story=$bug->id&confirm=yes"); echo html::a("javascript:ajaxDelete(\"$unlinkURL\", \"bugList\", confirmUnlinkBug)", '', '', "class='btn' title='{$lang->productplan->unlinkBug}'"); diff --git a/module/project/control.php b/module/project/control.php index 70a3bac44c..2196d68261 100644 --- a/module/project/control.php +++ b/module/project/control.php @@ -129,8 +129,8 @@ class project extends control setcookie('preProjectID', $projectID, $this->config->cookieLife, $this->config->webRoot, '', false, true); /* Determines whether an object is editable. */ - $changeAllowed = true; - if(!empty($this->config->global->closedProjectStatus) and $project->status == 'closed') $changeAllowed = false; + $canBeChanged = true; + if(!empty($this->config->global->closedProjectStatus) and $project->status == 'closed') $canBeChanged = false; if($this->cookie->preProjectID != $projectID) { @@ -201,27 +201,27 @@ class project extends control $this->view->modulePairs = $showModule ? $this->tree->getModulePairs($projectID, 'task', $showModule) : array(); /* Assign. */ - $this->view->tasks = $tasks; - $this->view->summary = $this->project->summary($tasks); - $this->view->tabID = 'task'; - $this->view->pager = $pager; - $this->view->recTotal = $pager->recTotal; - $this->view->recPerPage = $pager->recPerPage; - $this->view->orderBy = $orderBy; - $this->view->browseType = $browseType; - $this->view->status = $status; - $this->view->users = $this->loadModel('user')->getPairs('noletter'); - $this->view->param = $param; - $this->view->projectID = $projectID; - $this->view->project = $project; - $this->view->productID = $productID; - $this->view->modules = $this->tree->getTaskOptionMenu($projectID, 0, 0, $showAllModule ? 'allModule' : ''); - $this->view->moduleID = $moduleID; - $this->view->moduleTree = $this->tree->getTaskTreeMenu($projectID, $productID, $startModuleID = 0, array('treeModel', 'createTaskLink'), $extra); - $this->view->memberPairs = $memberPairs; - $this->view->branchGroups = $this->loadModel('branch')->getByProducts(array_keys($products), 'noempty'); - $this->view->setModule = true; - $this->view->changeAllowed = $changeAllowed; + $this->view->tasks = $tasks; + $this->view->summary = $this->project->summary($tasks); + $this->view->tabID = 'task'; + $this->view->pager = $pager; + $this->view->recTotal = $pager->recTotal; + $this->view->recPerPage = $pager->recPerPage; + $this->view->orderBy = $orderBy; + $this->view->browseType = $browseType; + $this->view->status = $status; + $this->view->users = $this->loadModel('user')->getPairs('noletter'); + $this->view->param = $param; + $this->view->projectID = $projectID; + $this->view->project = $project; + $this->view->productID = $productID; + $this->view->modules = $this->tree->getTaskOptionMenu($projectID, 0, 0, $showAllModule ? 'allModule' : ''); + $this->view->moduleID = $moduleID; + $this->view->moduleTree = $this->tree->getTaskTreeMenu($projectID, $productID, $startModuleID = 0, array('treeModel', 'createTaskLink'), $extra); + $this->view->memberPairs = $memberPairs; + $this->view->branchGroups = $this->loadModel('branch')->getByProducts(array_keys($products), 'noempty'); + $this->view->setModule = true; + $this->view->canBeChanged = $canBeChanged; $this->display(); } @@ -702,8 +702,8 @@ class project extends control $projectID = $project->id; /* Determines whether an object is editable. */ - $changeAllowed = true; - if(!empty($this->config->global->closedProjectStatus) and $project->status == 'closed') $changeAllowed = false; + $canBeChanged = true; + if(!empty($this->config->global->closedProjectStatus) and $project->status == 'closed') $canBeChanged = false; /* Load pager. */ $this->app->loadClass('pager', $static = true); @@ -765,25 +765,25 @@ class project extends control if($productPairs) $productID = key($productPairs); /* Assign. */ - $this->view->title = $title; - $this->view->position = $position; - $this->view->productID = $productID; - $this->view->project = $project; - $this->view->stories = $stories; - $this->view->allPlans = $allPlans; - $this->view->summary = $this->product->summary($stories); - $this->view->orderBy = $orderBy; - $this->view->type = $this->session->projectStoryBrowseType; - $this->view->param = $param; - $this->view->moduleTree = $this->loadModel('tree')->getProjectStoryTreeMenu($projectID, $startModuleID = 0, array('treeModel', 'createProjectStoryLink')); - $this->view->tabID = 'story'; - $this->view->storyTasks = $storyTasks; - $this->view->storyBugs = $storyBugs; - $this->view->storyCases = $storyCases; - $this->view->users = $users; - $this->view->pager = $pager; - $this->view->branchGroups = $branchGroups; - $this->view->changeAllowed = $changeAllowed; + $this->view->title = $title; + $this->view->position = $position; + $this->view->productID = $productID; + $this->view->project = $project; + $this->view->stories = $stories; + $this->view->allPlans = $allPlans; + $this->view->summary = $this->product->summary($stories); + $this->view->orderBy = $orderBy; + $this->view->type = $this->session->projectStoryBrowseType; + $this->view->param = $param; + $this->view->moduleTree = $this->loadModel('tree')->getProjectStoryTreeMenu($projectID, $startModuleID = 0, array('treeModel', 'createProjectStoryLink')); + $this->view->tabID = 'story'; + $this->view->storyTasks = $storyTasks; + $this->view->storyBugs = $storyBugs; + $this->view->storyCases = $storyCases; + $this->view->users = $users; + $this->view->pager = $pager; + $this->view->branchGroups = $branchGroups; + $this->view->canBeChanged = $canBeChanged; $this->display(); } @@ -944,8 +944,8 @@ class project extends control $projectID = $project->id; /* Determines whether an object is editable. */ - $changeAllowed = true; - if(!empty($this->config->global->closedProjectStatus) and $project->status == 'closed') $changeAllowed = false; + $canBeChanged = true; + if(!empty($this->config->global->closedProjectStatus) and $project->status == 'closed') $canBeChanged = false; /* Load pager. */ $this->app->loadClass('pager', $static = true); @@ -956,18 +956,18 @@ class project extends control $tasks = $this->testtask->getProjectTasks($projectID, $orderBy, $pager); foreach($tasks as $key => $task) $productTasks[$task->product][] = $task; - $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; - $this->view->orderBy = $orderBy; - $this->view->tasks = $productTasks; - $this->view->users = $this->loadModel('user')->getPairs('noclosed|noletter'); - $this->view->products = $this->loadModel('product')->getPairs(); - $this->view->changeAllowed = $changeAllowed; + $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; + $this->view->orderBy = $orderBy; + $this->view->tasks = $productTasks; + $this->view->users = $this->loadModel('user')->getPairs('noclosed|noletter'); + $this->view->products = $this->loadModel('product')->getPairs(); + $this->view->canBeChanged = $canBeChanged; $this->display(); } @@ -1064,16 +1064,16 @@ class project extends control $projectID = $project->id; /* Determines whether an object is editable. */ - $changeAllowed = true; - if(!empty($this->config->global->closedProjectStatus) and $project->status == 'closed') $changeAllowed = false; + $canBeChanged = true; + if(!empty($this->config->global->closedProjectStatus) and $project->status == 'closed') $canBeChanged = 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->changeAllowed = $changeAllowed; + $this->view->title = $title; + $this->view->position = $position; + $this->view->canBeChanged = $canBeChanged; $this->display(); } @@ -1592,8 +1592,8 @@ class project extends control if(!$project) die(js::error($this->lang->notFound) . js::locate('back')); /* Determines whether an object is editable. */ - $changeAllowed = true; - if(!empty($this->config->global->closedProjectStatus) and $project->status == 'closed') $changeAllowed = false; + $canBeChanged = true; + if(!empty($this->config->global->closedProjectStatus) and $project->status == 'closed') $canBeChanged = false; $products = $this->project->getProducts($project->id); $linkedBranches = array(); @@ -1619,19 +1619,19 @@ class project extends control $this->view->position[] = html::a($this->createLink('project', 'browse', "projectID=$projectID"), $project->name); $this->view->position[] = $this->view->title; - $this->view->project = $project; - $this->view->products = $products; - $this->view->branchGroups = $this->loadModel('branch')->getByProducts(array_keys($products), '', $linkedBranches); - $this->view->planGroups = $this->project->getPlans($products); - $this->view->groups = $this->loadModel('group')->getPairs(); - $this->view->actions = $this->loadModel('action')->getList('project', $projectID); - $this->view->dynamics = $this->loadModel('action')->getDynamic('all', 'all', 'date_desc', $pager, 'all', $projectID); - $this->view->users = $this->loadModel('user')->getPairs('noletter'); - $this->view->teamMembers = $this->project->getTeamMembers($projectID); - $this->view->docLibs = $this->loadModel('doc')->getLibsByObject('project', $projectID); - $this->view->statData = $this->project->statRelatedData($projectID); - $this->view->chartData = $chartData; - $this->view->changeAllowed = $changeAllowed; + $this->view->project = $project; + $this->view->products = $products; + $this->view->branchGroups = $this->loadModel('branch')->getByProducts(array_keys($products), '', $linkedBranches); + $this->view->planGroups = $this->project->getPlans($products); + $this->view->groups = $this->loadModel('group')->getPairs(); + $this->view->actions = $this->loadModel('action')->getList('project', $projectID); + $this->view->dynamics = $this->loadModel('action')->getDynamic('all', 'all', 'date_desc', $pager, 'all', $projectID); + $this->view->users = $this->loadModel('user')->getPairs('noletter'); + $this->view->teamMembers = $this->project->getTeamMembers($projectID); + $this->view->docLibs = $this->loadModel('doc')->getLibsByObject('project', $projectID); + $this->view->statData = $this->project->statRelatedData($projectID); + $this->view->chartData = $chartData; + $this->view->canBeChanged = $canBeChanged; $this->display(); } @@ -1663,8 +1663,8 @@ class project extends control $stories = $this->loadModel('story')->getProjectStories($projectID, $orderBy); /* Determines whether an object is editable. */ - $changeAllowed = true; - if(!empty($this->config->global->closedProjectStatus) and $project->status == 'closed') $changeAllowed = false; + $canBeChanged = true; + if(!empty($this->config->global->closedProjectStatus) and $project->status == 'closed') $canBeChanged = false; $kanbanGroup = $this->project->getKanbanGroupData($stories, $tasks, $bugs, $type); $kanbanSetting = $this->project->getKanbanSetting(); @@ -1682,10 +1682,10 @@ class project extends control $this->view->type = $type; $this->view->kanbanGroup = $kanbanGroup; $this->view->kanbanColumns = $this->project->getKanbanColumns($kanbanSetting); - $this->view->statusMap = $changeAllowed ? $this->project->getKanbanStatusMap($kanbanSetting) : array(); + $this->view->statusMap = $canBeChanged ? $this->project->getKanbanStatusMap($kanbanSetting) : array(); $this->view->statusList = $this->project->getKanbanStatusList($kanbanSetting); $this->view->colorList = $this->project->getKanbanColorList($kanbanSetting); - $this->view->changeAllowed = $changeAllowed; + $this->view->canBeChanged = $canBeChanged; $this->display(); } @@ -1856,23 +1856,23 @@ class project extends control $this->loadModel('common')->saveQueryCondition($this->dao->get(), 'story', false); /* Determines whether an object is editable. */ - $changeAllowed = true; - if(!empty($this->config->global->closedProjectStatus) and $project->status == 'closed') $changeAllowed = false; + $canBeChanged = true; + if(!empty($this->config->global->closedProjectStatus) and $project->status == 'closed') $canBeChanged = false; /* Get project's product. */ $productID = 0; $productPairs = $this->loadModel('product')->getProductsByProject($projectID); if($productPairs) $productID = key($productPairs); - $this->view->title = $this->lang->project->storyKanban; - $this->view->position[] = html::a($this->createLink('project', 'story', "projectID=$projectID"), $project->name); - $this->view->position[] = $this->lang->project->storyKanban; - $this->view->stories = $this->story->getKanbanGroupData($stories); - $this->view->realnames = $this->loadModel('user')->getPairs('noletter'); - $this->view->projectID = $projectID; - $this->view->project = $project; - $this->view->productID = $productID; - $this->view->changeAllowed = $changeAllowed; + $this->view->title = $this->lang->project->storyKanban; + $this->view->position[] = html::a($this->createLink('project', 'story', "projectID=$projectID"), $project->name); + $this->view->position[] = $this->lang->project->storyKanban; + $this->view->stories = $this->story->getKanbanGroupData($stories); + $this->view->realnames = $this->loadModel('user')->getPairs('noletter'); + $this->view->projectID = $projectID; + $this->view->project = $project; + $this->view->productID = $productID; + $this->view->canBeChanged = $canBeChanged; $this->display(); } diff --git a/module/project/js/storykanban.js b/module/project/js/storykanban.js index ec9840aabe..aa43e2dc23 100644 --- a/module/project/js/storykanban.js +++ b/module/project/js/storykanban.js @@ -5,7 +5,7 @@ $(function() var $kanban = $('#kanban'); var stageMap = new Object(); - if(changeAllowed) + if(canBeChanged) { stageMap = { diff --git a/module/project/view/bug.html.php b/module/project/view/bug.html.php index 0826aa0d29..f7a151c82b 100644 --- a/module/project/view/bug.html.php +++ b/module/project/view/bug.html.php @@ -75,13 +75,13 @@
- id => ''), '', $disabled) . html::a(helper::createLink('bug', 'view', "bugID=$bug->id"), sprintf('%03d', $bug->id));?> + id => ''), '', $arrtibute) . html::a(helper::createLink('bug', 'view', "bugID=$bug->id"), sprintf('%03d', $bug->id));?> id);?> @@ -101,7 +101,7 @@ bug->resolutionList, $bug->resolution);?> id"; common::printIcon('bug', 'confirmBug', $params, $bug, 'list', 'confirm', '', 'iframe', true); diff --git a/module/project/view/kanban.html.php b/module/project/view/kanban.html.php index b692628edd..3f26e92642 100644 --- a/module/project/view/kanban.html.php +++ b/module/project/view/kanban.html.php @@ -18,7 +18,7 @@ $link = $this->createLink('task', 'export', "project=$projectID&orderBy=$orderBy&type=kanban"); if(common::hasPriv('task', 'export')) echo html::a($link, " " . $lang->task->export, '', "class='btn btn-link iframe export' data-width='700'"); ?> - +
@@ -199,7 +199,7 @@ id}&story={$story->id}&moduleID={$story->module}"; @@ -220,7 +220,7 @@ $lang->testcase->batchCreate = $lang->testcase->create; if($productID && $hasDBPriv) common::printIcon('testcase', 'batchCreate', "productID=$story->product&branch=$story->branch&moduleID=$story->module&storyID=$story->id", '', 'list', 'sitemap'); - if($changeAllowed and common::hasPriv('project', 'unlinkStory', $project)) + if($canBeChanged and common::hasPriv('project', 'unlinkStory', $project)) { $unlinkURL = $this->createLink('project', 'unlinkStory', "projectID=$project->id&storyID=$story->id&confirm=yes"); echo html::a("javascript:ajaxDelete(\"$unlinkURL\", \"storyList\", confirmUnlinkStory)", '', '', "class='btn' title='{$lang->project->unlinkStory}'"); diff --git a/module/project/view/storykanban.html.php b/module/project/view/storykanban.html.php index 07435189f3..79a2ebb2e4 100644 --- a/module/project/view/storykanban.html.php +++ b/module/project/view/storykanban.html.php @@ -10,7 +10,7 @@ ?> project->confirmUnlinkStory)?> - + app->user->account;

story->noStory;?> - + createLink('project', 'linkStory', "project=$project->id"), " " . $lang->project->linkStory, '', "class='btn btn-info'");?>

@@ -77,7 +77,7 @@ $account = $this->app->user->account;
story->priList, $story->pri);?> story->statusList[$story->status];?> - +
createLink('project', 'unlinkStory', "projectID=$projectID&story=$story->id"), "", 'hiddenwin', "title='{$lang->project->unlinkStory}'");?>
estimate . 'h ';?>
diff --git a/module/project/view/task.html.php b/module/project/view/task.html.php index 3671a0d335..3089da8a74 100644 --- a/module/project/view/task.html.php +++ b/module/project/view/task.html.php @@ -139,16 +139,16 @@ js::set('foldAll', $lang->project->treeLevel['root']); createLink('task', 'batchCreate', "project=$projectID" . (isset($moduleID) ? "&storyID=&moduleID=$moduleID" : '')); - if($changeAllowed and common::hasPriv('task', 'batchCreate')) echo html::a($link, " {$lang->task->batchCreate}", '', "class='btn btn btn-secondary'"); + if($canBeChanged and common::hasPriv('task', 'batchCreate')) echo html::a($link, " {$lang->task->batchCreate}", '', "class='btn btn btn-secondary'"); $link = $this->createLink('task', 'create', "project=$projectID" . (isset($moduleID) ? "&storyID=0&moduleID=$moduleID" : "")); - if($changeAllowed and common::hasPriv('task', 'create')) echo html::a($link, " {$lang->task->create}", '', "class='btn btn-primary'"); + if($canBeChanged and common::hasPriv('task', 'create')) echo html::a($link, " {$lang->task->create}", '', "class='btn btn-primary'"); ?> "; $link = $this->createLink('task', 'create', "project=$projectID" . (isset($moduleID) ? "&storyID=0&moduleID=$moduleID" : "")); - if($changeAllowed and common::hasPriv('task', 'create')) echo html::a($link, " {$lang->task->create} ", '', "class='btn btn-primary'"); + if($canBeChanged and common::hasPriv('task', 'create')) echo html::a($link, " {$lang->task->create} ", '', "class='btn btn-primary'"); ?>
team->totalHours;?> team->limited;?> actions;?>
hours . $lang->project->workHour;?> project->workHour;?> team->limitedList[$member->limited];?>
testtask->product);?> @@ -98,7 +98,7 @@ id", $task, 'list', 'sitemap'); common::printIcon('testtask', 'linkCase', "taskID=$task->id", $task, 'list', 'link'); diff --git a/module/project/view/view.html.php b/module/project/view/view.html.php index 7c47a1ab66..29cbf9bed6 100644 --- a/module/project/view/view.html.php +++ b/module/project/view/view.html.php @@ -102,7 +102,7 @@
- id", "  " . $lang->project->manageMembers, '', "class='text-muted'");?> + id", "  " . $lang->project->manageMembers, '', "class='text-muted'");?>
@@ -133,7 +133,7 @@
- id", "  " . $lang->doc->createLib, '', "class='text-muted iframe' data-width='1000px'");?> + id", "  " . $lang->doc->createLib, '', "class='text-muted iframe' data-width='1000px'");?>
diff --git a/module/release/view/browse.html.php b/module/release/view/browse.html.php index 73f0de5dcb..ff8213e84f 100644 --- a/module/release/view/browse.html.php +++ b/module/release/view/browse.html.php @@ -58,7 +58,7 @@
id"), sprintf('%03d', $release->id));?> @@ -79,7 +79,7 @@ " . $this->loadModel('flow')->getFieldValue($extendField, $release) . " id&type=story&link=true"), ' ', '', "class='btn' title='{$lang->release->linkStory}'"); if(common::hasPriv('release', 'linkBug') and $config->global->flow != 'onlyStory') echo html::a(inlink('view', "releaseID=$release->id&type=bug&link=true"), ' ', '', "class='btn' title='{$lang->release->linkBug}'"); diff --git a/module/release/view/view.html.php b/module/release/view/view.html.php index bfd784c9a2..074249bf1d 100644 --- a/module/release/view/view.html.php +++ b/module/release/view/view.html.php @@ -31,9 +31,9 @@
deleted and $changeAllowed) + if(!$release->deleted and $canBeChanged) { echo $this->buildOperateMenu($release, 'view'); @@ -66,7 +66,7 @@
' id='stories'> - +
id}, \"story\")", ' ' . $lang->release->linkStory, '', "class='btn btn-primary'");?>
@@ -80,7 +80,7 @@
- +
@@ -101,7 +101,7 @@ createLink('story', 'view', "storyID=$story->id", '', true);?>
- +
@@ -124,7 +124,7 @@
story->stageList[$story->stage];?> createLink('release', 'unlinkStory', "releaseID=$release->id&story=$story->id"); echo html::a("javascript:ajaxDelete(\"$unlinkURL\", \"storyList\", confirmUnlinkStory)", '', '', "class='btn' title='{$lang->release->unlinkStory}'"); @@ -136,7 +136,7 @@
- +
@@ -196,7 +196,7 @@ createLink('bug', 'view', "bugID=$bug->id", '', true);?>
- +
@@ -214,7 +214,7 @@
resolvedDate, 5, 11)?> createLink('release', 'unlinkBug', "releaseID=$release->id&bug=$bug->id"); echo html::a("javascript:ajaxDelete(\"$unlinkURL\", \"bugList\", confirmUnlinkBug)", '', '', "class='btn' title='{$lang->release->unlinkBug}'"); @@ -226,7 +226,7 @@
- +
@@ -284,7 +284,7 @@ createLink('bug', 'view', "bugID=$bug->id", '', true);?>
- +
@@ -305,7 +305,7 @@
openedDate?> createLink('release', 'unlinkBug', "releaseID=$release->id&bug=$bug->id&type=leftBug"); echo html::a("javascript:ajaxDelete(\"$unlinkURL\", \"leftBugList\", confirmUnlinkBug)", '', '', "class='btn' title='{$lang->release->unlinkBug}'"); @@ -317,7 +317,7 @@
diff --git a/module/testsuite/control.php b/module/testsuite/control.php index 7d8a9f912a..8b92010fe2 100644 --- a/module/testsuite/control.php +++ b/module/testsuite/control.php @@ -152,16 +152,16 @@ class testsuite extends control $this->view->position[] = $this->lang->testsuite->common; $this->view->position[] = $this->lang->testsuite->view; - $this->view->productID = $productID; - $this->view->suite = $suite; - $this->view->users = $this->loadModel('user')->getPairs('noclosed|noletter'); - $this->view->actions = $this->loadModel('action')->getList('testsuite', $suiteID); - $this->view->cases = $this->testsuite->getLinkedCases($suiteID, $sort, $pager); - $this->view->orderBy = $orderBy; - $this->view->pager = $pager; - $this->view->modules = $this->loadModel('tree')->getOptionMenu($suite->product, 'case'); - $this->view->branches = $this->loadModel('branch')->getPairs($suite->product, 'noempty'); - $this->view->changeAllowed = common::checkObjectChangeAllowed('testsuite', $suite); + $this->view->productID = $productID; + $this->view->suite = $suite; + $this->view->users = $this->loadModel('user')->getPairs('noclosed|noletter'); + $this->view->actions = $this->loadModel('action')->getList('testsuite', $suiteID); + $this->view->cases = $this->testsuite->getLinkedCases($suiteID, $sort, $pager); + $this->view->orderBy = $orderBy; + $this->view->pager = $pager; + $this->view->modules = $this->loadModel('tree')->getOptionMenu($suite->product, 'case'); + $this->view->branches = $this->loadModel('branch')->getPairs($suite->product, 'noempty'); + $this->view->canBeChanged = common::checkObjectChangeAllowed('testsuite', $suite); $this->display(); } diff --git a/module/testsuite/view/view.html.php b/module/testsuite/view/view.html.php index 9b35495548..d52eb0c603 100644 --- a/module/testsuite/view/view.html.php +++ b/module/testsuite/view/view.html.php @@ -29,7 +29,7 @@
deleted and $changeAllowed) + if(!$suite->deleted and $canBeChanged) { echo $this->buildOperateMenu($suite, 'view'); @@ -47,7 +47,7 @@
- + id&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}";?> @@ -97,7 +97,7 @@
stepNumber;?>
-

testcase->noCase;?> " . $lang->testtask->linkCase, '', "class='btn btn-info'");?>

+

testcase->noCase;?> " . $lang->testtask->linkCase, '', "class='btn btn-info'");?>

diff --git a/module/testtask/view/groupcase.html.php b/module/testtask/view/groupcase.html.php index 633d292a0b..c86e6afec1 100644 --- a/module/testtask/view/groupcase.html.php +++ b/module/testtask/view/groupcase.html.php @@ -76,7 +76,7 @@ results) ? html::a($this->createLink('testtask', 'results', "runID={$run->id}&caseID={$run->case}"), $run->results, '', "class='iframe'") : $run->results;?> stepNumber;?> - + id&caseID=$run->case&version=$run->caseVersion", '', 'list', 'play', '', 'runCase iframe', false, "data-width='95%'");?> case", '', 'list');?> view->root = $product; /* Determines whether an object is editable. */ - $changeAllowed = (empty($this->config->global->closedProductStatus) or $product->status != 'closed') ? true : false; + $canBeChanged = (empty($this->config->global->closedProductStatus) or $product->status != 'closed') ? true : false; } elseif(strpos($viewType, 'doc') !== false) { @@ -195,7 +195,7 @@ class tree extends control $this->view->parentModules = $parentModules; $this->view->branch = $branch; $this->view->tree = $this->tree->getProductStructure($rootID, $viewType); - $this->view->changeAllowed = isset($changeAllowed) ? $changeAllowed : true; + $this->view->canBeChanged = isset($canBeChanged) ? $canBeChanged : true; $this->display(); } @@ -219,7 +219,7 @@ class tree extends control $this->view->products = $products; /* Determines whether an object is editable. */ - $changeAllowed = (empty($this->config->global->closedProjectStatus) or $project->status != 'closed') ? true : false; + $canBeChanged = (empty($this->config->global->closedProjectStatus) or $project->status != 'closed') ? true : false; /* Set menu. */ $this->lang->set('menugroup.tree', 'project'); @@ -250,7 +250,7 @@ class tree extends control $this->view->parentModules = $parentModules; $this->view->currentModuleID = $currentModuleID; $this->view->tree = $this->tree->getTaskStructure($rootID, $productID); - $this->view->changeAllowed = $changeAllowed; + $this->view->canBeChanged = $canBeChanged; $this->display(); } diff --git a/module/tree/view/browse.html.php b/module/tree/view/browse.html.php index 4e3af61044..0bea1afa20 100644 --- a/module/tree/view/browse.html.php +++ b/module/tree/view/browse.html.php @@ -80,7 +80,7 @@ li.tree-item-story > .tree-actions .tree-action[data-type=delete]{display:none;} doc->manageType : $lang->tree->$manageChild;?>
- +
tree->syncFromProduct, '', "class='btn btn-sm btn-primary'")?>
@@ -159,7 +159,7 @@ li.tree-item-story > .tree-actions .tree-action[data-type=delete]{display:none;} - + goback, '', "class='btn btn-wide'");?> @@ -265,10 +265,10 @@ $(function() } }; - if() options.actions["sort"] = false; - if() options.actions["edit"] = false; - if() options.actions["delete"] = false; - if() options.actions["subModules"] = false; + if() options.actions["sort"] = false; + if() options.actions["edit"] = false; + if() options.actions["delete"] = false; + if() options.actions["subModules"] = false; var $tree = $('#modulesTree').tree(options); diff --git a/module/tree/view/browsetask.html.php b/module/tree/view/browsetask.html.php index 6c1c7f5cec..339e4bb891 100644 --- a/module/tree/view/browsetask.html.php +++ b/module/tree/view/browsetask.html.php @@ -112,7 +112,7 @@ li.story-item > .tree-actions .tree-action[data-type=delete]{display:none;} goback, '', "class='btn btn-wide'"); echo html::hidden('parentModuleID', $currentModuleID); echo html::hidden('maxOrder', $maxOrder); @@ -216,10 +216,10 @@ $(function() } }; - if() options.actions["sort"] = false; - if() options.actions["edit"] = false; - if() options.actions["delete"] = false; - if() options.actions["subModules"] = false; + if() options.actions["sort"] = false; + if() options.actions["edit"] = false; + if() options.actions["delete"] = false; + if() options.actions["subModules"] = false; var $tree = $('#modulesTree').tree(options);