From 97e2891c4ab41415fb6043a8a72e40b126a5c621 Mon Sep 17 00:00:00 2001 From: tianshujie98 Date: Mon, 16 Nov 2020 09:00:56 +0800 Subject: [PATCH 01/24] * Fix bug. --- module/story/model.php | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/module/story/model.php b/module/story/model.php index 33e4b79dca..157efbfb4f 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -1447,17 +1447,19 @@ class storyModel extends model $task->openedBy = $this->app->user->account; $task->openedDate = $now; - foreach($data->field as $field) + if(isset($data->field)) { - $task->$field = $story->$field; - - if($field == 'assignedTo') $task->assignedDate = $now; - if($field == 'spec') + foreach($data->field as $field) { - unset($task->$field); - $task->desc = $story->$field; - } + $task->$field = $story->$field; + if($field == 'assignedTo') $task->assignedDate = $now; + if($field == 'spec') + { + unset($task->$field); + $task->desc = $story->$field; + } + } } $this->dao->insert(TABLE_TASK)->data($task) From 5ca98d0eee62f452d8f81e49d1c9075a8fee7754 Mon Sep 17 00:00:00 2001 From: holan20180123 <56391770@qq.com> Date: Mon, 16 Nov 2020 09:13:06 +0800 Subject: [PATCH 02/24] * Finish task #8194. --- module/common/model.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/module/common/model.php b/module/common/model.php index f64440276f..ca78684739 100644 --- a/module/common/model.php +++ b/module/common/model.php @@ -1863,7 +1863,8 @@ EOD; } /* Check the project is closed. */ - if(strpos('story|bug|testtask', $module) === false and !empty($object->project) and is_numeric($object->project) and !empty($config->global->closedProjectStatus)) + $productModuleList = array('story', 'bug', 'testtask'); + if(!in_array($module, $productModuleList) and !empty($object->project) and is_numeric($object->project) and !empty($config->global->closedProjectStatus)) { $project = $app->control->loadModel('project')->getByID($object->project); if($project->status == 'closed') return false; From fdc986d12f61543deab162187e970dd399769fa5 Mon Sep 17 00:00:00 2001 From: tianshujie98 Date: Mon, 16 Nov 2020 09:18:58 +0800 Subject: [PATCH 03/24] * Edit comment. --- module/job/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/job/model.php b/module/job/model.php index e97931de37..d2663553a2 100644 --- a/module/job/model.php +++ b/module/job/model.php @@ -43,7 +43,7 @@ class jobModel extends model } /** - * Get list by triggerType field + * Get list by triggerType field. * * @param string $triggerType * @param array $repoIdList From 07030443ccc6e64352811d32949dbcc87a2d6b8b Mon Sep 17 00:00:00 2001 From: qiyu-xie Date: Mon, 16 Nov 2020 09:42:32 +0800 Subject: [PATCH 04/24] * Fix bug. --- module/job/view/edit.html.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/module/job/view/edit.html.php b/module/job/view/edit.html.php index 0baae7783a..082f31d7f7 100644 --- a/module/job/view/edit.html.php +++ b/module/job/view/edit.html.php @@ -122,6 +122,14 @@ +
+ job->paramName; ?> + + job->paramValue; ?> + + + +
From 0c1c00c1607b2bf982720efd28f1699b7330b5ee Mon Sep 17 00:00:00 2001 From: qiyu-xie Date: Mon, 16 Nov 2020 10:12:38 +0800 Subject: [PATCH 05/24] * View todo start-end times display in one line. --- module/todo/view/view.html.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/todo/view/view.html.php b/module/todo/view/view.html.php index edb8be36cf..01146e73a6 100644 --- a/module/todo/view/view.html.php +++ b/module/todo/view/view.html.php @@ -141,7 +141,7 @@ - + From c0e6591afedc0736b12b1485adf29b6df47e9186 Mon Sep 17 00:00:00 2001 From: tianshujie98 Date: Mon, 16 Nov 2020 10:55:41 +0800 Subject: [PATCH 06/24] * Adjust code style. --- module/project/js/story.js | 15 +++++++++++++++ module/project/view/story.html.php | 2 ++ module/story/model.php | 6 ------ 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/module/project/js/story.js b/module/project/js/story.js index a192075d65..2279deb81d 100644 --- a/module/project/js/story.js +++ b/module/project/js/story.js @@ -40,6 +40,21 @@ $(function() }); }) + /* Judge required. */ + $('#batchToTask #submit').on('click', function () + { + var message = ''; + if($('#batchToTask #type').val() == '') message = typeError; + + if($('#batchToTask #hourPointValue').val() == '') message += workingHourError; + + if(message) + { + alert(message); + return false; + } + }) + $('.sorter-false a').unwrap(); }); diff --git a/module/project/view/story.html.php b/module/project/view/story.html.php index 4807371c69..b880282c8b 100644 --- a/module/project/view/story.html.php +++ b/module/project/view/story.html.php @@ -17,6 +17,8 @@ cookie->storyProductParam);?> cookie->storyBranchParam));?> project->confirmUnlinkStory)?> +lang->error->notempty, $this->lang->task->type))?> +lang->error->notempty, $this->lang->workingHour))?> $story):?> createLink('story', 'view', "storyID=$story->id&version=$story->version&from=project¶m=$project->id"); - $totalEstimate += $story->estimate; + $storyLink = $this->createLink('story', 'view', "storyID=$story->id&version=$story->version&from=project¶m=$project->id"); + $totalEstimate += $story->estimate; ?> diff --git a/module/doc/view/create.html.php b/module/doc/view/create.html.php index d0438e8ff9..48a579d74e 100644 --- a/module/doc/view/create.html.php +++ b/module/doc/view/create.html.php @@ -86,10 +86,10 @@ diff --git a/module/doc/view/edit.html.php b/module/doc/view/edit.html.php index b73426ff4f..e9ce3e1968 100644 --- a/module/doc/view/edit.html.php +++ b/module/doc/view/edit.html.php @@ -63,10 +63,10 @@ diff --git a/module/testtask/view/create.html.php b/module/testtask/view/create.html.php index 9dd346c606..810da61349 100644 --- a/module/testtask/view/create.html.php +++ b/module/testtask/view/create.html.php @@ -87,10 +87,10 @@ From d974dbf169bb4af71b702817a13199bcd2680b38 Mon Sep 17 00:00:00 2001 From: tianshujie98 Date: Tue, 17 Nov 2020 13:19:49 +0800 Subject: [PATCH 18/24] * Finish task #8413. --- module/task/js/start.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/module/task/js/start.js b/module/task/js/start.js index 6242bbbcf8..034f6c87a7 100644 --- a/module/task/js/start.js +++ b/module/task/js/start.js @@ -11,7 +11,10 @@ function checkLeft() alert(noticeTaskStart); result = false; } - else result = confirm(confirmFinish); + else + { + result = confirm(confirmFinish); + } if(!result) setTimeout(function() {$.enableForm()}, 50); return result; } From ff1e2ac04b131ab105df07192e58570e191fc93a Mon Sep 17 00:00:00 2001 From: tianshujie98 Date: Tue, 17 Nov 2020 13:32:44 +0800 Subject: [PATCH 19/24] * Finsh task #8411. --- module/story/control.php | 5 ++--- module/story/lang/de.php | 1 + module/story/lang/en.php | 1 + module/story/lang/fr.php | 1 + module/story/lang/vi.php | 1 + module/story/lang/zh-cn.php | 1 + 6 files changed, 7 insertions(+), 3 deletions(-) diff --git a/module/story/control.php b/module/story/control.php index 9d126604b0..75044e78c6 100644 --- a/module/story/control.php +++ b/module/story/control.php @@ -1063,7 +1063,7 @@ class story extends control } /** - * Batch conversion of stories into tasks. + * Batch stories convert to tasks. * * @param int $projectID * @access public @@ -1076,8 +1076,7 @@ class story extends control $this->story->batchToTask($projectID); if(dao::isError()) die(js::error(dao::getError()) . js::locate('back')); - - if(!dao::isError()) die(js::alert($this->lang->saveSuccess) . js::locate($this->createLink('project', 'task', "projectID=$projectID"), 'parent')); + die(js::alert($this->lang->story->successToTask) . js::locate($this->createLink('project', 'task', "projectID=$projectID"), 'parent')); } } diff --git a/module/story/lang/de.php b/module/story/lang/de.php index b2b835f7bb..09ec423fa3 100644 --- a/module/story/lang/de.php +++ b/module/story/lang/de.php @@ -64,6 +64,7 @@ $lang->story->batchToTask = 'Batch Convert to Task'; $lang->story->skipStory = '%s is a parent story. It cannot be closed.'; $lang->story->closedStory = 'Story %s is closed and will not be closed.'; $lang->story->batchToTaskTips = "This action will create a task with the same name as the selected {$lang->storyCommon} and link {$lang->storyCommon} to the task. The closed {$lang->storyCommon} will not be converted into tasks."; +$lang->story->successToTask = "Converted to task." $lang->story->common = 'Story'; $lang->story->id = 'ID'; diff --git a/module/story/lang/en.php b/module/story/lang/en.php index 145611d3a1..d62f2c7b17 100644 --- a/module/story/lang/en.php +++ b/module/story/lang/en.php @@ -64,6 +64,7 @@ $lang->story->batchToTask = 'Batch Convert to Task'; $lang->story->skipStory = '%s is a parent story. It cannot be closed.'; $lang->story->closedStory = 'Story %s is closed and will not be closed.'; $lang->story->batchToTaskTips = "This action will create a task with the same name as the selected {$lang->storyCommon} and link {$lang->storyCommon} to the task. The closed {$lang->storyCommon} will not be converted into tasks."; +$lang->story->successToTask = "Converted to task." $lang->story->common = 'Story'; $lang->story->id = 'ID'; diff --git a/module/story/lang/fr.php b/module/story/lang/fr.php index 93285e1ce5..115be96898 100644 --- a/module/story/lang/fr.php +++ b/module/story/lang/fr.php @@ -64,6 +64,7 @@ $lang->story->batchToTask = 'Batch Convert to Task'; $lang->story->skipStory = '%s is a parent story. It cannot be closed.'; $lang->story->closedStory = 'Story %s is closed and will not be closed.'; $lang->story->batchToTaskTips = "This action will create a task with the same name as the selected {$lang->storyCommon} and link {$lang->storyCommon} to the task. The closed {$lang->storyCommon} will not be converted into tasks."; +$lang->story->successToTask = "Converted to task." $lang->story->common = 'Story'; $lang->story->id = 'ID'; diff --git a/module/story/lang/vi.php b/module/story/lang/vi.php index af2feee8de..9b9a2b80e4 100644 --- a/module/story/lang/vi.php +++ b/module/story/lang/vi.php @@ -64,6 +64,7 @@ $lang->story->batchToTask = 'Batch Convert to Task'; $lang->story->skipStory = '%s is a parent story. It cannot be closed.'; $lang->story->closedStory = 'Story %s is closed and will not be closed.'; $lang->story->batchToTaskTips = "This action will create a task with the same name as the selected {$lang->storyCommon} and link {$lang->storyCommon} to the task. The closed {$lang->storyCommon} will not be converted into tasks."; +$lang->story->successToTask = "Converted to task." $lang->story->common = 'Câu chuyện'; $lang->story->id = 'ID'; diff --git a/module/story/lang/zh-cn.php b/module/story/lang/zh-cn.php index 6844fba9a9..c3d0b931e9 100644 --- a/module/story/lang/zh-cn.php +++ b/module/story/lang/zh-cn.php @@ -64,6 +64,7 @@ $lang->story->batchToTask = '批量转任务'; $lang->story->skipStory = '需求:%s 为父需求,将不会被关闭。'; $lang->story->closedStory = '需求:%s 已关闭,将不会被关闭。'; $lang->story->batchToTaskTips = "此操作会创建与所选{$lang->storyCommon}同名的任务,并将{$lang->storyCommon}关联到任务中,已关闭的需求不会转为任务。"; +$lang->story->successToTask = '批量转任务成功'; $lang->story->common = $lang->storyCommon; $lang->story->id = '编号'; From 983927b6b94bc38658143b1dcb48cdf1b9d5d858 Mon Sep 17 00:00:00 2001 From: hufangzhou <746775970@qq.com> Date: Tue, 17 Nov 2020 13:37:25 +0800 Subject: [PATCH 20/24] * Finish task#8395. --- module/extension/lang/de.php | 2 +- module/extension/lang/en.php | 2 +- module/extension/lang/fr.php | 2 +- module/extension/lang/vi.php | 2 +- module/extension/lang/zh-cn.php | 2 +- module/extension/lang/zh-tw.php | 2 +- module/extension/model.php | 12 ++++++------ module/extension/view/browse.html.php | 11 +++++------ 8 files changed, 17 insertions(+), 18 deletions(-) diff --git a/module/extension/lang/de.php b/module/extension/lang/de.php index f692487ef2..d19f603477 100644 --- a/module/extension/lang/de.php +++ b/module/extension/lang/de.php @@ -51,7 +51,7 @@ $lang->extension->downloads = 'Downloads'; $lang->extension->compatible = 'Kompatibilität'; $lang->extension->grade = 'Wertung'; $lang->extension->depends = 'Benötigt'; -$lang->extension->expireDate = 'Verfällt'; +$lang->extension->expiredDate = 'Verfällt'; $lang->extension->zentaoCompatible = 'Kompatible Version'; $lang->extension->installedTime = 'Installationszeit'; $lang->extension->life = 'lifetime'; diff --git a/module/extension/lang/en.php b/module/extension/lang/en.php index b2c0feb24c..5b0ca26401 100644 --- a/module/extension/lang/en.php +++ b/module/extension/lang/en.php @@ -51,7 +51,7 @@ $lang->extension->downloads = 'Downloads'; $lang->extension->compatible = 'Compatibility'; $lang->extension->grade = 'Score'; $lang->extension->depends = 'Dependency'; -$lang->extension->expireDate = 'Expire'; +$lang->extension->expiredDate = 'Expire'; $lang->extension->zentaoCompatible = 'Compatible Version'; $lang->extension->installedTime = 'Installed Time'; $lang->extension->life = 'lifetime'; diff --git a/module/extension/lang/fr.php b/module/extension/lang/fr.php index 2ac2c48056..b383567c32 100644 --- a/module/extension/lang/fr.php +++ b/module/extension/lang/fr.php @@ -51,7 +51,7 @@ $lang->extension->downloads = 'Téléchargements'; $lang->extension->compatible = 'Compatibilité'; $lang->extension->grade = 'Score'; $lang->extension->depends = 'Dépendence'; -$lang->extension->expireDate = 'Expire le'; +$lang->extension->expiredDate = 'Expire le'; $lang->extension->zentaoCompatible = 'Version Compatible'; $lang->extension->installedTime = 'Date Installation'; $lang->extension->life = 'lifetime'; diff --git a/module/extension/lang/vi.php b/module/extension/lang/vi.php index 01c7a938c4..9336613174 100644 --- a/module/extension/lang/vi.php +++ b/module/extension/lang/vi.php @@ -51,7 +51,7 @@ $lang->extension->downloads = 'Downloads'; $lang->extension->compatible = 'Compatibility'; $lang->extension->grade = 'Điểm'; $lang->extension->depends = 'Dependency'; -$lang->extension->expireDate = 'Expire'; +$lang->extension->expiredDate = 'Expire'; $lang->extension->zentaoCompatible = 'Compatible Version'; $lang->extension->installedTime = 'Installed Time'; $lang->extension->life = 'lifetime'; diff --git a/module/extension/lang/zh-cn.php b/module/extension/lang/zh-cn.php index a157584c4d..6f64bbc913 100644 --- a/module/extension/lang/zh-cn.php +++ b/module/extension/lang/zh-cn.php @@ -51,7 +51,7 @@ $lang->extension->downloads = '下载量'; $lang->extension->compatible = '兼容性'; $lang->extension->grade = '评分'; $lang->extension->depends = '依赖'; -$lang->extension->expireDate = '到期日期'; +$lang->extension->expiredDate = '到期日期'; $lang->extension->zentaoCompatible = '适用版本'; $lang->extension->installedTime = '安装时间'; $lang->extension->life = '终身'; diff --git a/module/extension/lang/zh-tw.php b/module/extension/lang/zh-tw.php index 9298092656..7b3ea70b8f 100644 --- a/module/extension/lang/zh-tw.php +++ b/module/extension/lang/zh-tw.php @@ -51,7 +51,7 @@ $lang->extension->downloads = '下載量'; $lang->extension->compatible = '兼容性'; $lang->extension->grade = '評分'; $lang->extension->depends = '依賴'; -$lang->extension->expireDate = '到期日期'; +$lang->extension->expiredDate = '到期日期'; $lang->extension->zentaoCompatible = '適用版本'; $lang->extension->installedTime = '安裝時間'; $lang->extension->life = '終身'; diff --git a/module/extension/model.php b/module/extension/model.php index bf05963faf..9ab0ddfcc3 100644 --- a/module/extension/model.php +++ b/module/extension/model.php @@ -886,16 +886,16 @@ class extensionModel extends model /** * Get extension expire date. - * + * * @param int $extension * @access public - * @return void + * @return string */ public function getExpireDate($extension) { $licencePath = $this->app->getConfigRoot() . 'license/'; $today = date('Y-m-d'); - $expireDate = ''; + $expiredDate = ''; $licenceOrderFiles = glob($licencePath . 'order*' . $extension->code . $extension->version . '.txt'); foreach($licenceOrderFiles as $licenceOrderFile) @@ -908,14 +908,14 @@ class extensionModel extends model if($order->type == 'demo') $days = 31; if($order->type == 'year') $days = 365; $startDate = $order->paidDate != '0000-00-00 00:00:00' ? $order->paidDate : $order->createdDate; - if($days) $expireDate = date('Y-m-d', strtotime($startDate) + $days * 24 * 3600); + if($days) $expiredDate = date('Y-m-d', strtotime($startDate) + $days * 24 * 3600); } else { - $expireDate = $order->type; + $expiredDate = $order->type; } } - return $expireDate; + return $expiredDate; } } diff --git a/module/extension/view/browse.html.php b/module/extension/view/browse.html.php index 59bed96653..743a7b6952 100644 --- a/module/extension/view/browse.html.php +++ b/module/extension/view/browse.html.php @@ -54,14 +54,13 @@ extension->version}: {$extension->version} "; echo "{$lang->extension->author}: {$extension->author} "; - $expireDate = $this->extension->getExpireDate($extension); - - if(!empty($expireDate)) + $expiredDate = $this->extension->getExpireDate($extension); + if(!empty($expiredDate)) { - echo $lang->extension->expireDate . ': '; - if($expireDate != 'life') echo "{$expireDate}"; - else echo "{$lang->extension->life}"; + echo $lang->extension->expiredDate . ': '; + $expiredDate != 'life' ? echo "{$expiredDate}" : echo "{$lang->extension->life}"; } + ?> From 9d237be691d0906a223f3f0c9ba4d94d8c54a71e Mon Sep 17 00:00:00 2001 From: qiyu-xie Date: Tue, 17 Nov 2020 13:21:31 +0800 Subject: [PATCH 21/24] * Finish task#8380. --- module/bug/model.php | 1 + module/story/control.php | 1 + 2 files changed, 2 insertions(+) diff --git a/module/bug/model.php b/module/bug/model.php index 4643862271..3c9f5dad23 100644 --- a/module/bug/model.php +++ b/module/bug/model.php @@ -1606,6 +1606,7 @@ class bugModel extends model * Get bugs of a story. * * @param int $storyID + * @param int $projectID * @access public * @return array */ diff --git a/module/story/control.php b/module/story/control.php index 75044e78c6..e3a5347265 100644 --- a/module/story/control.php +++ b/module/story/control.php @@ -1234,6 +1234,7 @@ class story extends control * Bugs of a story. * * @param int $storyID + * @param int $projectID * @access public * @return void */ From b100ddeb0d58857c494e788ad451921660311bcb Mon Sep 17 00:00:00 2001 From: qiyu-xie Date: Tue, 17 Nov 2020 13:45:36 +0800 Subject: [PATCH 22/24] * Finish task#8398. --- module/job/view/create.html.php | 12 ++++++------ module/job/view/edit.html.php | 24 ++++++++++++------------ 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/module/job/view/create.html.php b/module/job/view/create.html.php index 57f0345e31..b464750d7d 100644 --- a/module/job/view/create.html.php +++ b/module/job/view/create.html.php @@ -90,12 +90,12 @@ diff --git a/module/job/view/edit.html.php b/module/job/view/edit.html.php index 082f31d7f7..aadc358efd 100644 --- a/module/job/view/edit.html.php +++ b/module/job/view/edit.html.php @@ -114,21 +114,21 @@ From 526d2c1e757157095e4460ad5da8a1c86c7463f9 Mon Sep 17 00:00:00 2001 From: hufangzhou <746775970@qq.com> Date: Tue, 17 Nov 2020 13:47:16 +0800 Subject: [PATCH 23/24] * Finish task#8416. --- module/task/control.php | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/module/task/control.php b/module/task/control.php index cb5aa720ac..ccbce0d2af 100644 --- a/module/task/control.php +++ b/module/task/control.php @@ -738,16 +738,12 @@ class task extends control die(js::locate($this->createLink('task', 'view', "taskID=$taskID"), 'parent')); } - $users = $this->loadModel('user')->getPairs('noletter'); - $members = $this->loadModel('project')->getTeamMemberPairs($task->project, 'nodeleted'); - $assignedTo = in_array(zget($this->app->user->account, $users), $members) === TRUE ? $this->app->user->account : ''; - $this->view->title = $this->view->project->name . $this->lang->colon .$this->lang->task->start; $this->view->position[] = $this->lang->task->start; - $this->view->users = $users; - $this->view->members = $members; - $this->view->assignedTo = $task->assignedTo == '' ? $assignedTo : $task->assignedTo; + $this->view->users = $this->loadModel('user')->getPairs('noletter'); + $this->view->members = $this->loadModel('project')->getTeamMemberPairs($task->project, 'nodeleted'); + $this->view->assignedTo = $task->assignedTo == '' ? $this->app->user->account : $task->assignedTo; $this->display(); } From bb34dfe79b36cb495a266dc863851a3bcf8e67dc Mon Sep 17 00:00:00 2001 From: holan20180123 <56391770@qq.com> Date: Tue, 17 Nov 2020 14:04:50 +0800 Subject: [PATCH 24/24] * Finish task #8378. --- module/bug/view/browse.html.php | 6 +++--- module/bug/view/view.html.php | 2 +- module/common/model.php | 4 ++-- module/custom/control.php | 4 ++-- module/custom/lang/de.php | 8 ++++---- module/custom/lang/en.php | 8 ++++---- module/custom/lang/fr.php | 8 ++++---- module/custom/lang/vi.php | 8 ++++---- module/custom/lang/zh-cn.php | 8 ++++---- module/custom/lang/zh-tw.php | 8 ++++---- module/custom/view/product.html.php | 4 ++-- module/custom/view/project.html.php | 4 ++-- module/doc/control.php | 8 ++++---- module/product/view/browse.html.php | 6 +++--- module/product/view/roadmap.html.php | 2 +- module/productplan/view/browse.html.php | 4 ++-- module/release/view/browse.html.php | 4 ++-- module/story/view/view.html.php | 2 +- module/testcase/view/browse.html.php | 2 +- module/testcase/view/caseheader.html.php | 4 ++-- module/testcase/view/groupcase.html.php | 2 +- module/testreport/control.php | 4 ++-- module/testsuite/view/browse.html.php | 4 ++-- module/testtask/view/browse.html.php | 4 ++-- module/testtask/view/browseunits.html.php | 2 +- module/tree/control.php | 4 ++-- 26 files changed, 62 insertions(+), 62 deletions(-) diff --git a/module/bug/view/browse.html.php b/module/bug/view/browse.html.php index 7b7d20c1df..150243cbfc 100644 --- a/module/bug/view/browse.html.php +++ b/module/bug/view/browse.html.php @@ -117,7 +117,7 @@ $currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($brow ?> - config->global->closedProductStatus) or $product->status != 'closed'):?> + config->CRProduct) or $product->status != 'closed'):?> " . $lang->bug->batchCreate, '', "class='btn btn-secondary'"); @@ -189,7 +189,7 @@ $currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($brow

