update breadcrumbs for ci module

This commit is contained in:
aaronchen2k
2020-01-21 11:09:49 +08:00
parent 63f4390c7a
commit 06afbed435
8 changed files with 82 additions and 64 deletions
+7 -5
View File
@@ -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;
+17 -15
View File
@@ -1,20 +1,22 @@
<?php
$lang->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'] = '密钥';
+14 -11
View File
@@ -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'");
+5 -3
View File
@@ -1,8 +1,10 @@
<?php
$lang->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吗?';
+22 -14
View File
@@ -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();
}
+6 -4
View File
@@ -1,11 +1,13 @@
<?php
$lang->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 = '名称';
+5 -5
View File
@@ -24,7 +24,7 @@
<tr>
<th class='w-60px'><?php echo $lang->ci->numb; ?></th>
<th class='w-120px'><?php echo $lang->ci->name; ?></th>
<th class='w-60px'><?php echo $lang->repo->watch; ?></th>
<!--<th class='w-60px'><?php /*echo $lang->repo->watch; */?></th>-->
<th class='c-actions-4'><?php echo $lang->actions; ?></th>
</tr>
</thead>
@@ -34,10 +34,10 @@
<tr>
<td class='text'><?php echo ++$index; ?></td>
<td class='text' title='<?php echo $branch->branch; ?>'><?php echo $branch->branch; ?></td>
<td>
<?php echo html::checkbox('watch', $lang->repo->watchList, $branch->watch,
"data-branch='" . $branch->branch . "' data-repo='" . $branch->repo . "' onclick='watch(this)'");?>
</td>
<!--<td>
<?php /*echo html::checkbox('watch', $lang->repo->watchList, $branch->watch,
"data-branch='" . $branch->branch . "' data-repo='" . $branch->repo . "' onclick='watch(this)'");*/?>
</td>-->
<td class='c-actions text-right'></td>
</tr>
<?php endforeach; ?>
+6 -7
View File
@@ -37,11 +37,11 @@ class citask extends control
$this->app->loadClass('pager', $static = true);
$pager = new pager($recTotal, $recPerPage, $pageID);
$this->view->title = $this->lang->citask->common . $this->lang->colon . $this->lang->citask->browse;
$this->view->taskList = $this->citask->listAll($orderBy, $pager);
$this->view->title = $this->lang->citask->common . $this->lang->colon . $this->lang->citask->browse;
$this->view->position[] = $this->lang->ci->common;
$this->view->position[] = html::a(inlink('browse'), $this->lang->citask->common);
$this->view->position[] = $this->lang->citask->common;
$this->view->position[] = $this->lang->citask->browse;
$this->view->orderBy = $orderBy;
@@ -66,8 +66,8 @@ class citask extends control
}
$this->app->loadLang('action');
$this->view->title = $this->lang->citask->create . $this->lang->colon . $this->lang->citask->create;
$this->view->title = $this->lang->citask->create . $this->lang->colon . $this->lang->citask->create;
$this->view->position[] = $this->lang->ci->common;
$this->view->position[] = html::a(inlink('browse'), $this->lang->citask->common);
$this->view->position[] = $this->lang->citask->create;
@@ -97,8 +97,8 @@ class citask extends control
}
$this->app->loadLang('action');
$this->view->title = $this->lang->citask->edit . $this->lang->colon . $citask->name;
$this->view->title = $this->lang->citask->edit . $this->lang->colon . $citask->name;
$this->view->position[] = $this->lang->ci->common;
$this->view->position[] = html::a(inlink('browse'), $this->lang->citask->common);
$this->view->position[] = $this->lang->citask->edit;
@@ -162,9 +162,9 @@ class citask extends control
$this->app->loadClass('pager', $static = true);
$pager = new pager($recTotal, $recPerPage, $pageID);
$this->view->title = $this->lang->citask->common . $this->lang->colon . $this->lang->citask->browseBuild;
$this->view->buildList = $this->citask->listBuild($taskID, $orderBy, $pager);
$this->view->title = $this->lang->citask->common . $this->lang->colon . $this->lang->citask->browseBuild;
$this->view->position[] = $this->lang->ci->common;
$this->view->position[] = html::a(inlink('browse'), $this->lang->citask->common);
$this->view->position[] = $this->lang->citask->browseBuild;
@@ -184,11 +184,10 @@ class citask extends control
*/
public function viewBuildLogs($buildID)
{
$this->view->title = $this->lang->citask->common . $this->lang->colon . $this->lang->citask->viewLogs;
$build = $this->citask->getBuild($buildID);
$this->view->logs = str_replace("\r\n","<br />", $build->logs);
$this->view->title = $this->lang->citask->common . $this->lang->colon . $this->lang->citask->viewLogs;
$this->view->position[] = $this->lang->ci->common;
$this->view->position[] = html::a(inlink('browse'), $this->lang->citask->common);
$this->view->position[] = html::a(inlink('browseBuild', "taskID=" . $build->citask), $this->lang->citask->browseBuild);