From 7248447ed72f6e5a62582156968edfce0358a91e Mon Sep 17 00:00:00 2001 From: zenggang Date: Fri, 3 Dec 2021 06:59:44 +0000 Subject: [PATCH 1/3] * Fix bug#16786,16981 --- module/gitlab/lang/en.php | 1 + module/gitlab/lang/zh-cn.php | 1 + module/gitlab/view/binduser.html.php | 14 ++++++++++++-- module/mr/view/browse.html.php | 6 ++++-- 4 files changed, 18 insertions(+), 4 deletions(-) diff --git a/module/gitlab/lang/en.php b/module/gitlab/lang/en.php index 75fb0e0dd1..4ec1cdea56 100644 --- a/module/gitlab/lang/en.php +++ b/module/gitlab/lang/en.php @@ -16,6 +16,7 @@ $lang->gitlab->gitlabAccount = 'GitLab Account'; $lang->gitlab->zentaoAccount = 'Zentao Account'; $lang->gitlab->bindingStatus = 'Binding Status'; $lang->gitlab->binded = 'Binded'; +$lang->gitlab->bindedError = 'The bound user has been deleted or modified. Please bind again.'; $lang->gitlab->serverFail = 'Connect to GitLab server failed, please check the GitLab server.'; $lang->gitlab->lastUpdate = 'Last Update'; $lang->gitlab->confirmAddWebhook = 'Are you sure about creating Webhook?'; diff --git a/module/gitlab/lang/zh-cn.php b/module/gitlab/lang/zh-cn.php index 940581f9f6..d911572925 100644 --- a/module/gitlab/lang/zh-cn.php +++ b/module/gitlab/lang/zh-cn.php @@ -16,6 +16,7 @@ $lang->gitlab->gitlabAccount = 'GitLab用户'; $lang->gitlab->zentaoAccount = '禅道用户'; $lang->gitlab->bindingStatus = '绑定状态'; $lang->gitlab->binded = '已绑定'; +$lang->gitlab->bindedError = '绑定的用户已删除或者已修改,请重新绑定'; $lang->gitlab->serverFail = '连接GitLab服务器异常,请检查GitLab服务器。'; $lang->gitlab->lastUpdate = '最后更新'; $lang->gitlab->confirmAddWebhook = '您确定创建Webhook吗?'; diff --git a/module/gitlab/view/binduser.html.php b/module/gitlab/view/binduser.html.php index 8a87c6cf4a..c328dcf78b 100644 --- a/module/gitlab/view/binduser.html.php +++ b/module/gitlab/view/binduser.html.php @@ -22,7 +22,7 @@ gitlab->gitlabAccount;?> gitlab->zentaoAccount;?> - gitlab->bindingStatus;?> + gitlab->bindingStatus;?> @@ -49,7 +49,17 @@ account . " <" . $gitlabUser->email . ">";?> id]", $userPairs, $gitlabUser->zentaoAccount, "class='form-control select chosen'" );?> - zentaoAccount]) ? $lang->gitlab->binded : ""; ?> + + zentaoAccount])):?> + zentaoAccount, ''))):?> + gitlab->binded;?> + + ' . $lang->gitlab->bindedError . '';?> + + + + + diff --git a/module/mr/view/browse.html.php b/module/mr/view/browse.html.php index 557bbe03d7..65dc8c834c 100644 --- a/module/mr/view/browse.html.php +++ b/module/mr/view/browse.html.php @@ -64,11 +64,13 @@ + sourceProject])) $projects[$MR->sourceProject] = $this->loadModel('gitlab')->apiGetSingleProject($MR->gitlabID, $MR->sourceProject); ?> + targetProject])) $projects[$MR->targetProject] = $this->loadModel('gitlab')->apiGetSingleProject($MR->gitlabID, $MR->targetProject); ?> id;?> id}"), $MR->title);?> - loadModel('gitlab')->apiGetSingleProject($MR->gitlabID, $MR->sourceProject)->name_with_namespace . ':' . $MR->sourceBranch;?> - loadModel('gitlab')->apiGetSingleProject($MR->gitlabID, $MR->targetProject)->name_with_namespace . ':' . $MR->targetBranch;?> + sourceBranch;?>'>sourceProject]->name_with_namespace . ':' . $MR->sourceBranch;?> + targetBranch;?>'>targetProject]->name_with_namespace . ':' . $MR->targetBranch;?> status == 'closed'):?> mr->statusList, $MR->status);?> From 303ecdf5c81b3c573b5585a2a1ad9860e679bb31 Mon Sep 17 00:00:00 2001 From: zenggang Date: Fri, 3 Dec 2021 07:40:08 +0000 Subject: [PATCH 2/3] * Adjust code stye --- module/gitlab/view/binduser.html.php | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/module/gitlab/view/binduser.html.php b/module/gitlab/view/binduser.html.php index c328dcf78b..3838da693e 100644 --- a/module/gitlab/view/binduser.html.php +++ b/module/gitlab/view/binduser.html.php @@ -51,13 +51,11 @@ id]", $userPairs, $gitlabUser->zentaoAccount, "class='form-control select chosen'" );?> zentaoAccount])):?> - zentaoAccount, ''))):?> - gitlab->binded;?> - - ' . $lang->gitlab->bindedError . '';?> - + zentaoAccount, ''))):?> + gitlab->binded;?> - + ' . $lang->gitlab->bindedError . '';?> + From 2b50a60ddc61ddbdf0609c507504f9b806cab5e9 Mon Sep 17 00:00:00 2001 From: zenggang Date: Fri, 3 Dec 2021 09:36:33 +0000 Subject: [PATCH 3/3] * Adjust code style --- module/gitlab/view/binduser.html.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/module/gitlab/view/binduser.html.php b/module/gitlab/view/binduser.html.php index 3838da693e..107697b1e2 100644 --- a/module/gitlab/view/binduser.html.php +++ b/module/gitlab/view/binduser.html.php @@ -37,11 +37,11 @@ id]", $userPairs, '', "class='form-control select chosen'" );?> - - - - zentaoAccount)) continue;?> - + + + + zentaoAccount)) continue;?> + avatar, "height=40");?> realname;?> @@ -58,8 +58,8 @@ - - + +