bug->noBug;?> - config->global->closedProductStatus) or $product->status != 'closed') and common::hasPriv('bug', 'create')):?> + config->CRProduct) or $product->status != 'closed') and common::hasPriv('bug', 'create')):?> createLink('bug', 'create', "productID=$productID&branch=$branch&extra=moduleID=$moduleID"), " " . $lang->bug->create, '', "class='btn btn-info'");?>

@@ -211,7 +211,7 @@ $currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($brow $widths = $this->datatable->setFixedFieldWidth($setting); $columns = 0; - $canBeChanged = (empty($config->global->closedProductStatus) or $product->status != 'closed'); + $canBeChanged = (!empty($config->CRProduct) or $product->status != 'closed'); $canBatchEdit = ($canBeChanged and common::hasPriv('bug', 'batchEdit')); $canBatchConfirm = ($canBeChanged and common::hasPriv('bug', 'batchConfirm')); $canBatchClose = common::hasPriv('bug', 'batchClose'); diff --git a/module/bug/view/view.html.php b/module/bug/view/view.html.php index a79713b707..540516b9cb 100644 --- a/module/bug/view/view.html.php +++ b/module/bug/view/view.html.php @@ -30,7 +30,7 @@
- config->global->closedProductStatus) or $product->status != 'closed'):?> + config->CRProduct) or $product->status != 'closed'):?> product}&branch={$bug->branch}&extra=moduleID={$bug->module}", "" . $lang->bug->create, '', "class='btn btn-primary'"); ?>
diff --git a/module/common/model.php b/module/common/model.php index ca78684739..aed653968a 100644 --- a/module/common/model.php +++ b/module/common/model.php @@ -1855,7 +1855,7 @@ EOD; global $app, $config; /* Check the product is closed. */ - if(!empty($object->product) and is_numeric($object->product) and !empty($config->global->closedProductStatus)) + if(!empty($object->product) and is_numeric($object->product) and empty($config->CRProduct)) { $productID = trim($object->product, ','); $product = $app->control->loadModel('product')->getByID($productID); @@ -1864,7 +1864,7 @@ EOD; /* Check the project is closed. */ $productModuleList = array('story', 'bug', 'testtask'); - if(!in_array($module, $productModuleList) and !empty($object->project) and is_numeric($object->project) and !empty($config->global->closedProjectStatus)) + if(!in_array($module, $productModuleList) and !empty($object->project) and is_numeric($object->project) and empty($config->CRProject)) { $project = $app->control->loadModel('project')->getByID($object->project); if($project->status == 'closed') return false; diff --git a/module/custom/control.php b/module/custom/control.php index 903b0edf79..0d1ce6e3b9 100644 --- a/module/custom/control.php +++ b/module/custom/control.php @@ -357,7 +357,7 @@ class custom extends control { if($_POST) { - $this->loadModel('setting')->setItem('system.common.global.closedProjectStatus', $this->post->project); + $this->loadModel('setting')->setItem('system.common.CRProject', $this->post->project); $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'reload')); } @@ -377,7 +377,7 @@ class custom extends control { if($_POST) { - $this->loadModel('setting')->setItem('system.common.global.closedProductStatus', $this->post->product); + $this->loadModel('setting')->setItem('system.common.CRProduct', $this->post->product); $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'reload')); } diff --git a/module/custom/lang/de.php b/module/custom/lang/de.php index 6cf9a0d17f..00ca85b3c4 100644 --- a/module/custom/lang/de.php +++ b/module/custom/lang/de.php @@ -153,11 +153,11 @@ $lang->custom->page = ' Page'; $lang->custom->scoreStatus[1] = 'On'; $lang->custom->scoreStatus[0] = 'Off'; -$lang->custom->closedProjectStatus[1] = 'Change Forbidden'; -$lang->custom->closedProjectStatus[0] = 'Change Allowed'; +$lang->custom->CRProject[1] = 'Change Forbidden'; +$lang->custom->CRProject[0] = 'Change Allowed'; -$lang->custom->closedProductStatus[1] = 'Change Forbidden'; -$lang->custom->closedProductStatus[0] = 'Change Allowed'; +$lang->custom->CRProduct[1] = 'Change Forbidden'; +$lang->custom->CRProduct[0] = 'Change Allowed'; $lang->custom->moduleName['product'] = $lang->productCommon; $lang->custom->moduleName['productplan'] = 'Plan'; diff --git a/module/custom/lang/en.php b/module/custom/lang/en.php index d46abe9390..b498f8c401 100644 --- a/module/custom/lang/en.php +++ b/module/custom/lang/en.php @@ -153,11 +153,11 @@ $lang->custom->page = ' Page'; $lang->custom->scoreStatus[1] = 'On'; $lang->custom->scoreStatus[0] = 'Off'; -$lang->custom->closedProjectStatus[1] = 'Change Forbidden'; -$lang->custom->closedProjectStatus[0] = 'Change Allowed'; +$lang->custom->CRProject[1] = 'Change Forbidden'; +$lang->custom->CRProject[0] = 'Change Allowed'; -$lang->custom->closedProductStatus[1] = 'Change Forbidden'; -$lang->custom->closedProductStatus[0] = 'Change Allowed'; +$lang->custom->CRProduct[1] = 'Change Forbidden'; +$lang->custom->CRProduct[0] = 'Change Allowed'; $lang->custom->moduleName['product'] = $lang->productCommon; $lang->custom->moduleName['productplan'] = 'Plan'; diff --git a/module/custom/lang/fr.php b/module/custom/lang/fr.php index 1a3dc44bd5..8553c5fe0e 100644 --- a/module/custom/lang/fr.php +++ b/module/custom/lang/fr.php @@ -153,11 +153,11 @@ $lang->custom->page = ' Page'; $lang->custom->scoreStatus[1] = 'On'; $lang->custom->scoreStatus[0] = 'Off'; -$lang->custom->closedProjectStatus[1] = 'Change Forbidden'; -$lang->custom->closedProjectStatus[0] = 'Change Allowed'; +$lang->custom->CRProject[1] = 'Change Forbidden'; +$lang->custom->CRProject[0] = 'Change Allowed'; -$lang->custom->closedProductStatus[1] = 'Change Forbidden'; -$lang->custom->closedProductStatus[0] = 'Change Allowed'; +$lang->custom->CRProduct[1] = 'Change Forbidden'; +$lang->custom->CRProduct[0] = 'Change Allowed'; $lang->custom->moduleName['product'] = $lang->productCommon; $lang->custom->moduleName['productplan'] = 'Plan'; diff --git a/module/custom/lang/vi.php b/module/custom/lang/vi.php index 701bf485e0..2bb76b482d 100644 --- a/module/custom/lang/vi.php +++ b/module/custom/lang/vi.php @@ -153,11 +153,11 @@ $lang->custom->page = ''; $lang->custom->scoreStatus[1] = 'On'; $lang->custom->scoreStatus[0] = 'Off'; -$lang->custom->closedProjectStatus[1] = 'Change Forbidden'; -$lang->custom->closedProjectStatus[0] = 'Change Allowed'; +$lang->custom->CRProject[1] = 'Change Forbidden'; +$lang->custom->CRProject[0] = 'Change Allowed'; -$lang->custom->closedProductStatus[1] = 'Change Forbidden'; -$lang->custom->closedProductStatus[0] = 'Change Allowed'; +$lang->custom->CRProduct[1] = 'Change Forbidden'; +$lang->custom->CRProduct[0] = 'Change Allowed'; $lang->custom->moduleName['product'] = $lang->productCommon; $lang->custom->moduleName['productplan'] = 'Kế hoạch'; diff --git a/module/custom/lang/zh-cn.php b/module/custom/lang/zh-cn.php index 86bbbe20d4..7b492bc642 100644 --- a/module/custom/lang/zh-cn.php +++ b/module/custom/lang/zh-cn.php @@ -153,11 +153,11 @@ $lang->custom->page = '页面'; $lang->custom->scoreStatus[1] = '开启'; $lang->custom->scoreStatus[0] = '关闭'; -$lang->custom->closedProjectStatus[1] = '禁止修改'; -$lang->custom->closedProjectStatus[0] = '允许修改'; +$lang->custom->CRProject[1] = '禁止修改'; +$lang->custom->CRProject[0] = '允许修改'; -$lang->custom->closedProductStatus[1] = '禁止修改'; -$lang->custom->closedProductStatus[0] = '允许修改'; +$lang->custom->CRProduct[1] = '禁止修改'; +$lang->custom->CRProduct[0] = '允许修改'; $lang->custom->moduleName['product'] = $lang->productCommon; $lang->custom->moduleName['productplan'] = '计划'; diff --git a/module/custom/lang/zh-tw.php b/module/custom/lang/zh-tw.php index f08b4a3b39..edf42f5035 100644 --- a/module/custom/lang/zh-tw.php +++ b/module/custom/lang/zh-tw.php @@ -153,11 +153,11 @@ $lang->custom->page = '頁面'; $lang->custom->scoreStatus[1] = '開啟'; $lang->custom->scoreStatus[0] = '關閉'; -$lang->custom->closedProjectStatus[1] = '禁止修改'; -$lang->custom->closedProjectStatus[0] = '允許修改'; +$lang->custom->CRProject[1] = '禁止修改'; +$lang->custom->CRProject[0] = '允許修改'; -$lang->custom->closedProductStatus[1] = '禁止修改'; -$lang->custom->closedProductStatus[0] = '允許修改'; +$lang->custom->CRProduct[1] = '禁止修改'; +$lang->custom->CRProduct[0] = '允許修改'; $lang->custom->moduleName['product'] = $lang->productCommon; $lang->custom->moduleName['productplan'] = '計劃'; diff --git a/module/custom/view/product.html.php b/module/custom/view/product.html.php index 716c377e09..b1c064d45b 100644 --- a/module/custom/view/product.html.php +++ b/module/custom/view/product.html.php @@ -21,8 +21,8 @@ diff --git a/module/custom/view/project.html.php b/module/custom/view/project.html.php index 735bc35510..73b00ed52e 100644 --- a/module/custom/view/project.html.php +++ b/module/custom/view/project.html.php @@ -21,8 +21,8 @@ diff --git a/module/doc/control.php b/module/doc/control.php index 1199c0d555..5f0cdc16e9 100644 --- a/module/doc/control.php +++ b/module/doc/control.php @@ -756,8 +756,8 @@ class doc extends control /* Determines whether an object is editable. */ $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($type == 'product' and empty($this->config->CRProduct) and $object->status == 'closed') $canBeChanged = false; + if($type == 'project' and empty($this->config->CRProject) and $object->status == 'closed') $canBeChanged = false; /* According the from, set menus. */ if($this->from == 'product') @@ -856,8 +856,8 @@ class doc extends control /* Determines whether an object is editable. */ $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($type == 'product' and empty($this->config->CRProduct) and $object->status == 'closed') $canBeChanged = false; + if($type == 'project' and empty($this->config->CRProject) and $object->status == 'closed') $canBeChanged = false; if($from == 'product') { diff --git a/module/product/view/browse.html.php b/module/product/view/browse.html.php index 8a4d07e12f..5b30688c39 100644 --- a/module/product/view/browse.html.php +++ b/module/product/view/browse.html.php @@ -94,7 +94,7 @@ js::set('foldAll', $lang->project->treeLevel['root']); ?> - config->global->closedProductStatus) or $product->status != 'closed'):?> + config->CRProduct) or $product->status != 'closed'):?> createLink('story', 'batchCreate', "productID=$productID&branch=$branch&moduleID=$moduleID"), " {$lang->story->batchCreate}", '', "class='btn btn btn-secondary'");?> project->treeLevel['root']);

