From 06afbed435bda2747c1909e5c48c15110e343ff9 Mon Sep 17 00:00:00 2001 From: aaronchen2k <462826@qq.com> Date: Tue, 21 Jan 2020 11:09:49 +0800 Subject: [PATCH] update breadcrumbs for ci module --- module/cicredentials/control.php | 12 ++++---- module/cicredentials/lang/zh-cn.php | 32 +++++++++++---------- module/cijenkins/control.php | 25 ++++++++-------- module/cijenkins/lang/zh-cn.php | 8 ++++-- module/cirepo/control.php | 36 +++++++++++++++--------- module/cirepo/lang/zh-cn.php | 10 ++++--- module/cirepo/view/browsebranch.html.php | 10 +++---- module/citask/control.php | 13 ++++----- 8 files changed, 82 insertions(+), 64 deletions(-) diff --git a/module/cicredentials/control.php b/module/cicredentials/control.php index f335e8b603..705fa259ea 100644 --- a/module/cicredentials/control.php +++ b/module/cicredentials/control.php @@ -35,11 +35,12 @@ class cicredentials extends control $this->app->loadClass('pager', $static = true); $pager = new pager($recTotal, $recPerPage, $pageID); - $this->view->title = $this->lang->credentials->common . $this->lang->colon . $this->lang->ci->list; $this->view->credentialsList = $this->cicredentials->listAll($orderBy, $pager); - $this->view->position[] = $this->lang->ci->common; - $this->view->position[] = $this->lang->credentials->common; + $this->view->title = $this->lang->credentials->common . $this->lang->colon . $this->lang->ci->list; + $this->view->position[] = $this->lang->ci->common; + $this->view->position[] = $this->lang->credentials->common; + $this->view->position[] = $this->lang->credentials->browse; $this->view->orderBy = $orderBy; $this->view->pager = $pager; @@ -63,7 +64,8 @@ class cicredentials extends control } $this->app->loadLang('action'); - $this->view->title = $this->lang->credentials->create . $this->lang->colon . $this->lang->credentials->common; + + $this->view->title = $this->lang->credentials->common . $this->lang->colon . $this->lang->ci->create; $this->view->position[] = $this->lang->ci->common; $this->view->position[] = html::a(inlink('browse'), $this->lang->credentials->common); $this->view->position[] = $this->lang->credentials->create; @@ -90,8 +92,8 @@ class cicredentials extends control } $this->app->loadLang('action'); - $this->view->title = $this->lang->credentials->edit . $this->lang->colon . $credentials->name; + $this->view->title = $this->lang->credentials->common . $this->lang->colon . $this->lang->ci->edit; $this->view->position[] = $this->lang->ci->common; $this->view->position[] = html::a(inlink('browse'), $this->lang->credentials->common); $this->view->position[] = $this->lang->credentials->edit; diff --git a/module/cicredentials/lang/zh-cn.php b/module/cicredentials/lang/zh-cn.php index c79fc8ac4e..2f71c9fe07 100644 --- a/module/cicredentials/lang/zh-cn.php +++ b/module/cicredentials/lang/zh-cn.php @@ -1,20 +1,22 @@ credentials->common = '凭证'; -$lang->credentials->browse = '浏览凭证'; -$lang->credentials->create = '添加凭证'; -$lang->credentials->edit = '编辑凭证'; -$lang->credentials->delete = '删除凭证'; -$lang->credentials->confirmDelete = '确认删除该凭证吗?'; +$lang->ci->common = '持续集成'; +$lang->credentials->common = '凭证'; +$lang->credentials->browse = '浏览'; +$lang->credentials->create = '新建'; +$lang->credentials->edit = '编辑'; -$lang->credentials->id = 'ID'; -$lang->credentials->name = '名称'; -$lang->credentials->type = '类型'; -$lang->credentials->username = '用户名'; -$lang->credentials->password = '密码'; -$lang->credentials->privateKey = '私钥'; -$lang->credentials->passphrase = '私钥密码'; -$lang->credentials->token = 'Token'; -$lang->credentials->desc = '描述'; +$lang->credentials->delete = '删除凭证'; +$lang->credentials->confirmDelete = '确认删除该凭证吗?'; + +$lang->credentials->id = 'ID'; +$lang->credentials->name = '名称'; +$lang->credentials->type = '类型'; +$lang->credentials->username = '用户名'; +$lang->credentials->password = '密码'; +$lang->credentials->privateKey = '私钥'; +$lang->credentials->passphrase = '私钥密码'; +$lang->credentials->token = 'Token'; +$lang->credentials->desc = '描述'; $lang->credentials->typeList['account'] = '用户名密码'; $lang->credentials->typeList['sshKey'] = '密钥'; diff --git a/module/cijenkins/control.php b/module/cijenkins/control.php index 95254bda2a..5262d69ecd 100644 --- a/module/cijenkins/control.php +++ b/module/cijenkins/control.php @@ -37,11 +37,13 @@ class cijenkins extends control $this->app->loadClass('pager', $static = true); $pager = new pager($recTotal, $recPerPage, $pageID); - $this->view->title = $this->lang->jenkins->common . $this->lang->colon . $this->lang->ci->list; $this->view->jenkinsList = $this->cijenkins->listAll($orderBy, $pager); - $this->view->position[] = $this->lang->ci->common; - $this->view->position[] = $this->lang->jenkins->common; + $this->view->title = $this->lang->jenkins->common . $this->lang->colon . $this->lang->ci->list; + + $this->view->position[] = $this->lang->ci->common; + $this->view->position[] = $this->lang->jenkins->common; + $this->view->position[] = $this->lang->jenkins->browse; $this->view->orderBy = $orderBy; $this->view->pager = $pager; @@ -65,10 +67,11 @@ class cijenkins extends control } $this->app->loadLang('action'); - $this->view->title = $this->lang->jenkins->create . $this->lang->colon . $this->lang->jenkins->common; - $this->view->position[] = $this->lang->ci->common; - $this->view->position[] = html::a(inlink('browse'), $this->lang->jenkins->common); - $this->view->position[] = $this->lang->jenkins->create; + + $this->view->title = $this->lang->jenkins->create . $this->lang->colon . $this->lang->jenkins->create; + $this->view->position[] = $this->lang->ci->common; + $this->view->position[] = html::a(inlink('browse'), $this->lang->jenkins->common); + $this->view->position[] = $this->lang->jenkins->create; $this->view->credentialsList = $this->loadModel('cicredentials')->listForSelection("type='token' or type='account'"); $this->view->module = 'cijenkins'; @@ -94,11 +97,11 @@ class cijenkins extends control } $this->app->loadLang('action'); - $this->view->title = $this->lang->jenkins->edit . $this->lang->colon . $jenkins->name; - $this->view->position[] = $this->lang->ci->common; - $this->view->position[] = html::a(inlink('browse'), $this->lang->jenkins->common); - $this->view->position[] = $this->lang->jenkins->edit; + $this->view->title = $this->lang->jenkins->create . $this->lang->colon . $this->lang->jenkins->edit; + $this->view->position[] = $this->lang->ci->common; + $this->view->position[] = html::a(inlink('browse'), $this->lang->jenkins->common); + $this->view->position[] = $this->lang->jenkins->edit; $this->view->jenkins = $jenkins; $this->view->credentialsList = $this->loadModel('cicredentials')->listForSelection("type='token' or type='account'"); diff --git a/module/cijenkins/lang/zh-cn.php b/module/cijenkins/lang/zh-cn.php index ce2bf80fb6..f121a5adfd 100644 --- a/module/cijenkins/lang/zh-cn.php +++ b/module/cijenkins/lang/zh-cn.php @@ -1,8 +1,10 @@ ci->common = '持续集成'; $lang->jenkins->common = 'Jenkins'; -$lang->jenkins->browse = '浏览Jenkins'; -$lang->jenkins->create = '添加Jenkins'; -$lang->jenkins->edit = '编辑Jenkins'; +$lang->jenkins->browse = '浏览'; +$lang->jenkins->create = '创建'; +$lang->jenkins->edit = '编辑'; + $lang->jenkins->delete = '删除Jenkins'; $lang->jenkins->confirmDelete = '确认删除该Jenkins吗?'; diff --git a/module/cirepo/control.php b/module/cirepo/control.php index 1ded2d97f0..4f42d31ec7 100644 --- a/module/cirepo/control.php +++ b/module/cirepo/control.php @@ -38,11 +38,12 @@ class cirepo extends control $this->app->loadClass('pager', $static = true); $pager = new pager($recTotal, $recPerPage, $pageID); - $this->view->title = $this->lang->repo->common . $this->lang->colon . $this->lang->ci->list; + $this->view->repoList = $this->cirepo->listAll($orderBy, $pager); + + $this->view->title = $this->lang->repo->common . $this->lang->colon . $this->lang->repo->browse; $this->view->position[] = $this->lang->ci->common; $this->view->position[] = $this->lang->repo->common; - - $this->view->repoList = $this->cirepo->listAll($orderBy, $pager); + $this->view->position[] = $this->lang->repo->browse; $this->view->orderBy = $orderBy; $this->view->pager = $pager; @@ -69,17 +70,18 @@ class cirepo extends control } $this->app->loadLang('action'); - $this->view->title = $this->lang->repo->create . $this->lang->colon . $this->lang->repo->common; - $this->view->position[] = $this->lang->ci->common; - $this->view->position[] = html::a(inlink('browse'), $this->lang->repo->common); - $this->view->position[] = $this->lang->repo->create; $this->view->groups = $this->loadModel('group')->getPairs(); $this->view->users = $this->loadModel('user')->getPairs('noletter|noempty|nodeleted'); $this->view->credentialsList = $this->loadModel('cicredentials')->listForSelection("type='sshKey' or type='account'"); $this->view->tips = str_replace("{user}",exec('whoami'), $this->lang->repo->tips); - $this->view->module = 'cirepo'; + + $this->view->title = $this->lang->repo->common . $this->lang->colon . $this->lang->repo->create; + $this->view->position[] = $this->lang->ci->common; + $this->view->position[] = html::a(inlink('browse'), $this->lang->repo->common); + $this->view->position[] = $this->lang->repo->create; + $this->view->module = 'cirepo'; $this->display(); } @@ -107,19 +109,20 @@ class cirepo extends control } $this->app->loadLang('action'); - $this->view->title = $this->lang->repo->edit . $this->lang->colon . $repo->name; - $this->view->position[] = $this->lang->ci->common; - $this->view->position[] = html::a(inlink('browse'), $this->lang->repo->common); - $this->view->position[] = $this->lang->repo->edit; $this->view->repo = $repo; - $this->view->groups = $this->loadModel('group')->getPairs(); $this->view->users = $this->loadModel('user')->getPairs('noletter|noempty|nodeleted'); $this->view->credentialsList = $this->loadModel('cicredentials')->listForSelection("type='sshKey' or type='account'"); $this->view->tips = str_replace("{user}", exec('whoami'), $this->lang->repo->tips); - $this->view->module = 'cirepo'; + + $this->view->title = $this->lang->repo->common . $this->lang->colon . $this->lang->repo->edit; + $this->view->position[] = $this->lang->ci->common; + $this->view->position[] = html::a(inlink('browse'), $this->lang->repo->common); + $this->view->position[] = $this->lang->repo->edit; + $this->view->module = 'cirepo'; + $this->display(); } @@ -168,7 +171,12 @@ class cirepo extends control $this->view->repo = $repo; $this->view->branches = $branches; + $this->view->title = $this->lang->repo->common . $this->lang->colon . $this->lang->repo->browseBranch; + $this->view->position[] = $this->lang->ci->common; + $this->view->position[] = html::a(inlink('browse'), $this->lang->repo->common); + $this->view->position[] = $this->lang->repo->browseBranch; $this->view->module = 'cirepo'; + $this->display(); } diff --git a/module/cirepo/lang/zh-cn.php b/module/cirepo/lang/zh-cn.php index 0f24f9c2c0..9272d8e968 100644 --- a/module/cirepo/lang/zh-cn.php +++ b/module/cirepo/lang/zh-cn.php @@ -1,11 +1,13 @@ ci->common = '持续集成'; $lang->repo->common = '代码库'; -$lang->repo->browse = '浏览代码库'; -$lang->repo->create = '添加代码库'; -$lang->repo->edit = '编辑代码库'; +$lang->repo->browse = '浏览'; +$lang->repo->create = '创建'; +$lang->repo->edit = '编辑'; +$lang->repo->browseBranch = '查看分支'; + $lang->repo->delete = '删除代码库'; $lang->repo->confirmDelete = '确认删除该代码库吗?'; -$lang->repo->browseBranch = '查看分支'; $lang->repo->id = 'ID'; $lang->repo->name = '名称'; diff --git a/module/cirepo/view/browsebranch.html.php b/module/cirepo/view/browsebranch.html.php index 854012e86b..26f93d8936 100644 --- a/module/cirepo/view/browsebranch.html.php +++ b/module/cirepo/view/browsebranch.html.php @@ -24,7 +24,7 @@