From f8cd6fe1cbee1666db8c565c4c3146af16b64d66 Mon Sep 17 00:00:00 2001 From: caoyanyi Date: Mon, 25 Jul 2022 09:43:53 +0800 Subject: [PATCH 1/3] * Finish task #61811,61812. --- module/mr/control.php | 2 ++ module/mr/css/create.css | 1 + module/mr/lang/de.php | 1 + module/mr/lang/en.php | 1 + module/mr/lang/fr.php | 1 + module/mr/lang/vi.php | 1 + module/mr/lang/zh-cn.php | 1 + module/mr/view/browse.html.php | 8 +++++--- module/mr/view/create.html.php | 4 ++-- module/mr/view/view.html.php | 4 ++++ 10 files changed, 19 insertions(+), 5 deletions(-) diff --git a/module/mr/control.php b/module/mr/control.php index 0b0bc2ef60..7fe28b3372 100644 --- a/module/mr/control.php +++ b/module/mr/control.php @@ -303,6 +303,8 @@ class mr extends control $this->view->stories = $this->mr->getLinkList($MR->id, $product->id, 'story'); $this->view->bugs = $this->mr->getLinkList($MR->id, $product->id, 'bug'); $this->view->tasks = $this->mr->getLinkList($MR->id, $product->id, 'task'); + $this->view->actions = $this->loadModel('action')->getList('mr', $MRID); + $this->view->users = $this->loadModel('user')->getPairs('noletter|noclosed'); $this->display(); } diff --git a/module/mr/css/create.css b/module/mr/css/create.css index 7176c78083..d5bc7e6536 100644 --- a/module/mr/css/create.css +++ b/module/mr/css/create.css @@ -1 +1,2 @@ #mrForm table tbody th {width: 145px;} +.branch-btn {width: 110px; height: 32px; line-height: 22px; float: right;} diff --git a/module/mr/lang/de.php b/module/mr/lang/de.php index 75fd977b34..c24db27c9a 100644 --- a/module/mr/lang/de.php +++ b/module/mr/lang/de.php @@ -30,6 +30,7 @@ $lang->mr->mriid = "raw MR ID"; $lang->mr->title = 'Name'; $lang->mr->status = 'Status'; $lang->mr->author = 'Author'; +$lang->mr->createdDate = 'Created date'; $lang->mr->assignee = 'Assignee'; $lang->mr->reviewer = 'Reviewer'; $lang->mr->mergeStatus = 'Merge status'; diff --git a/module/mr/lang/en.php b/module/mr/lang/en.php index 75fd977b34..c24db27c9a 100644 --- a/module/mr/lang/en.php +++ b/module/mr/lang/en.php @@ -30,6 +30,7 @@ $lang->mr->mriid = "raw MR ID"; $lang->mr->title = 'Name'; $lang->mr->status = 'Status'; $lang->mr->author = 'Author'; +$lang->mr->createdDate = 'Created date'; $lang->mr->assignee = 'Assignee'; $lang->mr->reviewer = 'Reviewer'; $lang->mr->mergeStatus = 'Merge status'; diff --git a/module/mr/lang/fr.php b/module/mr/lang/fr.php index 75fd977b34..c24db27c9a 100644 --- a/module/mr/lang/fr.php +++ b/module/mr/lang/fr.php @@ -30,6 +30,7 @@ $lang->mr->mriid = "raw MR ID"; $lang->mr->title = 'Name'; $lang->mr->status = 'Status'; $lang->mr->author = 'Author'; +$lang->mr->createdDate = 'Created date'; $lang->mr->assignee = 'Assignee'; $lang->mr->reviewer = 'Reviewer'; $lang->mr->mergeStatus = 'Merge status'; diff --git a/module/mr/lang/vi.php b/module/mr/lang/vi.php index 75fd977b34..c24db27c9a 100644 --- a/module/mr/lang/vi.php +++ b/module/mr/lang/vi.php @@ -30,6 +30,7 @@ $lang->mr->mriid = "raw MR ID"; $lang->mr->title = 'Name'; $lang->mr->status = 'Status'; $lang->mr->author = 'Author'; +$lang->mr->createdDate = 'Created date'; $lang->mr->assignee = 'Assignee'; $lang->mr->reviewer = 'Reviewer'; $lang->mr->mergeStatus = 'Merge status'; diff --git a/module/mr/lang/zh-cn.php b/module/mr/lang/zh-cn.php index 4e4ed474e4..ecefd0fda4 100644 --- a/module/mr/lang/zh-cn.php +++ b/module/mr/lang/zh-cn.php @@ -30,6 +30,7 @@ $lang->mr->mriid = "MR原始ID"; $lang->mr->title = '名称'; $lang->mr->status = '状态'; $lang->mr->author = '创建人'; +$lang->mr->createdDate = '创建时间'; $lang->mr->assignee = '指派给'; $lang->mr->reviewer = '评审人'; $lang->mr->mergeStatus = '是否可合并'; diff --git a/module/mr/view/browse.html.php b/module/mr/view/browse.html.php index 20d3ed910a..025b919da4 100644 --- a/module/mr/view/browse.html.php +++ b/module/mr/view/browse.html.php @@ -50,9 +50,10 @@ mr->title);?> mr->sourceBranch);?> mr->targetBranch);?> - mr->mergeStatus);?> - mr->approvalStatus);?> - mr->author);?> + mr->mergeStatus);?> + mr->approvalStatus);?> + mr->author);?> + mr->createdDate);?> actions;?> @@ -87,6 +88,7 @@ approvalStatus) ? $lang->mr->approvalStatusList['notReviewed'] : $lang->mr->approvalStatusList[$MR->approvalStatus];?> createdBy);?> + createdDate);?> user->admin or (isset($projects[$MR->hostID][$MR->sourceProject]->owner->id) and $projects[$MR->hostID][$MR->sourceProject]->owner->id == $openIDList[$MR->hostID])) ? '' : 'disabled'; diff --git a/module/mr/view/create.html.php b/module/mr/view/create.html.php index 95d794eafb..cfe89386a6 100644 --- a/module/mr/view/create.html.php +++ b/module/mr/view/create.html.php @@ -32,7 +32,7 @@
- mr->sourceBranch ?> + mr->sourceBranch ?>
@@ -42,7 +42,7 @@
- mr->targetBranch ?> + mr->targetBranch ?>
diff --git a/module/mr/view/view.html.php b/module/mr/view/view.html.php index 190a484577..83323b76c2 100644 --- a/module/mr/view/view.html.php +++ b/module/mr/view/view.html.php @@ -105,6 +105,10 @@
mr->commandDocument, $httpRepoURL, $MR->sourceBranch, $branchPath, $MR->targetBranch, $branchPath, $MR->targetBranch); ?>
+ app->getViewType() != 'xhtml'):?> +
+ +
From 78e6133a0ff76bc9d4d68e579cd3495e6db4824a Mon Sep 17 00:00:00 2001 From: caoyanyi Date: Mon, 25 Jul 2022 10:37:59 +0800 Subject: [PATCH 2/3] * Adjust codes. --- module/mr/js/view.js | 14 +++++++------- module/mr/view/view.html.php | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/module/mr/js/view.js b/module/mr/js/view.js index a6433ab5d2..dcfdf941ef 100644 --- a/module/mr/js/view.js +++ b/module/mr/js/view.js @@ -1,17 +1,17 @@ $(document).ready(function() { $('#mergeButton,.mergeButton').click(function() - { + { link = $(this).attr('href'); $.getJSON(link, function(response) - { + { if(response.result == 'success') { - $.zui.messager.success(response.message); - setTimeout(function(){ location.href=response.locate }, 2500); + $.zui.messager.success(response.message); + setTimeout(function(){ location.href=response.locate }, 2500); } if(response.result == 'fail') $.zui.messager.danger(response.message); - }); + }); return false; - }); - }); + }); +}); diff --git a/module/mr/view/view.html.php b/module/mr/view/view.html.php index 83323b76c2..b22dd9df96 100644 --- a/module/mr/view/view.html.php +++ b/module/mr/view/view.html.php @@ -37,7 +37,7 @@
-
+
-
+
From 39120f1ca778980322c25442904e0cbd1ac9be33 Mon Sep 17 00:00:00 2001 From: caoyanyi Date: Tue, 26 Jul 2022 08:42:03 +0800 Subject: [PATCH 3/3] * Adjust codes. --- module/mr/css/browse.css | 7 +++++++ module/mr/js/view.js | 2 +- module/mr/view/browse.html.php | 18 +++++++++--------- 3 files changed, 17 insertions(+), 10 deletions(-) diff --git a/module/mr/css/browse.css b/module/mr/css/browse.css index ac7990261a..37c751af56 100644 --- a/module/mr/css/browse.css +++ b/module/mr/css/browse.css @@ -11,3 +11,10 @@ #repoList .tree li > a {max-width: 100%;} #repoList .hide-in-search .hidden {display: block !important; visibility: inherit !important;} #repoList .tree li > a {line-height: 20px; border-radius: 2px;} + +.c-id {width: 60px;} +.c-title {min-width: 120px;} +.c-branch {width: 240px;} +.c-status {width: 100px;} +.c-author {width: 100px;} +.c-date {width: 140px;} diff --git a/module/mr/js/view.js b/module/mr/js/view.js index dcfdf941ef..dd3ea725bd 100644 --- a/module/mr/js/view.js +++ b/module/mr/js/view.js @@ -1,5 +1,5 @@ $(document).ready(function() - { +{ $('#mergeButton,.mergeButton').click(function() { link = $(this).attr('href'); diff --git a/module/mr/view/browse.html.php b/module/mr/view/browse.html.php index 025b919da4..a03b3565cb 100644 --- a/module/mr/view/browse.html.php +++ b/module/mr/view/browse.html.php @@ -46,15 +46,15 @@ recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}";?> - mr->id);?> - mr->title);?> - mr->sourceBranch);?> - mr->targetBranch);?> - mr->mergeStatus);?> - mr->approvalStatus);?> - mr->author);?> - mr->createdDate);?> - actions;?> + mr->id);?> + mr->title);?> + mr->sourceBranch);?> + mr->targetBranch);?> + mr->mergeStatus);?> + mr->approvalStatus);?> + mr->author);?> + mr->createdDate);?> + actions;?>