story->noStory;?> - config->global->closedProductStatus) or $product->status != 'closed') and common::hasPriv('story', 'create')):?> + config->CRProduct) or $product->status != 'closed') and common::hasPriv('story', 'create')):?> createLink('story', 'create', "productID={$productID}&branch={$branch}&moduleID={$moduleID}"), " " . $lang->story->create, '', "class='btn btn-info'");?>

@@ -189,7 +189,7 @@ js::set('foldAll', $lang->project->treeLevel['root']); $widths = $this->datatable->setFixedFieldWidth($setting); $columns = 0; - $canBeChanged = (empty($config->global->closedProductStatus) or $product->status != 'closed'); + $canBeChanged = (!empty($config->CRProduct) 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 = ($canBeChanged and common::hasPriv('story', 'batchReview')); diff --git a/module/product/view/roadmap.html.php b/module/product/view/roadmap.html.php index 4fdeee1b9c..90ebd428d0 100644 --- a/module/product/view/roadmap.html.php +++ b/module/product/view/roadmap.html.php @@ -41,7 +41,7 @@

release->noRelease;?> - config->global->closedProductStatus) or $product->status != 'closed') and common::hasPriv('release', 'create')):?> + config->CRProduct) or $product->status != 'closed') and common::hasPriv('release', 'create')):?> createLink('release', 'create', "productID=$product->id&branch=$branchKey"), " " . $lang->release->create, '', "class='btn btn-info'");?>

