diff --git a/module/ci/view/header.html.php b/module/ci/view/header.html.php
deleted file mode 100644
index dacebf3c11..0000000000
--- a/module/ci/view/header.html.php
+++ /dev/null
@@ -1,31 +0,0 @@
-
- * @package credentials
- * @version $Id$
- * @link http://www.zentao.net
- */
-?>
-
-
diff --git a/module/ci/view/index.html.php b/module/ci/view/index.html.php
index aaecfaf60b..c322ddf1f2 100644
--- a/module/ci/view/index.html.php
+++ b/module/ci/view/index.html.php
@@ -3,12 +3,9 @@
* The index view file of ci module of ZenTaoPMS.
*/
?>
-
+
diff --git a/module/ci/view/viewbuildlogs.html.php b/module/ci/view/viewbuildlogs.html.php
index 1b79903c76..be8f0ee232 100644
--- a/module/ci/view/viewbuildlogs.html.php
+++ b/module/ci/view/viewbuildlogs.html.php
@@ -10,13 +10,9 @@
* @link http://www.zentao.net
*/
?>
-
-
+
-
diff --git a/module/common/lang/zh-cn.php b/module/common/lang/zh-cn.php
index cf3427ec82..20e4ed5756 100644
--- a/module/common/lang/zh-cn.php
+++ b/module/common/lang/zh-cn.php
@@ -123,7 +123,7 @@ $lang->menu->my = '
我的地盘|my|index';
$lang->menu->product = $lang->productCommon . '|product|index|locate=no';
$lang->menu->project = $lang->projectCommon . '|project|index|locate=no';
$lang->menu->qa = '测试|qa|index';
-$lang->menu->devops = array('link' => '持续集成|repo|browse', 'subModule' => 'repo,ci');
+$lang->menu->devops = array('link' => '持续集成|repo|browse', 'subModule' => 'repo,ci,jenkins');
$lang->menu->doc = '文档|doc|index';
$lang->menu->report = '统计|report|index';
$lang->menu->company = '组织|company|index';
@@ -340,8 +340,9 @@ $lang->repo->menu->maintain = array('link' =>'代码库|repo|maintain', 'alias'
$lang->repo->menu->job = array('link' =>'构建|ci|browsejob', 'alias' => 'createjob,editjob,browsebuild,viewbuildlogs');
$lang->repo->menu->jenkins = array('link' =>'Jenkins|jenkins|browse', 'alias' => 'create,edit');
-$lang->ci = new stdclass();
-$lang->ci->menu = $lang->repo->menu;
+$lang->ci = new stdclass();
+$lang->ci->menu = $lang->repo->menu;
+$lang->jenkins->menu = $lang->repo->menu;
/* 文档视图菜单设置。*/
$lang->doc = new stdclass();
diff --git a/module/jenkins/control.php b/module/jenkins/control.php
index edc93e73b0..be680ccea6 100644
--- a/module/jenkins/control.php
+++ b/module/jenkins/control.php
@@ -1,7 +1,7 @@
app->loadLang('ci');
+
+ if(common::hasPriv('jenkins', 'create') and strpos(',browsejob,', $this->methodName) > -1) {
+ $this->lang->modulePageActions = html::a(helper::createLink('jenkins', 'create'), "
" . $this->lang->jenkins->create, '', "class='btn'");
+ }
}
/**
@@ -38,7 +41,7 @@ class jenkins extends control
$this->app->loadClass('pager', $static = true);
$pager = new pager($recTotal, $recPerPage, $pageID);
- $this->view->jenkinsList = $this->cijenkins->listAll($orderBy, $pager);
+ $this->view->jenkinsList = $this->jenkins->listAll($orderBy, $pager);
$this->view->title = $this->lang->ci->jenkins . $this->lang->colon . $this->lang->ci->browse;
@@ -48,7 +51,7 @@ class jenkins extends control
$this->view->orderBy = $orderBy;
$this->view->pager = $pager;
- $this->view->module = 'cijenkins';
+ $this->view->module = 'jenkins';
$this->display();
}
@@ -62,7 +65,7 @@ class jenkins extends control
{
if($_POST)
{
- $this->cijenkins->create();
+ $this->jenkins->create();
if(dao::isError()) $this->send(array('result' => 'fail', 'message' => dao::getError()));
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => inlink('browse')));
}
@@ -75,7 +78,7 @@ class jenkins extends control
$this->view->position[] = $this->lang->ci->create;
$this->view->credentialsList = $this->loadModel('cicredentials')->listForSelection("type='token' or type='account'");
- $this->view->module = 'cijenkins';
+ $this->view->module = 'jenkins';
$this->display();
}
@@ -89,10 +92,10 @@ class jenkins extends control
*/
public function edit($id)
{
- $jenkins = $this->cijenkins->getByID($id);
+ $jenkins = $this->jenkins->getByID($id);
if($_POST)
{
- $this->cijenkins->update($id);
+ $this->jenkins->update($id);
if(dao::isError()) $this->send(array('result' => 'fail', 'message' => dao::getError()));
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => inlink('browse')));
}
@@ -107,7 +110,7 @@ class jenkins extends control
$this->view->jenkins = $jenkins;
$this->view->credentialsList = $this->loadModel('cicredentials')->listForSelection("type='token' or type='account'");
- $this->view->module = 'cijenkins';
+ $this->view->module = 'jenkins';
$this->display();
}
@@ -120,7 +123,7 @@ class jenkins extends control
*/
public function delete($id)
{
- $this->cijenkins->delete(TABLE_JENKINS, $id);
+ $this->jenkins->delete(TABLE_JENKINS, $id);
if(dao::isError()) $this->send(array('result' => 'fail', 'message' => dao::getError()));
$this->send(array('result' => 'success'));
diff --git a/module/jenkins/js/browse.js b/module/jenkins/js/browse.js
index 6126dd22b2..0a12f8df4f 100644
--- a/module/jenkins/js/browse.js
+++ b/module/jenkins/js/browse.js
@@ -1,4 +1,4 @@
$(function()
{
- $('#' + module + 'Tab').addClass('btn-active-text');
+
})
\ No newline at end of file
diff --git a/module/jenkins/js/create.js b/module/jenkins/js/create.js
index 420e3dd30d..ac8f2b5003 100644
--- a/module/jenkins/js/create.js
+++ b/module/jenkins/js/create.js
@@ -1,4 +1,3 @@
$(function()
{
- $('#' + module + 'Tab').addClass('btn-active-text');
});
\ No newline at end of file
diff --git a/module/jenkins/js/edit.js b/module/jenkins/js/edit.js
index 420e3dd30d..ac8f2b5003 100644
--- a/module/jenkins/js/edit.js
+++ b/module/jenkins/js/edit.js
@@ -1,4 +1,3 @@
$(function()
{
- $('#' + module + 'Tab').addClass('btn-active-text');
});
\ No newline at end of file
diff --git a/module/jenkins/lang/zh-cn.php b/module/jenkins/lang/zh-cn.php
index 3106ecc945..24d0fda506 100644
--- a/module/jenkins/lang/zh-cn.php
+++ b/module/jenkins/lang/zh-cn.php
@@ -1,4 +1,5 @@
jenkins->create = '创建Jenkins';
$lang->jenkins->delete = '删除Jenkins';
$lang->jenkins->confirmDelete = '确认删除该Jenkins吗?';
diff --git a/module/jenkins/view/browse.html.php b/module/jenkins/view/browse.html.php
index bec0e65f82..77d0b5aec4 100644
--- a/module/jenkins/view/browse.html.php
+++ b/module/jenkins/view/browse.html.php
@@ -10,14 +10,10 @@
* @link http://www.zentao.net
*/
?>
-
-
+
jenkins->confirmDelete); ?>