diff --git a/module/productplan/view/browse.html.php b/module/productplan/view/browse.html.php index 242a8cd17e..68e197cac0 100644 --- a/module/productplan/view/browse.html.php +++ b/module/productplan/view/browse.html.php @@ -24,7 +24,7 @@
- config->global->closedProductStatus) or $product->status != 'closed'):?> + config->CRProduct) or $product->status != 'closed'):?> id&branch=$branch", " {$lang->productplan->create}", '', "class='btn btn-primary'");?>
@@ -34,7 +34,7 @@

productplan->noPlan;?> - config->global->closedProductStatus) or $product->status != 'closed') and common::hasPriv('productplan', 'create')):?> + config->CRProduct) or $product->status != 'closed') and common::hasPriv('productplan', 'create')):?> createLink('productplan', 'create', "productID=$product->id&branch=$branch"), " " . $lang->productplan->create, '', "class='btn btn-info'");?>

diff --git a/module/release/view/browse.html.php b/module/release/view/browse.html.php index ff8213e84f..48ddcbc5fd 100644 --- a/module/release/view/browse.html.php +++ b/module/release/view/browse.html.php @@ -22,7 +22,7 @@ ?>
- config->global->closedProductStatus) or $product->status != 'closed'):?> + config->CRProduct) or $product->status != 'closed'):?> id&branch=$branch", " {$lang->release->create}", '', "class='btn btn-primary'");?>
@@ -32,7 +32,7 @@

release->noRelease;?> - config->global->closedProductStatus) or $product->status != 'closed') and common::hasPriv('release', 'create')):?> + config->CRProduct) or $product->status != 'closed') and common::hasPriv('release', 'create')):?> createLink('release', 'create', "productID=$product->id&branch=$branch"), " " . $lang->release->create, '', "class='btn btn-info'");?>

diff --git a/module/story/view/view.html.php b/module/story/view/view.html.php index a29b2054d7..19a9a8a205 100644 --- a/module/story/view/view.html.php +++ b/module/story/view/view.html.php @@ -47,7 +47,7 @@
- config->global->closedProductStatus) or $product->status != 'closed'): ?> + config->CRProduct) or $product->status != 'closed'): ?> product}&branch={$story->branch}&moduleID={$story->module}", "" . $lang->story->create, '', "class='btn btn-primary'"); ?>
diff --git a/module/testcase/view/browse.html.php b/module/testcase/view/browse.html.php index 8ab3aa076c..ac5cdc8183 100644 --- a/module/testcase/view/browse.html.php +++ b/module/testcase/view/browse.html.php @@ -47,7 +47,7 @@ js::set('suiteID', $suiteID);

testcase->noCase;?> - config->global->closedProductStatus) or $product->status != 'closed') and common::hasPriv('testcase', 'create')):?> + config->CRProduct) or $product->status != 'closed') and common::hasPriv('testcase', 'create')):?> createLink('testcase', 'create', "productID=$productID&branch=$branch&moduleID=$initModule"), " " . $lang->testcase->create, '', "class='btn btn-info'");?> diff --git a/module/testcase/view/caseheader.html.php b/module/testcase/view/caseheader.html.php index e16a07caf6..418d056822 100644 --- a/module/testcase/view/caseheader.html.php +++ b/module/testcase/view/caseheader.html.php @@ -44,7 +44,7 @@ echo "

"; echo html::a('javascript:;', $currentLable . " ", '', "class='btn btn-link' data-toggle='dropdown'"); - if(empty($this->config->global->closedProductStatus) or $product->status != 'closed') + if(!empty($this->config->CRProduct) or $product->status != 'closed') { echo "
- config->global->closedProductStatus) or $product->status != 'closed'):?> + config->CRProduct) or $product->status != 'closed'):?>
- config->global->closedProductStatus) or $product->status != 'closed'):?> + config->CRProduct) or $product->status != 'closed'):?>
" . $lang->testtask->create, '', "class='btn btn-primary'");?>
@@ -58,7 +58,7 @@ $status = $this->session->testTaskVersionStatus;

testtask->noTesttask;?> - config->global->closedProductStatus) or $product->status != 'closed') and common::hasPriv('testtask', 'create')):?> + config->CRProduct) or $product->status != 'closed') and common::hasPriv('testtask', 'create')):?> createLink('testtask', 'create', "product=$productID"), " " . $lang->testtask->create, '', "class='btn btn-info'");?>

diff --git a/module/testtask/view/browseunits.html.php b/module/testtask/view/browseunits.html.php index 8b7840730f..fa234495f6 100644 --- a/module/testtask/view/browseunits.html.php +++ b/module/testtask/view/browseunits.html.php @@ -23,7 +23,7 @@ $label", '', "id='{$key}Tab' class='btn btn-link'");?>
- config->global->closedProductStatus) or $product->status != 'closed'):?> + config->CRProduct) or $product->status != 'closed'):?>
" . $lang->testtask->importUnitResult, '', "class='btn btn-primary'");?>
diff --git a/module/tree/control.php b/module/tree/control.php index 26850600ae..c92dfdc9b5 100644 --- a/module/tree/control.php +++ b/module/tree/control.php @@ -45,7 +45,7 @@ class tree extends control $this->view->root = $product; /* Determines whether an object is editable. */ - $canBeChanged = (empty($this->config->global->closedProductStatus) or $product->status != 'closed') ? true : false; + $canBeChanged = (!empty($this->config->CRProduct) or $product->status != 'closed') ? true : false; } elseif(strpos($viewType, 'doc') !== false) { @@ -219,7 +219,7 @@ class tree extends control $this->view->products = $products; /* Determines whether an object is editable. */ - $canBeChanged = (empty($this->config->global->closedProjectStatus) or $project->status != 'closed') ? true : false; + $canBeChanged = (!empty($this->config->CRProject) or $project->status != 'closed') ? true : false; /* Set menu. */ $this->lang->set('menugroup.tree', 'project');
todo->beginAndEnd?>config->begin . " ~ " . $todo->config->end;?>config->begin . " ~ " . $todo->config->end;?>
todo->cycleConfig?>
From 3d73b747515be92a64511a3ab65773843a36ff5f Mon Sep 17 00:00:00 2001 From: tianshujie98 Date: Tue, 17 Nov 2020 08:17:07 +0800 Subject: [PATCH 10/24] * Modify language items. --- module/build/config.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/build/config.php b/module/build/config.php index 86715fa4b7..bcee51e703 100644 --- a/module/build/config.php +++ b/module/build/config.php @@ -13,7 +13,7 @@ global $lang; $config->build->search['module'] = 'build'; $config->build->search['fields']['name'] = $lang->build->name; $config->build->search['fields']['id'] = $lang->build->id; -$config->build->search['fields']['product'] = '所属' . $lang->build->product; +$config->build->search['fields']['product'] = $lang->story->product; $config->build->search['fields']['scmPath'] = $lang->build->scmPath; $config->build->search['fields']['filePath'] = $lang->build->filePath; $config->build->search['fields']['date'] = $lang->build->date; From 48f7bf3bf306e09caf4fb34912b5c4fac9167c79 Mon Sep 17 00:00:00 2001 From: tianshujie98 Date: Tue, 17 Nov 2020 08:41:39 +0800 Subject: [PATCH 11/24] * Adjust code style. --- module/doc/control.php | 4 ---- module/doc/css/view.css | 1 + 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/module/doc/control.php b/module/doc/control.php index 260e11bd74..dbacb9d029 100644 --- a/module/doc/control.php +++ b/module/doc/control.php @@ -447,10 +447,6 @@ class doc extends control $hyperdown = $this->app->loadClass('hyperdown'); $doc->content = $hyperdown->makeHtml($doc->content); - /* Add a newline attribute to the table. */ - $doc->content = str_replace("", "", $doc->content); - $doc->content = str_replace("", "", $doc->content); - $doc->digest = $hyperdown->makeHtml($doc->digest); } diff --git a/module/doc/css/view.css b/module/doc/css/view.css index 789fb7cf5f..3098bee6e3 100644 --- a/module/doc/css/view.css +++ b/module/doc/css/view.css @@ -19,3 +19,4 @@ .doc-fullscreen .main-row > .side-col {width: 0; position: relative; overflow: hidden} .doc-fullscreen .fullscreen-btn > .icon-fullscreen:before {content: '\e972'} .right-icon a{color: #1183fb} +.cell th,td {word-break: break-word;} From 9607713ad3a9507be4942189318ea493b39b0276 Mon Sep 17 00:00:00 2001 From: tianshujie98 Date: Tue, 17 Nov 2020 08:54:06 +0800 Subject: [PATCH 12/24] * Modify variable name. --- module/git/model.php | 26 +++++++++++++------------- module/svn/model.php | 24 ++++++++++++------------ 2 files changed, 25 insertions(+), 25 deletions(-) diff --git a/module/git/model.php b/module/git/model.php index 9a3dda53e6..3ccd32ae29 100644 --- a/module/git/model.php +++ b/module/git/model.php @@ -111,15 +111,15 @@ class gitModel extends model * * @param object $repo * @param array $commentGroup - * @param bool $isPrintLog + * @param bool $printLog * @access public * @return void */ - public function updateCommit($repo, $commentGroup, $isPrintLog = true) + public function updateCommit($repo, $commentGroup, $printLog = true) { /* Load mudule and print log. */ $this->loadModel('repo'); - if($isPrintLog) $this->printLog("begin repo $repo->id"); + if($printLog) $this->printLog("begin repo $repo->id"); if(!$this->setRepo($repo)) return false; @@ -130,17 +130,17 @@ class gitModel extends model /* Update code commit history. */ foreach($branches as $branch) { - if($isPrintLog) $this->printLog("sync branch $branch logs."); + if($printLog) $this->printLog("sync branch $branch logs."); $_COOKIE['repoBranch'] = $branch; - if($isPrintLog) $this->printLog("get this repo logs."); + if($printLog) $this->printLog("get this repo logs."); $lastInDB = $this->repo->getLatestCommit($repo->id); /* Ignore unsynced branch. */ if(empty($lastInDB)) { - if($isPrintLog) $this->printLog("Please init repo {$repo->name}"); + if($printLog) $this->printLog("Please init repo {$repo->name}"); continue; } @@ -149,18 +149,18 @@ class gitModel extends model $objects = array(); if(!empty($logs)) { - if($isPrintLog) $this->printLog("get " . count($logs) . " logs"); - if($isPrintLog) $this->printLog('begin parsing logs'); + if($printLog) $this->printLog("get " . count($logs) . " logs"); + if($printLog) $this->printLog('begin parsing logs'); foreach($logs as $log) { - if($isPrintLog) $this->printLog("parsing log {$log->revision}"); - if($isPrintLog) $this->printLog("comment is\n----------\n" . trim($log->msg) . "\n----------"); + if($printLog) $this->printLog("parsing log {$log->revision}"); + if($printLog) $this->printLog("comment is\n----------\n" . trim($log->msg) . "\n----------"); $objects = $this->repo->parseComment($log->msg); if($objects) { - if($isPrintLog) $this->printLog('extract' . + if($printLog) $this->printLog('extract' . ' story:' . join(' ', $objects['stories']) . ' task:' . join(' ', $objects['tasks']) . ' bug:' . join(',', $objects['bugs'])); @@ -169,7 +169,7 @@ class gitModel extends model } else { - if($isPrintLog) $this->printLog('no objects found' . "\n"); + if($printLog) $this->printLog('no objects found' . "\n"); } /* Create compile by comment. */ @@ -190,7 +190,7 @@ class gitModel extends model $this->repo->updateCommitCount($repo->id, $commits); $this->dao->update(TABLE_REPO)->set('lastSync')->eq(helper::now())->where('id')->eq($repo->id)->exec(); - if($isPrintLog) $this->printLog("\n\nrepo #" . $repo->id . ': ' . $repo->path . " finished"); + if($printLog) $this->printLog("\n\nrepo #" . $repo->id . ': ' . $repo->path . " finished"); } /** diff --git a/module/svn/model.php b/module/svn/model.php index df42d04f96..74fa8ddd36 100644 --- a/module/svn/model.php +++ b/module/svn/model.php @@ -111,26 +111,26 @@ class svnModel extends model * * @param object $repo * @param array $commentGroup - * @param bool $isPrintLog + * @param bool $printLog * @access public * @return void */ - public function updateCommit($repo, $commentGroup, $isPrintLog = true) + public function updateCommit($repo, $commentGroup, $printLog = true) { /* Load mudule and print log. */ $this->loadModel('repo'); - if($isPrintLog) $this->printLog("begin repo {$repo->name}"); + if($printLog) $this->printLog("begin repo {$repo->name}"); if(!$this->setRepo($repo)) return false; /* Print log and get lastInDB. */ - if($isPrintLog) $this->printLog("get this repo logs."); + if($printLog) $this->printLog("get this repo logs."); $lastInDB = $this->repo->getLatestCommit($repo->id); /* Ignore unsynced repo. */ if(empty($lastInDB)) { - if($isPrintLog) $this->printLog("Please init repo {$repo->name}"); + if($printLog) $this->printLog("Please init repo {$repo->name}"); return false; } @@ -141,18 +141,18 @@ class svnModel extends model $objects = array(); if(!empty($logs)) { - if($isPrintLog) $this->printLog("get " . count($logs) . " logs"); - if($isPrintLog) $this->printLog('begin parsing logs'); + if($printLog) $this->printLog("get " . count($logs) . " logs"); + if($printLog) $this->printLog('begin parsing logs'); foreach($logs as $log) { - if($isPrintLog) $this->printLog("parsing log {$log->revision}"); - if($isPrintLog) $this->printLog("comment is\n----------\n" . trim($log->msg) . "\n----------"); + if($printLog) $this->printLog("parsing log {$log->revision}"); + if($printLog) $this->printLog("comment is\n----------\n" . trim($log->msg) . "\n----------"); $objects = $this->repo->parseComment($log->msg); if($objects) { - if($isPrintLog) $this->printLog('extract' . + if($printLog) $this->printLog('extract' . ' story:' . join(' ', $objects['stories']) . ' task:' . join(' ', $objects['tasks']) . ' bug:' . join(',', $objects['bugs'])); @@ -160,7 +160,7 @@ class svnModel extends model } else { - if($isPrintLog) $this->printLog('no objects found' . "\n"); + if($printLog) $this->printLog('no objects found' . "\n"); } /* Create compile by comment. */ @@ -178,7 +178,7 @@ class svnModel extends model $this->repo->updateCommitCount($repo->id, $lastInDB->commit + count($logs)); $this->dao->update(TABLE_REPO)->set('lastSync')->eq(helper::now())->where('id')->eq($repo->id)->exec(); - if($isPrintLog) $this->printLog("\n\nrepo #" . $repo->id . ': ' . $repo->path . " finished"); + if($printLog) $this->printLog("\n\nrepo #" . $repo->id . ': ' . $repo->path . " finished"); } } From 2e9d5d204f7b4b8a2e7b5d093a9b1dea3c39ae90 Mon Sep 17 00:00:00 2001 From: tianshujie98 Date: Tue, 17 Nov 2020 09:00:50 +0800 Subject: [PATCH 13/24] * Modify variable name. --- module/product/model.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/product/model.php b/module/product/model.php index af646fad27..7b0b98a576 100644 --- a/module/product/model.php +++ b/module/product/model.php @@ -38,8 +38,8 @@ class productModel extends model /* init currentModule and currentMethod for report and story. */ if($currentModule == 'story') { - $method = ",create,batchcreate,batchclose,"; - if(strpos($method, "," . $currentMethod . ",") === false) $currentModule = 'product'; + $storyMethods = ",create,batchcreate,batchclose,"; + if(strpos($storyMethods, "," . $currentMethod . ",") === false) $currentModule = 'product'; if($currentMethod == 'view' || $currentMethod == 'change' || $currentMethod == 'review') $currentMethod = 'browse'; } if($currentMethod == 'report') $currentMethod = 'browse'; From 34b41b1daf5ae2b2f99a6075e5087c02f7c57e13 Mon Sep 17 00:00:00 2001 From: tianshujie98 Date: Tue, 17 Nov 2020 13:06:00 +0800 Subject: [PATCH 14/24] * Finish task #8385. --- module/build/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/build/model.php b/module/build/model.php index b0a06424be..3a9157229e 100644 --- a/module/build/model.php +++ b/module/build/model.php @@ -58,7 +58,7 @@ class buildModel extends model * @access public * @return array */ - public function getProjectBuilds($projectID, $type, $param) + public function getProjectBuilds($projectID, $type = '', $param = '') { return $this->dao->select('t1.*, t2.name as projectName, t3.name as productName, t4.name as branchName') ->from(TABLE_BUILD)->alias('t1') From ff69596dcd5b7988ebcf66b6acb93c0173d28276 Mon Sep 17 00:00:00 2001 From: hufangzhou <746775970@qq.com> Date: Tue, 17 Nov 2020 13:17:14 +0800 Subject: [PATCH 15/24] * Finish task#8418. --- module/testcase/control.php | 3 --- module/testcase/model.php | 2 ++ 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/module/testcase/control.php b/module/testcase/control.php index 70dd2427b4..d5b4912faf 100644 --- a/module/testcase/control.php +++ b/module/testcase/control.php @@ -109,8 +109,6 @@ class testcase extends control $actionURL = $this->createLink('testcase', 'browse', "productID=$productID&branch=$branch&browseType=bySearch&queryID=myQueryID"); $this->config->testcase->search['onMenuBar'] = 'yes'; - $libs = $this->loadModel('caselib')->getLibraries(); - $this->config->testcase->search['params']['lib']['values'] = $libs; $this->testcase->buildSearchForm($productID, $this->products, $queryID, $actionURL); $showModule = !empty($this->config->datatable->testcaseBrowse->showModule) ? $this->config->datatable->testcaseBrowse->showModule : ''; @@ -140,7 +138,6 @@ class testcase extends control $this->view->suiteList = $this->loadModel('testsuite')->getSuites($productID); $this->view->suiteID = $suiteID; $this->view->setModule = true; - $this->view->libs = $libs; $this->display(); } diff --git a/module/testcase/model.php b/module/testcase/model.php index 0f5b9f13d4..c9eee5f6fe 100644 --- a/module/testcase/model.php +++ b/module/testcase/model.php @@ -1379,6 +1379,8 @@ class testcaseModel extends model { $this->config->testcase->search['params']['product']['values'] = array($productID => $products[$productID], 'all' => $this->lang->testcase->allProduct); $this->config->testcase->search['params']['module']['values'] = $this->loadModel('tree')->getOptionMenu($productID, $viewType = 'case'); + $this->config->testcase->search['params']['lib']['values'] = $this->loadModel('caselib')->getLibraries(); + if($this->session->currentProductType == 'normal') { unset($this->config->testcase->search['fields']['branch']); 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 16/24] * 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); From 877dc32f8815c54115b3c1191942fc3a7930d7f0 Mon Sep 17 00:00:00 2001 From: tianshujie98 Date: Tue, 17 Nov 2020 13:14:06 +0800 Subject: [PATCH 17/24] * Finish task #8393. --- module/bug/view/create.html.php | 8 ++++---- module/doc/view/create.html.php | 8 ++++---- module/doc/view/edit.html.php | 8 ++++---- module/testtask/view/create.html.php | 8 ++++---- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/module/bug/view/create.html.php b/module/bug/view/create.html.php index bbe2bf8f82..7b76e84b72 100644 --- a/module/bug/view/create.html.php +++ b/module/bug/view/create.html.php @@ -268,10 +268,10 @@ js::set('stepsNotEmpty', $lang->bug->stepsNotEmpty);
- fetch('my', 'buildContactLists'); - ?> + fetch('my', 'buildContactLists'); + ?>
doc->mailto;?>
- fetch('my', 'buildContactLists'); - ?> + fetch('my', 'buildContactLists'); + ?>
doc->mailto;?>
- mailto, "multiple class='form-control chosen'"); - echo $this->fetch('my', 'buildContactLists'); - ?> + mailto, "multiple class='form-control chosen'"); + echo $this->fetch('my', 'buildContactLists'); + ?>
testtask->mailto;?>
- fetch('my', 'buildContactLists'); - ?> + fetch('my', 'buildContactLists'); + ?>
job->customParam;?>
- job->paramName; ?> - - job->paramValue; ?> - - - + job->paramName; ?> + + job->paramValue; ?> + + +
customParam) as $paramName => $paramValue):?>
- job->paramName; ?> - - job->paramValue; ?> - - - + job->paramName; ?> + + job->paramValue; ?> + + +
- job->paramName; ?> - - job->paramValue; ?> - - - + job->paramName; ?> + + job->paramValue; ?> + + +
custom->closedProduct;?> - global->closedProductStatus) ? $config->global->closedProductStatus : 0;?> - custom->closedProductStatus as $key => $value):?> + global->CRProduct) ? $config->global->CRProduct : 0;?> + custom->CRProduct as $key => $value):?>
custom->closedProject;?> - global->closedProjectStatus) ? $config->global->closedProjectStatus : 0;?> - custom->closedProjectStatus as $key => $value):?> + global->CRProject) ? $config->global->CRProject : 0;?> + custom->CRProject as $key => $value):?>