Merge branch 'master' of https://git.zcorp.cc/zentaopms
This commit is contained in:
@@ -256,7 +256,13 @@ class block extends control
|
||||
if(isset($this->lang->block->modules[$source]->moreLinkList->{$blockID}))
|
||||
{
|
||||
list($moduleName, $method, $vars) = explode('|', sprintf($this->lang->block->modules[$source]->moreLinkList->{$blockID}, isset($block->params->type) ? $block->params->type : ''));
|
||||
|
||||
/* The list assigned to me jumps to the work page when click more button. */
|
||||
$block->moreLink = $this->createLink($moduleName, $method, $vars);
|
||||
if($moduleName = 'my' and strpos('task|story|requirement|bug|testcase|testtask|issue|risk', $method))
|
||||
{
|
||||
$block->moreLink = $this->createLink($moduleName, 'work', 'mode=' . $method . '&' . $vars);
|
||||
}
|
||||
}
|
||||
elseif($block->block == 'dynamic')
|
||||
{
|
||||
|
||||
@@ -98,7 +98,6 @@ class buildModel extends model
|
||||
->leftJoin(TABLE_RELEASE)->alias('t3')->on('t1.id = t3.build')
|
||||
->leftJoin(TABLE_BRANCH)->alias('t4')->on('t1.branch = t4.id')
|
||||
->where('t1.PRJ')->eq((int)$projectID)
|
||||
->andWhere('t1.project')->ne(0)
|
||||
->beginIF($productID)->andWhere('t1.product')->eq((int)$productID)->fi()
|
||||
->beginIF($branch)->andWhere('t1.branch')->in("0,$branch")->fi()
|
||||
->andWhere('t1.deleted')->eq(0)
|
||||
|
||||
@@ -400,6 +400,7 @@ $lang->bug->menu->caselib = array('link' => 'Bibliothek|caselib|browse');
|
||||
$lang->testcase = new stdclass();
|
||||
$lang->testcase->menu = new stdclass();
|
||||
$lang->testcase->subMenu = $lang->qa->subMenu;
|
||||
$lang->testcase->menu->index = array('link' => 'Index|qa|index');
|
||||
$lang->testcase->menu->bug = array('link' => 'Bug|bug|browse|productID=%s');
|
||||
$lang->testcase->menu->testcase = array('link' => 'Fälle|testcase|browse|productID=%s', 'alias' => 'view,create,batchcreate,edit,batchedit,showimport,groupcase,importfromlib', 'subModule' => 'tree', 'class' => 'dropdown dropdown-hover');
|
||||
$lang->testcase->menu->testtask = array('link' => 'Build|testtask|browse|productID=%s');
|
||||
@@ -410,6 +411,7 @@ $lang->testcase->menu->caselib = array('link' => 'Bibliothek|caselib|browse');
|
||||
$lang->testtask = new stdclass();
|
||||
$lang->testtask->menu = new stdclass();
|
||||
$lang->testtask->subMenu = $lang->qa->subMenu;
|
||||
$lang->testtask->menu->index = array('link' => 'Index|qa|index');
|
||||
$lang->testtask->menu->bug = array('link' => 'Bug|bug|browse|productID=%s');
|
||||
$lang->testtask->menu->testcase = array('link' => 'Fälle|testcase|browse|productID=%s', 'class' => 'dropdown dropdown-hover');
|
||||
$lang->testtask->menu->testtask = array('link' => 'Build|testtask|browse|productID=%s', 'alias' => 'view,create,edit,linkcase,cases,start,close,batchrun,groupcase,report');
|
||||
@@ -420,6 +422,7 @@ $lang->testtask->menu->caselib = array('link' => 'Bibliothek|caselib|browse');
|
||||
$lang->testsuite = new stdclass();
|
||||
$lang->testsuite->menu = new stdclass();
|
||||
$lang->testsuite->subMenu = $lang->qa->subMenu;
|
||||
$lang->testsuite->menu->index = array('link' => 'Index|qa|index');
|
||||
$lang->testsuite->menu->bug = array('link' => 'Bug|bug|browse|productID=%s');
|
||||
$lang->testsuite->menu->testcase = array('link' => 'Fälle|testcase|browse|productID=%s', 'class' => 'dropdown dropdown-hover');
|
||||
$lang->testsuite->menu->testtask = array('link' => 'Build|testtask|browse|productID=%s');
|
||||
@@ -430,6 +433,7 @@ $lang->testsuite->menu->caselib = array('link' => 'Library|caselib|browse');
|
||||
$lang->testreport = new stdclass();
|
||||
$lang->testreport->menu = new stdclass();
|
||||
$lang->testreport->subMenu = $lang->qa->subMenu;
|
||||
$lang->testreport->menu->index = array('link' => 'Index|qa|index');
|
||||
$lang->testreport->menu->bug = array('link' => 'Bug|bug|browse|productID=%s');
|
||||
$lang->testreport->menu->testcase = array('link' => 'Fälle|testcase|browse|productID=%s', 'class' => 'dropdown dropdown-hover');
|
||||
$lang->testreport->menu->testtask = array('link' => 'Build|testtask|browse|productID=%s');
|
||||
@@ -439,6 +443,7 @@ $lang->testreport->menu->caselib = array('link' => 'Bibliothek|caselib|browse'
|
||||
|
||||
$lang->caselib = new stdclass();
|
||||
$lang->caselib->menu = new stdclass();
|
||||
$lang->caselib->menu->index = array('link' => 'Index|qa|index');
|
||||
$lang->caselib->menu->bug = array('link' => 'Bug|bug|browse|');
|
||||
$lang->caselib->menu->testcase = array('link' => 'Fälle|testcase|browse|', 'class' => 'dropdown dropdown-hover');
|
||||
$lang->caselib->menu->testtask = array('link' => 'Build|testtask|browse|');
|
||||
@@ -819,7 +824,7 @@ $lang->icons['task'] = 'check-sign';
|
||||
$lang->icons['tasks'] = 'tasks';
|
||||
$lang->icons['program'] = 'folder-open-o';
|
||||
$lang->icons['project'] = 'project';
|
||||
$lang->icons['stage'] = 'stage';
|
||||
$lang->icons['stage'] = 'waterfall';
|
||||
$lang->icons['sprint'] = 'sprint';
|
||||
$lang->icons['doc'] = 'file-text';
|
||||
$lang->icons['doclib'] = 'folder-close';
|
||||
|
||||
@@ -400,6 +400,7 @@ $lang->bug->menu->caselib = array('link' => 'Case Library|caselib|browse');
|
||||
$lang->testcase = new stdclass();
|
||||
$lang->testcase->menu = new stdclass();
|
||||
$lang->testcase->subMenu = $lang->qa->subMenu;
|
||||
$lang->testcase->menu->index = array('link' => 'Index|qa|index');
|
||||
$lang->testcase->menu->bug = array('link' => 'Bug|bug|browse|productID=%s');
|
||||
$lang->testcase->menu->testcase = array('link' => 'Case|testcase|browse|productID=%s', 'alias' => 'view,create,batchcreate,edit,batchedit,showimport,groupcase,importfromlib', 'subModule' => 'tree', 'class' => 'dropdown dropdown-hover');
|
||||
$lang->testcase->menu->testtask = array('link' => 'Request|testtask|browse|productID=%s');
|
||||
@@ -410,6 +411,7 @@ $lang->testcase->menu->caselib = array('link' => 'Case Library|caselib|browse'
|
||||
$lang->testtask = new stdclass();
|
||||
$lang->testtask->menu = new stdclass();
|
||||
$lang->testtask->subMenu = $lang->qa->subMenu;
|
||||
$lang->testtask->menu->index = array('link' => 'Index|qa|index');
|
||||
$lang->testtask->menu->bug = array('link' => 'Bug|bug|browse|productID=%s');
|
||||
$lang->testtask->menu->testcase = array('link' => 'Case|testcase|browse|productID=%s', 'class' => 'dropdown dropdown-hover');
|
||||
$lang->testtask->menu->testtask = array('link' => 'Request|testtask|browse|productID=%s', 'alias' => 'view,create,edit,linkcase,cases,start,close,batchrun,groupcase,report');
|
||||
@@ -420,6 +422,7 @@ $lang->testtask->menu->caselib = array('link' => 'Case Library|caselib|browse'
|
||||
$lang->testsuite = new stdclass();
|
||||
$lang->testsuite->menu = new stdclass();
|
||||
$lang->testsuite->subMenu = $lang->qa->subMenu;
|
||||
$lang->testsuite->menu->index = array('link' => 'Index|qa|index');
|
||||
$lang->testsuite->menu->bug = array('link' => 'Bug|bug|browse|productID=%s');
|
||||
$lang->testsuite->menu->testcase = array('link' => 'Case|testcase|browse|productID=%s', 'class' => 'dropdown dropdown-hover');
|
||||
$lang->testsuite->menu->testtask = array('link' => 'Request|testtask|browse|productID=%s');
|
||||
@@ -430,6 +433,7 @@ $lang->testsuite->menu->caselib = array('link' => 'Case Library|caselib|browse
|
||||
$lang->testreport = new stdclass();
|
||||
$lang->testreport->menu = new stdclass();
|
||||
$lang->testreport->subMenu = $lang->qa->subMenu;
|
||||
$lang->testreport->menu->index = array('link' => 'Index|qa|index');
|
||||
$lang->testreport->menu->bug = array('link' => 'Bug|bug|browse|productID=%s');
|
||||
$lang->testreport->menu->testcase = array('link' => 'Case|testcase|browse|productID=%s', 'class' => 'dropdown dropdown-hover');
|
||||
$lang->testreport->menu->testtask = array('link' => 'Request|testtask|browse|productID=%s');
|
||||
@@ -439,6 +443,7 @@ $lang->testreport->menu->caselib = array('link' => 'Case Library|caselib|brows
|
||||
|
||||
$lang->caselib = new stdclass();
|
||||
$lang->caselib->menu = new stdclass();
|
||||
$lang->caselib->menu->index = array('link' => 'Index|qa|index');
|
||||
$lang->caselib->menu->bug = array('link' => 'Bug|bug|browse|');
|
||||
$lang->caselib->menu->testcase = array('link' => 'Case|testcase|browse|', 'class' => 'dropdown dropdown-hover');
|
||||
$lang->caselib->menu->testtask = array('link' => 'Request|testtask|browse|');
|
||||
@@ -819,7 +824,7 @@ $lang->icons['task'] = 'check-sign';
|
||||
$lang->icons['tasks'] = 'tasks';
|
||||
$lang->icons['program'] = 'folder-open-o';
|
||||
$lang->icons['project'] = 'project';
|
||||
$lang->icons['stage'] = 'stage';
|
||||
$lang->icons['stage'] = 'waterfall';
|
||||
$lang->icons['sprint'] = 'sprint';
|
||||
$lang->icons['doc'] = 'file-text';
|
||||
$lang->icons['doclib'] = 'folder-close';
|
||||
|
||||
@@ -403,6 +403,7 @@ $lang->bug->menu->caselib = array('link' => 'Library Recette|caselib|browse');
|
||||
$lang->testcase = new stdclass();
|
||||
$lang->testcase->menu = new stdclass();
|
||||
$lang->testcase->subMenu = $lang->qa->subMenu;
|
||||
$lang->testcase->menu->index = array('link' => 'Index|qa|index');
|
||||
$lang->testcase->menu->bug = array('link' => 'Bug|bug|browse|productID=%s');
|
||||
$lang->testcase->menu->testcase = array('link' => 'CasTest|testcase|browse|productID=%s', 'alias' => 'view,create,batchcreate,edit,batchedit,showimport,groupcase,importfromlib', 'subModule' => 'tree', 'class' => 'dropdown dropdown-hover');
|
||||
$lang->testcase->menu->testtask = array('link' => 'Recette|testtask|browse|productID=%s');
|
||||
@@ -413,6 +414,7 @@ $lang->testcase->menu->caselib = array('link' => 'Library Recette|caselib|brow
|
||||
$lang->testtask = new stdclass();
|
||||
$lang->testtask->menu = new stdclass();
|
||||
$lang->testtask->subMenu = $lang->qa->subMenu;
|
||||
$lang->testtask->menu->index = array('link' => 'Index|qa|index');
|
||||
$lang->testtask->menu->bug = array('link' => 'Bug|bug|browse|productID=%s');
|
||||
$lang->testtask->menu->testcase = array('link' => 'CasTest|testcase|browse|productID=%s', 'class' => 'dropdown dropdown-hover');
|
||||
$lang->testtask->menu->testtask = array('link' => 'Recette|testtask|browse|productID=%s', 'alias' => 'view,create,edit,linkcase,cases,start,close,batchrun,groupcase,report');
|
||||
@@ -423,6 +425,7 @@ $lang->testtask->menu->caselib = array('link' => 'Library Recette|caselib|brow
|
||||
$lang->testsuite = new stdclass();
|
||||
$lang->testsuite->menu = new stdclass();
|
||||
$lang->testsuite->subMenu = $lang->qa->subMenu;
|
||||
$lang->testsuite->menu->index = array('link' => 'Index|qa|index');
|
||||
$lang->testsuite->menu->bug = array('link' => 'Bug|bug|browse|productID=%s');
|
||||
$lang->testsuite->menu->testcase = array('link' => 'CasTest|testcase|browse|productID=%s', 'class' => 'dropdown dropdown-hover');
|
||||
$lang->testsuite->menu->testtask = array('link' => 'Recette|testtask|browse|productID=%s');
|
||||
@@ -433,6 +436,7 @@ $lang->testsuite->menu->caselib = array('link' => 'Library Recette|caselib|bro
|
||||
$lang->testreport = new stdclass();
|
||||
$lang->testreport->menu = new stdclass();
|
||||
$lang->testreport->subMenu = $lang->qa->subMenu;
|
||||
$lang->testreport->menu->index = array('link' => 'Index|qa|index');
|
||||
$lang->testreport->menu->bug = array('link' => 'Bug|bug|browse|productID=%s');
|
||||
$lang->testreport->menu->testcase = array('link' => 'CasTest|testcase|browse|productID=%s', 'class' => 'dropdown dropdown-hover');
|
||||
$lang->testreport->menu->testtask = array('link' => 'Recette|testtask|browse|productID=%s');
|
||||
@@ -442,6 +446,7 @@ $lang->testreport->menu->caselib = array('link' => 'Library Recette|caselib|br
|
||||
|
||||
$lang->caselib = new stdclass();
|
||||
$lang->caselib->menu = new stdclass();
|
||||
$lang->caselib->menu->index = array('link' => 'Index|qa|index');
|
||||
$lang->caselib->menu->bug = array('link' => 'Bug|bug|browse|');
|
||||
$lang->caselib->menu->testcase = array('link' => 'CasTest|testcase|browse|', 'class' => 'dropdown dropdown-hover');
|
||||
$lang->caselib->menu->testtask = array('link' => 'Recette|testtask|browse|');
|
||||
@@ -822,7 +827,7 @@ $lang->icons['task'] = 'check-sign';
|
||||
$lang->icons['tasks'] = 'tasks';
|
||||
$lang->icons['program'] = 'folder-open-o';
|
||||
$lang->icons['project'] = 'project';
|
||||
$lang->icons['stage'] = 'stage';
|
||||
$lang->icons['stage'] = 'waterfall';
|
||||
$lang->icons['sprint'] = 'sprint';
|
||||
$lang->icons['doc'] = 'file-text';
|
||||
$lang->icons['doclib'] = 'folder-close';
|
||||
|
||||
@@ -403,6 +403,7 @@ $lang->bug->menu->caselib = array('link' => 'Thư viện tình huống|caselib
|
||||
$lang->testcase = new stdclass();
|
||||
$lang->testcase->menu = new stdclass();
|
||||
$lang->testcase->subMenu = $lang->qa->subMenu;
|
||||
$lang->testcase->menu->index = array('link' => 'Index|qa|index');
|
||||
$lang->testcase->menu->bug = array('link' => 'Bug|bug|browse|productID=%s');
|
||||
$lang->testcase->menu->testcase = array('link' => 'Tình huống|testcase|browse|productID=%s', 'alias' => 'view,create,batchcreate,edit,batchedit,showimport,groupcase,importfromlib', 'subModule' => 'tree', 'class' => 'dropdown dropdown-hover');
|
||||
$lang->testcase->menu->testtask = array('link' => 'Yêu cầu|testtask|browse|productID=%s');
|
||||
@@ -413,6 +414,7 @@ $lang->testcase->menu->caselib = array('link' => 'Thư viện tình huống|ca
|
||||
$lang->testtask = new stdclass();
|
||||
$lang->testtask->menu = new stdclass();
|
||||
$lang->testtask->subMenu = $lang->qa->subMenu;
|
||||
$lang->testtask->menu->index = array('link' => 'Index|qa|index');
|
||||
$lang->testtask->menu->bug = array('link' => 'Bug|bug|browse|productID=%s');
|
||||
$lang->testtask->menu->testcase = array('link' => 'Tình huống|testcase|browse|productID=%s', 'class' => 'dropdown dropdown-hover');
|
||||
$lang->testtask->menu->testtask = array('link' => 'Yêu cầu|testtask|browse|productID=%s', 'alias' => 'view,create,edit,linkcase,cases,start,close,batchrun,groupcase,report');
|
||||
@@ -423,6 +425,7 @@ $lang->testtask->menu->caselib = array('link' => 'Thư viện tình huống|ca
|
||||
$lang->testsuite = new stdclass();
|
||||
$lang->testsuite->menu = new stdclass();
|
||||
$lang->testsuite->subMenu = $lang->qa->subMenu;
|
||||
$lang->testsuite->menu->index = array('link' => 'Index|qa|index');
|
||||
$lang->testsuite->menu->bug = array('link' => 'Bug|bug|browse|productID=%s');
|
||||
$lang->testsuite->menu->testcase = array('link' => 'Tình huống|testcase|browse|productID=%s', 'class' => 'dropdown dropdown-hover');
|
||||
$lang->testsuite->menu->testtask = array('link' => 'Yêu cầu|testtask|browse|productID=%s');
|
||||
@@ -433,6 +436,7 @@ $lang->testsuite->menu->caselib = array('link' => 'Thư viện tình huống|c
|
||||
$lang->testreport = new stdclass();
|
||||
$lang->testreport->menu = new stdclass();
|
||||
$lang->testreport->subMenu = $lang->qa->subMenu;
|
||||
$lang->testreport->menu->index = array('link' => 'Index|qa|index');
|
||||
$lang->testreport->menu->bug = array('link' => 'Bug|bug|browse|productID=%s');
|
||||
$lang->testreport->menu->testcase = array('link' => 'Tình huống|testcase|browse|productID=%s', 'class' => 'dropdown dropdown-hover');
|
||||
$lang->testreport->menu->testtask = array('link' => 'Yêu cầu|testtask|browse|productID=%s');
|
||||
@@ -442,6 +446,7 @@ $lang->testreport->menu->caselib = array('link' => 'Thư viện tình huống|
|
||||
|
||||
$lang->caselib = new stdclass();
|
||||
$lang->caselib->menu = new stdclass();
|
||||
$lang->caselib->menu->index = array('link' => 'Index|qa|index');
|
||||
$lang->caselib->menu->bug = array('link' => 'Bug|bug|browse|');
|
||||
$lang->caselib->menu->testcase = array('link' => 'Tình huống|testcase|browse|', 'class' => 'dropdown dropdown-hover');
|
||||
$lang->caselib->menu->testtask = array('link' => 'Yêu cầu|testtask|browse|');
|
||||
@@ -822,7 +827,7 @@ $lang->icons['task'] = 'check-sign';
|
||||
$lang->icons['tasks'] = 'tasks';
|
||||
$lang->icons['program'] = 'folder-open-o';
|
||||
$lang->icons['project'] = 'project';
|
||||
$lang->icons['stage'] = 'stage';
|
||||
$lang->icons['stage'] = 'waterfall';
|
||||
$lang->icons['sprint'] = 'sprint';
|
||||
$lang->icons['doc'] = 'file-text';
|
||||
$lang->icons['doclib'] = 'folder-close';
|
||||
|
||||
@@ -400,6 +400,7 @@ $lang->bug->menu->caselib = array('link' => '用例库|caselib|browse');
|
||||
$lang->testcase = new stdclass();
|
||||
$lang->testcase->menu = new stdclass();
|
||||
$lang->testcase->subMenu = $lang->qa->subMenu;
|
||||
$lang->testcase->menu->index = array('link' => '仪表盘|qa|index');
|
||||
$lang->testcase->menu->bug = array('link' => 'Bug|bug|browse|productID=%s');
|
||||
$lang->testcase->menu->testcase = array('link' => '用例|testcase|browse|productID=%s', 'alias' => 'view,create,batchcreate,edit,batchedit,showimport,groupcase,importfromlib', 'subModule' => 'tree,story', 'class' => 'dropdown dropdown-hover');
|
||||
$lang->testcase->menu->testtask = array('link' => '测试单|testtask|browse|productID=%s');
|
||||
@@ -410,6 +411,7 @@ $lang->testcase->menu->caselib = array('link' => '用例库|caselib|browse');
|
||||
$lang->testtask = new stdclass();
|
||||
$lang->testtask->menu = new stdclass();
|
||||
$lang->testtask->subMenu = $lang->qa->subMenu;
|
||||
$lang->testtask->menu->index = array('link' => '仪表盘|qa|index');
|
||||
$lang->testtask->menu->bug = array('link' => 'Bug|bug|browse|productID=%s');
|
||||
$lang->testtask->menu->testcase = array('link' => '用例|testcase|browse|productID=%s', 'class' => 'dropdown dropdown-hover');
|
||||
$lang->testtask->menu->testtask = array('link' => '测试单|testtask|browse|productID=%s', 'subModule' => 'testtask', 'alias' => 'view,create,edit,linkcase,cases,start,close,batchrun,groupcase,report');
|
||||
@@ -420,6 +422,7 @@ $lang->testtask->menu->caselib = array('link' => '用例库|caselib|browse');
|
||||
$lang->testsuite = new stdclass();
|
||||
$lang->testsuite->menu = new stdclass();
|
||||
$lang->testsuite->subMenu = $lang->qa->subMenu;
|
||||
$lang->testsuite->menu->index = array('link' => '仪表盘|qa|index');
|
||||
$lang->testsuite->menu->bug = array('link' => 'Bug|bug|browse|productID=%s');
|
||||
$lang->testsuite->menu->testcase = array('link' => '用例|testcase|browse|productID=%s', 'class' => 'dropdown dropdown-hover');
|
||||
$lang->testsuite->menu->testtask = array('link' => '测试单|testtask|browse|productID=%s');
|
||||
@@ -430,6 +433,7 @@ $lang->testsuite->menu->caselib = array('link' => '用例库|caselib|browse');
|
||||
$lang->testreport = new stdclass();
|
||||
$lang->testreport->menu = new stdclass();
|
||||
$lang->testreport->subMenu = $lang->qa->subMenu;
|
||||
$lang->testreport->menu->index = array('link' => '仪表盘|qa|index');
|
||||
$lang->testreport->menu->bug = array('link' => 'Bug|bug|browse|productID=%s');
|
||||
$lang->testreport->menu->testcase = array('link' => '用例|testcase|browse|productID=%s', 'class' => 'dropdown dropdown-hover');
|
||||
$lang->testreport->menu->testtask = array('link' => '测试单|testtask|browse|productID=%s');
|
||||
@@ -439,6 +443,7 @@ $lang->testreport->menu->caselib = array('link' => '用例库|caselib|browse')
|
||||
|
||||
$lang->caselib = new stdclass();
|
||||
$lang->caselib->menu = new stdclass();
|
||||
$lang->caselib->menu->index = array('link' => '仪表盘|qa|index');
|
||||
$lang->caselib->menu->bug = array('link' => 'Bug|bug|browse|');
|
||||
$lang->caselib->menu->testcase = array('link' => '用例|testcase|browse|', 'class' => 'dropdown dropdown-hover');
|
||||
$lang->caselib->menu->testtask = array('link' => '测试单|testtask|browse|');
|
||||
@@ -820,7 +825,7 @@ $lang->icons['task'] = 'check-sign';
|
||||
$lang->icons['tasks'] = 'tasks';
|
||||
$lang->icons['program'] = 'folder-open-o';
|
||||
$lang->icons['project'] = 'project';
|
||||
$lang->icons['stage'] = 'stage';
|
||||
$lang->icons['stage'] = 'waterfall';
|
||||
$lang->icons['sprint'] = 'sprint';
|
||||
$lang->icons['doc'] = 'file-text';
|
||||
$lang->icons['doclib'] = 'folder-close';
|
||||
|
||||
@@ -395,6 +395,7 @@ $lang->bug->menu->caselib = array('link' => '用例庫|caselib|browse');
|
||||
$lang->testcase = new stdclass();
|
||||
$lang->testcase->menu = new stdclass();
|
||||
$lang->testcase->subMenu = $lang->qa->subMenu;
|
||||
$lang->testcase->menu->index = array('link' => '儀表盤|qa|index');
|
||||
$lang->testcase->menu->bug = array('link' => 'Bug|bug|browse|productID=%s');
|
||||
$lang->testcase->menu->testcase = array('link' => '用例|testcase|browse|productID=%s', 'alias' => 'view,create,batchcreate,edit,batchedit,showimport,groupcase,importfromlib', 'subModule' => 'tree,story', 'class' => 'dropdown dropdown-hover');
|
||||
$lang->testcase->menu->testtask = array('link' => '測試單|testtask|browse|productID=%s');
|
||||
@@ -405,6 +406,7 @@ $lang->testcase->menu->caselib = array('link' => '用例庫|caselib|browse');
|
||||
$lang->testtask = new stdclass();
|
||||
$lang->testtask->menu = new stdclass();
|
||||
$lang->testtask->subMenu = $lang->qa->subMenu;
|
||||
$lang->testtask->menu->index = array('link' => '儀表盤|qa|index');
|
||||
$lang->testtask->menu->bug = array('link' => 'Bug|bug|browse|productID=%s');
|
||||
$lang->testtask->menu->testcase = array('link' => '用例|testcase|browse|productID=%s', 'class' => 'dropdown dropdown-hover');
|
||||
$lang->testtask->menu->testtask = array('link' => '測試單|testtask|browse|productID=%s', 'subModule' => 'testtask', 'alias' => 'view,create,edit,linkcase,cases,start,close,batchrun,groupcase,report');
|
||||
@@ -415,6 +417,7 @@ $lang->testtask->menu->caselib = array('link' => '用例庫|caselib|browse');
|
||||
$lang->testsuite = new stdclass();
|
||||
$lang->testsuite->menu = new stdclass();
|
||||
$lang->testsuite->subMenu = $lang->qa->subMenu;
|
||||
$lang->testsuite->menu->index = array('link' => '儀表盤|qa|index');
|
||||
$lang->testsuite->menu->bug = array('link' => 'Bug|bug|browse|productID=%s');
|
||||
$lang->testsuite->menu->testcase = array('link' => '用例|testcase|browse|productID=%s', 'class' => 'dropdown dropdown-hover');
|
||||
$lang->testsuite->menu->testtask = array('link' => '測試單|testtask|browse|productID=%s');
|
||||
@@ -425,6 +428,7 @@ $lang->testsuite->menu->caselib = array('link' => '用例庫|caselib|browse');
|
||||
$lang->testreport = new stdclass();
|
||||
$lang->testreport->menu = new stdclass();
|
||||
$lang->testreport->subMenu = $lang->qa->subMenu;
|
||||
$lang->testreport->menu->index = array('link' => '儀表盤|qa|index');
|
||||
$lang->testreport->menu->bug = array('link' => 'Bug|bug|browse|productID=%s');
|
||||
$lang->testreport->menu->testcase = array('link' => '用例|testcase|browse|productID=%s', 'class' => 'dropdown dropdown-hover');
|
||||
$lang->testreport->menu->testtask = array('link' => '測試單|testtask|browse|productID=%s');
|
||||
@@ -434,6 +438,7 @@ $lang->testreport->menu->caselib = array('link' => '用例庫|caselib|browse')
|
||||
|
||||
$lang->caselib = new stdclass();
|
||||
$lang->caselib->menu = new stdclass();
|
||||
$lang->caselib->menu->index = array('link' => '儀表盤|qa|index');
|
||||
$lang->caselib->menu->bug = array('link' => 'Bug|bug|browse|');
|
||||
$lang->caselib->menu->testcase = array('link' => '用例|testcase|browse|', 'class' => 'dropdown dropdown-hover');
|
||||
$lang->caselib->menu->testtask = array('link' => '測試單|testtask|browse|');
|
||||
@@ -814,7 +819,7 @@ $lang->icons['task'] = 'check-sign';
|
||||
$lang->icons['tasks'] = 'tasks';
|
||||
$lang->icons['program'] = 'folder-open-o';
|
||||
$lang->icons['project'] = 'project';
|
||||
$lang->icons['stage'] = 'stage';
|
||||
$lang->icons['stage'] = 'waterfall';
|
||||
$lang->icons['sprint'] = 'sprint';
|
||||
$lang->icons['doc'] = 'file-text';
|
||||
$lang->icons['doclib'] = 'folder-close';
|
||||
|
||||
@@ -595,16 +595,16 @@ class commonModel extends model
|
||||
}
|
||||
|
||||
/**
|
||||
* Get recent executions.
|
||||
* Print recent menu.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public static function getRecentExecutions()
|
||||
public static function printRecentMemu()
|
||||
{
|
||||
global $lang;
|
||||
echo "<li class='divider'></li>";
|
||||
echo '<li><a id="mainRecent" onclick="getExecutions();"><i class="icon icon-recent"></i><span class="text">' . $lang->recent . '</span></a></li>';
|
||||
echo '<li><a id="recentMenu"><i class="icon icon-recent"></i><span class="text">' . $lang->recent . '</span></a></li>';
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
body {padding-left: 96px}
|
||||
|
||||
#menu {position: fixed; left: 0; top: 0; bottom: 0; background-color: #3C495C; color: #fff; width: 96px; z-index: 1015;}
|
||||
#menu {position: fixed; left: 0; top: 0; bottom: 0; background-color: #3C495C; width: 96px; z-index: 1015;}
|
||||
#menuNav {position: absolute; top: 0; bottom: 80px; width: 100%;}
|
||||
#menu .nav > li {float: none; padding: 4px 8px;}
|
||||
#menu .nav > li > a {color: #fff; line-height: 20px; padding: 8px 6px; border-radius: 2px; white-space: nowrap;}
|
||||
@@ -24,9 +24,11 @@ body.menu-hide {padding-left: 0;}
|
||||
.menu-hide #menu .nav > li > a > .text {display: none}
|
||||
.menu-hide #menu .nav > li.has-avatar > a {padding: 2px 0;}
|
||||
|
||||
#moreExecution {display:none; max-height: 420px; position: fixed; bottom: 0; left: 96px; z-index: 999; background: white; padding: 20px 10px; height: 420px; margin-bottom: 40px; border: 1px solid #efefef}
|
||||
.menu-hide #moreExecution {left: 40px}
|
||||
#moreExecution > .list-group {height: 380px; min-width: 150px; max-width:200px;}
|
||||
#moreExecution {display:none; max-height: 380px; min-height: 140px; max-width:260px; min-width: 150px; position: fixed; bottom: 40px; z-index: 999; background: white; padding: 20px 10px; border: 1px solid #efefef}
|
||||
.more-execution-show {left: 96px;}
|
||||
.more-execution-hide {left: 40px;}
|
||||
#moreExecution .icon-search {opacity: 0.5;}
|
||||
#executionList {max-height: 280px; min-height: 100px; max-width:260px; min-width: 150px; margin-top: 5px;}
|
||||
|
||||
#pages {position: fixed; left: 96px; bottom: 0; right: 0; top: 0;}
|
||||
.page-tab {position: absolute; left: 0; bottom: 0; right: 0; top: 0; background-color: #efefef;}
|
||||
|
||||
@@ -449,9 +449,20 @@
|
||||
});
|
||||
|
||||
/* Hide execution list on mouseleave or click */
|
||||
$('#executionList').on('mouseleave click', function()
|
||||
$(document).click(function()
|
||||
{
|
||||
$('#moreExecution').hide();
|
||||
$("#moreExecution").hide();
|
||||
});
|
||||
|
||||
$("#recentMenu").click(function(event)
|
||||
{
|
||||
event.stopPropagation();
|
||||
getExecutions();
|
||||
});
|
||||
|
||||
$("#moreExecution").click(function(event)
|
||||
{
|
||||
event.stopPropagation();
|
||||
});
|
||||
});
|
||||
}());
|
||||
@@ -462,6 +473,15 @@ function getExecutions()
|
||||
var $moreExecution = $('#moreExecution').toggle();
|
||||
if(!$moreExecution.is(':hidden'))
|
||||
{
|
||||
if($('body').hasClass('menu-hide'))
|
||||
{
|
||||
$('#moreExecution').addClass('more-execution-hide');
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#moreExecution').removeClass('more-execution-hide');
|
||||
}
|
||||
|
||||
$.ajax(
|
||||
{
|
||||
url: createLink('project', 'ajaxGetRecentExecutions'),
|
||||
|
||||
@@ -25,11 +25,18 @@ js::set('defaultOpen', $open);
|
||||
<ul class='nav nav-default' id='menuMainNav'>
|
||||
</ul>
|
||||
<ul class='nav nav-default'>
|
||||
<?php commonModel::getRecentExecutions();?>
|
||||
<?php commonModel::printRecentMemu();?>
|
||||
</ul>
|
||||
</nav>
|
||||
<div class="table-col col-right" id="moreExecution">
|
||||
<div class="list-group" id="executionList"></div>
|
||||
<div class="table-col col-right">
|
||||
<div id="moreExecution" class="more-execution-show" data-ride="searchList">
|
||||
<div class="input-control search-box has-icon-left has-icon-right search-example">
|
||||
<input id="userSearchBox" type="search" autocomplete="off" class="form-control search-input empty">
|
||||
<label for="userSearchBox" class="input-control-icon-left search-icon"><i class="icon icon-search"></i></label>
|
||||
<a class="input-control-icon-right search-clear-btn"><i class="icon icon-close icon-sm"></i></a>
|
||||
</div>
|
||||
<div class="list-group" id="executionList"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div id='menuFooter'>
|
||||
<ul id="userNav" class="nav">
|
||||
|
||||
@@ -119,10 +119,10 @@
|
||||
if($canBeChanged)
|
||||
{
|
||||
$params = "bugID=$bug->id";
|
||||
common::printIcon('bug', 'confirmBug', $params, $bug, 'list', 'confirm', '', 'iframe', true, '', '', $bug->PRJ);
|
||||
common::printIcon('bug', 'confirmBug', $params, $bug, 'list', 'ok', '', 'iframe', true, '', '', $bug->PRJ);
|
||||
common::printIcon('bug', 'resolve', $params, $bug, 'list', 'checked', '', 'iframe', true, '', '', $bug->PRJ);
|
||||
common::printIcon('bug', 'close', $params, $bug, 'list', '', '', 'iframe', true, '', '', $bug->PRJ);
|
||||
common::printIcon('bug', 'edit', $params, $bug, 'list', '', '', '', '', '', '', $bug->PRJ);
|
||||
common::printIcon('bug', 'close', $params, $bug, 'list', '', '', 'iframe', true, '', '', $bug->PRJ);
|
||||
common::printIcon('bug', 'edit', $params, $bug, 'list', '', '', '', '', '', '', $bug->PRJ);
|
||||
common::printIcon('bug', 'create', "product=$bug->product&branch=$bug->branch&extra=$params", $bug, 'list', 'copy', '', '', '', '', '', $bug->PRJ);
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -1144,6 +1144,23 @@ class programModel extends model
|
||||
->fetchAll('id');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get project pairs by id list.
|
||||
*
|
||||
* @param array $projectIdList
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getPRJPairsByIdList($projectIdList = array())
|
||||
{
|
||||
return $this->dao->select('id, name')->from(TABLE_PROJECT)
|
||||
->where('type')->eq('project')
|
||||
->andWhere('deleted')->eq(0)
|
||||
->andWhere('id')->in($projectIdList)
|
||||
->beginIF(!$this->app->user->admin)->andWhere('id')->in($this->app->user->view->projects)->fi()
|
||||
->fetchPairs('id', 'name');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get project team member pairs.
|
||||
*
|
||||
|
||||
@@ -4,7 +4,6 @@ $config->project->defaultWorkhours = '7.0';
|
||||
$config->project->orderBy = 'isDone,status,order_desc';
|
||||
$config->project->maxBurnDay = '31';
|
||||
$config->project->weekend = '2';
|
||||
$config->project->recentQuantity = 15;
|
||||
|
||||
$config->project->list = new stdclass();
|
||||
$config->project->list->exportFields = 'id,name,code,PM,end,status,totalEstimate,totalConsumed,totalLeft,progress';
|
||||
|
||||
@@ -2428,11 +2428,16 @@ class project extends control
|
||||
$executions = $this->project->getRecentExecutions();
|
||||
if(!empty($executions))
|
||||
{
|
||||
$executionsName = array();
|
||||
foreach($executions as $execution) $executionsName[] = $execution->name;
|
||||
$executionsPinYin = common::convert2Pinyin($executionsName);
|
||||
|
||||
foreach($executions as $execution)
|
||||
{
|
||||
$link = helper::createLink('project', 'task', 'projectID=' . $execution->id, '', false, $execution->project);
|
||||
$execution->code = empty($execution->code) ? $execution->name : $execution->code;
|
||||
echo html::a($link, '<i class="icon icon-menu-doc"></i>' . $execution->code, '', "class='text-ellipsis' title='$execution->name'");
|
||||
$dataKey = 'date-key="' . zget($executionsPinYin, $execution->name, $execution->name) . '"';
|
||||
echo html::a($link, '<i class="icon icon-' . $this->lang->icons[$execution->type] . '"></i> ' . $execution->code, '', "class='search-list-item' title='$execution->name' $dataKey");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -200,7 +200,7 @@ class projectModel extends model
|
||||
|
||||
$currentProjectName = '';
|
||||
if(isset($currentProject->name)) $currentProjectName = $currentProject->name;
|
||||
$output = "<div class='btn-group angle-btn'><div class='btn-group'><button data-toggle='dropdown' type='button' class='btn btn-limit' id='currentItem' title='{$currentProjectName}'><span class='text'><i class='icon icon-{$currentProject->type}'></i> {$currentProjectName}</span> <span class='caret' style='margin-top: 3px'></span></button><div id='dropMenu' class='dropdown-menu search-list' data-ride='searchList' data-url='$dropMenuLink'>";
|
||||
$output = "<div class='btn-group angle-btn'><div class='btn-group'><button data-toggle='dropdown' type='button' class='btn btn-limit' id='currentItem' title='{$currentProjectName}'><span class='text'><i class='icon icon-{$this->lang->icons[$currentProject->type]}'></i> {$currentProjectName}</span> <span class='caret'></span></button><div id='dropMenu' class='dropdown-menu search-list' data-ride='searchList' data-url='$dropMenuLink'>";
|
||||
$output .= '<div class="input-control search-box has-icon-left has-icon-right search-example"><input type="search" class="form-control search-input" /><label class="input-control-icon-left search-icon"><i class="icon icon-search"></i></label><a class="input-control-icon-right search-clear-btn"><i class="icon icon-close icon-sm"></i></a></div>';
|
||||
$output .= "</div></div></div>";
|
||||
if($isMobile) $output = "<a id='currentItem' href=\"javascript:showSearchMenu('project', '$projectID', '$currentModule', '$currentMethod', '$extra')\"><span class='text'>{$currentProject->name}</span> <span class='icon-caret-down'></span></a><div id='currentItemDropMenu' class='hidden affix enter-from-bottom layer'></div>";
|
||||
@@ -3564,14 +3564,48 @@ class projectModel extends model
|
||||
$isView = (empty($this->app->user->view->sprints) || empty($this->app->user->view->projects)) ? false : true;
|
||||
if(!$this->app->user->admin && $isView === false) return array();
|
||||
|
||||
return $this->dao->select('id,project,code,name')->from(TABLE_PROJECT)
|
||||
$executions = $this->dao->select('id,project,code,name,type')->from(TABLE_PROJECT)
|
||||
->where('type')->in('stage,sprint')
|
||||
->beginIF(!$this->app->user->admin)->andWhere('id')->in($this->app->user->view->sprints)->fi()
|
||||
->beginIF(!$this->app->user->admin)->andWhere('project')->in($this->app->user->view->projects)->fi()
|
||||
->andWhere('status')->ne('closed')
|
||||
->andWhere('deleted')->eq('0')
|
||||
->orderBy('id_desc')
|
||||
->limit($this->config->project->recentQuantity)
|
||||
->fetchAll();
|
||||
|
||||
/* Get the project or product to which the execution belongs. */
|
||||
$projectIdList = array();
|
||||
$stageIdList = array();
|
||||
foreach($executions as $execution)
|
||||
{
|
||||
if($execution->type == 'stage') $stageIdList[$execution->id] = $execution->id;
|
||||
if($execution->type == 'sprint') $projectIdList[$execution->project] = $execution->project;
|
||||
}
|
||||
$projectPairs = $this->loadModel('program')->getPRJPairsByIdList($projectIdList);
|
||||
$productPairs = $this->getStageLinkProductPairs($stageIdList);
|
||||
|
||||
foreach($executions as $execution)
|
||||
{
|
||||
if($execution->type == 'stage') $execution->name = zget($productPairs, $execution->id) . '/' . $execution->name;
|
||||
if($execution->type == 'sprint') $execution->name = zget($projectPairs, $execution->project) . '/' . $execution->name;
|
||||
}
|
||||
|
||||
return $executions;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the products associated with the stage.
|
||||
*
|
||||
* @param string $stageIdList
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getStageLinkProductPairs($stageIdList = array())
|
||||
{
|
||||
$productpairs = $this->dao->select('t1.project, t2.name')->from(TABLE_PROJECTPRODUCT)->alias('t1')
|
||||
->leftJoin(TABLE_PRODUCT)->alias('t2')->on('t1.product=t2.id')
|
||||
->where('t1.project')->in($stageIdList)
|
||||
->fetchPairs('project', 'name');
|
||||
return $productpairs;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,13 +23,13 @@ foreach($projects as $project)
|
||||
{
|
||||
if($project->status != 'done' and $project->status != 'closed' and $project->PM == $this->app->user->account)
|
||||
{
|
||||
$myProjectsHtml .= html::a(sprintf($link, $project->id), "<i class='icon icon-{$project->type}'></i> " . $project->name, '', "class='text-important' title='{$project->name}' data-key='" . zget($projectsPinYin, $project->name, '') . "'");
|
||||
$myProjectsHtml .= html::a(sprintf($link, $project->id), "<i class='icon icon-{$lang->icons[$project->type]}'></i> " . $project->name, '', "class='text-important' title='{$project->name}' data-key='" . zget($projectsPinYin, $project->name, '') . "'");
|
||||
}
|
||||
else if($project->status != 'done' and $project->status != 'closed' and !($project->PM == $this->app->user->account))
|
||||
{
|
||||
$normalProjectsHtml .= html::a(sprintf($link, $project->id), "<i class='icon icon-{$project->type}'></i> " . $project->name, '', "title='{$project->name}' data-key='" . zget($projectsPinYin, $project->name, '') . "'");
|
||||
$normalProjectsHtml .= html::a(sprintf($link, $project->id), "<i class='icon icon-{$lang->icons[$project->type]}'></i> " . $project->name, '', "title='{$project->name}' data-key='" . zget($projectsPinYin, $project->name, '') . "'");
|
||||
}
|
||||
else if($project->status == 'done' or $project->status == 'closed') $closedProjectsHtml .= html::a(sprintf($link, $project->id), "<i class='icon icon-{$project->type}'></i> " . $project->name, '', "title='{$project->name}' data-key='" . zget($projectsPinYin, $project->name, '') . "'");
|
||||
else if($project->status == 'done' or $project->status == 'closed') $closedProjectsHtml .= html::a(sprintf($link, $project->id), "<i class='icon icon-{$lang->icons[$project->type]}'></i> " . $project->name, '', "title='{$project->name}' data-key='" . zget($projectsPinYin, $project->name, '') . "'");
|
||||
}
|
||||
?>
|
||||
<div class="table-row">
|
||||
|
||||
@@ -104,9 +104,9 @@
|
||||
if($canBeChanged)
|
||||
{
|
||||
$params = "bugID=$bug->id";
|
||||
common::printIcon('bug', 'confirmBug', $params, $bug, 'list', 'confirm', '', 'iframe', true);
|
||||
common::printIcon('bug', 'resolve', $params, $bug, 'list', 'checked', '', 'iframe', true);
|
||||
common::printIcon('bug', 'close', $params, $bug, 'list', '', '', 'iframe', true);
|
||||
common::printIcon('bug', 'confirmBug', $params, $bug, 'list', 'ok', '', 'iframe', true);
|
||||
common::printIcon('bug', 'resolve', $params, $bug, 'list', 'checked', '', 'iframe', true);
|
||||
common::printIcon('bug', 'close', $params, $bug, 'list', '', '', 'iframe', true);
|
||||
common::printIcon('bug', 'create', "product=$bug->product&branch=$bug->branch&extra=$params", $bug, 'list', 'copy');
|
||||
common::printIcon('bug', 'edit', $params, $bug, 'list');
|
||||
}
|
||||
|
||||
@@ -39,14 +39,18 @@ class projectrelease extends control
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function commonAction($productID, $branch = 0)
|
||||
public function commonAction($productID = 0, $branch = 0)
|
||||
{
|
||||
$this->lang->product->menu = $this->lang->product->viewMenu;
|
||||
$this->lang->product->menu = $this->lang->product->viewMenu;
|
||||
$this->lang->product->switcherMenu = $this->loadModel('product')->getSwitcher($productID);
|
||||
|
||||
/* Get product and product list by project. */
|
||||
$this->loadModel('product');
|
||||
$products = $this->loadModel('product')->getProductPairsByProject($this->session->PRJ);
|
||||
if(!$productID) $productID = key($products);
|
||||
$product = $this->product->getById($productID);
|
||||
|
||||
$this->view->products = $products;
|
||||
$this->view->product = $product;
|
||||
$this->view->branches = (isset($product->type) and $product->type == 'normal') ? array() : $this->loadModel('branch')->getPairs($productID);
|
||||
$this->view->branch = $branch;
|
||||
@@ -56,28 +60,20 @@ class projectrelease extends control
|
||||
/**
|
||||
* Browse releases.
|
||||
*
|
||||
* @param int $productID
|
||||
* @param int $branch
|
||||
* @param string $type
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function browse($productID = 0, $branch = 0, $type = 'all')
|
||||
public function browse($type = 'all')
|
||||
{
|
||||
if(!$productID) $productID = key($this->products);
|
||||
$product = $this->product->getById($productID);
|
||||
$this->session->set('releaseList', $this->app->getURI(true));
|
||||
|
||||
$project = $this->loadModel('project')->getById($this->session->PRJ);
|
||||
|
||||
$this->view->title = $project->name . $this->lang->colon . $this->lang->release->browse;
|
||||
$this->view->position[] = $this->lang->release->browse;
|
||||
$this->view->project = $project;
|
||||
$this->view->products = $this->loadModel('product')->getProductsByProject($this->session->PRJ);
|
||||
$this->view->product = $product;
|
||||
$this->view->branches = (isset($product->type) and $product->type == 'normal') ? array() : $this->loadModel('branch')->getPairs($productID);
|
||||
$this->view->branch = $branch;
|
||||
$this->view->releases = $this->projectrelease->getList($this->session->PRJ, $productID, $branch, $type);
|
||||
$this->view->releases = $this->projectrelease->getList($this->session->PRJ, $type);
|
||||
$this->view->type = $type;
|
||||
$this->display();
|
||||
}
|
||||
@@ -90,31 +86,29 @@ class projectrelease extends control
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function create($productID, $branch = 0)
|
||||
public function create()
|
||||
{
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$releaseID = $this->projectrelease->create($productID, $branch);
|
||||
$releaseID = $this->projectrelease->create();
|
||||
if(dao::isError()) $this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
$this->loadModel('action')->create('release', $releaseID, 'opened');
|
||||
|
||||
$this->executeHooks($releaseID);
|
||||
|
||||
if(isonlybody()) $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'closeModal' => true, 'callback' => "parent.loadProductBuilds($productID)"));
|
||||
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => inlink('view', "releaseID=$releaseID")));
|
||||
}
|
||||
|
||||
$builds = $this->loadModel('build')->getProductBuildPairs($productID, $branch, 'notrunk|withbranch', false);
|
||||
$releaseBuilds = $this->projectrelease->getReleaseBuilds($productID, $branch);
|
||||
/* Get the builds that can select. */
|
||||
$builds = $this->loadModel('build')->getProductBuildPairs($this->session->PRJ, 0, 0, 'notrunk');
|
||||
$releaseBuilds = $this->projectrelease->getReleaseBuilds($this->session->PRJ);
|
||||
foreach($releaseBuilds as $build) unset($builds[$build]);
|
||||
unset($builds['trunk']);
|
||||
|
||||
$this->commonAction($productID, $branch);
|
||||
$this->commonAction();
|
||||
$this->view->title = $this->view->project->name . $this->lang->colon . $this->lang->release->create;
|
||||
$this->view->position[] = $this->lang->release->create;
|
||||
$this->view->builds = $builds;
|
||||
$this->view->productID = $productID;
|
||||
$this->view->lastRelease = $this->projectrelease->getLast($productID, $branch);
|
||||
$this->view->lastRelease = $this->projectrelease->getLast($this->session->PRJ);
|
||||
$this->display();
|
||||
}
|
||||
|
||||
|
||||
@@ -2,3 +2,41 @@ $(document).ready(function()
|
||||
{
|
||||
$("a.preview").modalTrigger({width:1000, type:'iframe'});
|
||||
})
|
||||
|
||||
/**
|
||||
* Determined whether to show the productis.
|
||||
*
|
||||
* @param int $build
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function showProducts(build)
|
||||
{
|
||||
if(build) $('#productBox').hide();
|
||||
if(!build) $('#productBox').show();
|
||||
}
|
||||
|
||||
/**
|
||||
* Flush the branch when switching products.
|
||||
*
|
||||
* @param int $productID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function loadBranches(productID)
|
||||
{
|
||||
$('#branch').remove();
|
||||
$('#branch_chosen').remove();
|
||||
$.get(createLink('branch', 'ajaxGetBranches', "productID=" + productID), function(data)
|
||||
{
|
||||
var $product = $('#product');
|
||||
var $inputGroup = $product.closest('.input-group');
|
||||
$inputGroup.find('.input-group-addon').toggleClass('hidden', !data);
|
||||
if(data)
|
||||
{
|
||||
$inputGroup.append(data);
|
||||
$('#branch').css('width', '120px').chosen();
|
||||
}
|
||||
$inputGroup.fixInputGroup();
|
||||
})
|
||||
}
|
||||
|
||||
@@ -52,13 +52,12 @@ class projectreleaseModel extends model
|
||||
*/
|
||||
public function getList($projectID, $productID, $branch = 0, $type = 'all')
|
||||
{
|
||||
return $this->dao->select('t1.*, t2.name as productName, t3.id as buildID, t3.name as buildName, t3.project')
|
||||
return $this->dao->select('t1.*, t2.name as productName, t3.id as buildID, t3.name as buildName, t3.project, t4.name as executionName')
|
||||
->from(TABLE_RELEASE)->alias('t1')
|
||||
->leftJoin(TABLE_PRODUCT)->alias('t2')->on('t1.product = t2.id')
|
||||
->leftJoin(TABLE_BUILD)->alias('t3')->on('t1.build = t3.id')
|
||||
->leftJoin(TABLE_EXECUTION)->alias('t4')->on('t3.project = t4.id')
|
||||
->where('t1.PRJ')->eq((int)$projectID)
|
||||
->andWhere('t1.product')->eq((int)$productID)
|
||||
->beginIF($branch)->andWhere('t1.branch')->eq($branch)->fi()
|
||||
->beginIF($type != 'all')->andWhere('t1.status')->eq($type)->fi()
|
||||
->andWhere('t1.deleted')->eq(0)
|
||||
->orderBy('t1.date DESC')
|
||||
@@ -68,52 +67,45 @@ class projectreleaseModel extends model
|
||||
/**
|
||||
* Get last release.
|
||||
*
|
||||
* @param int $productID
|
||||
* @param int $branch
|
||||
* @param int $projectID
|
||||
* @access public
|
||||
* @return bool | object
|
||||
*/
|
||||
public function getLast($productID, $branch = 0)
|
||||
public function getLast($projectID)
|
||||
{
|
||||
return $this->dao->select('id, name')->from(TABLE_RELEASE)
|
||||
->where('product')->eq((int)$productID)
|
||||
->beginIF($branch)->andWhere('branch')->eq($branch)->fi()
|
||||
->where('PRJ')->eq((int)$projectID)
|
||||
->orderBy('date DESC')
|
||||
->limit(1)
|
||||
->fetch();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get release builds from product.
|
||||
* Get release builds from project.
|
||||
*
|
||||
* @param int $productID
|
||||
* @param int $branch
|
||||
* @param int $projectID
|
||||
* @access public
|
||||
* @return void
|
||||
* @return array
|
||||
*/
|
||||
public function getReleaseBuilds($productID, $branch = 0)
|
||||
public function getReleaseBuilds($projectID)
|
||||
{
|
||||
$releases = $this->dao->select('build')->from(TABLE_RELEASE)
|
||||
->where('deleted')->eq(0)
|
||||
->andWhere('product')->eq($productID)
|
||||
->beginIF($branch)->andWhere('branch')->eq($branch)->fi()
|
||||
->andWhere('PRJ')->eq($projectID)
|
||||
->fetchAll('build');
|
||||
return array_keys($releases);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a release.
|
||||
*
|
||||
* @param int $productID
|
||||
* @param int $branch
|
||||
*
|
||||
* @access public
|
||||
* @return int
|
||||
*/
|
||||
public function create($productID, $branch = 0)
|
||||
public function create()
|
||||
{
|
||||
$productID = (int)$productID;
|
||||
$branch = (int)$branch;
|
||||
$productID = $this->post->product;
|
||||
$branch = $this->post->branch;
|
||||
$buildID = 0;
|
||||
|
||||
/* Check build if build is required. */
|
||||
@@ -122,6 +114,13 @@ class projectreleaseModel extends model
|
||||
/* Check date must be not more than today. */
|
||||
if($this->post->date > date('Y-m-d')) return dao::$errors[] = $this->lang->release->errorDate;
|
||||
|
||||
if($this->post->build)
|
||||
{
|
||||
$build = $this->loadModel('build')->getByID($this->post->build);
|
||||
$productID = $build->product;
|
||||
$branch = $build->branch;
|
||||
}
|
||||
|
||||
$release = fixer::input('post')
|
||||
->add('PRJ', $this->session->PRJ)
|
||||
->add('product', (int)$productID)
|
||||
@@ -130,6 +129,8 @@ class projectreleaseModel extends model
|
||||
->join('stories', ',')
|
||||
->join('bugs', ',')
|
||||
->setIF($this->post->build == false, 'build', $buildID)
|
||||
->setIF($productID, 'product', $productID)
|
||||
->setIF($branch, 'branch', $branch)
|
||||
->stripTags($this->config->release->editor->create['id'], $this->config->allowedTags)
|
||||
->remove('allchecker,files,labels,uid')
|
||||
->get();
|
||||
|
||||
@@ -15,23 +15,15 @@
|
||||
<?php js::set('confirmDelete', $lang->release->confirmDelete)?>
|
||||
<div id="mainMenu" class="clearfix">
|
||||
<div class="btn-toolbar pull-left">
|
||||
<div class="btn-group">
|
||||
<?php echo html::a('javascript:;', "<span class='text'>{$product->name}</span> <span class='caret'></span>", '', "class='btn btn-link btn-limit' style='border-radius: 2px;' data-toggle='dropdown'")?>
|
||||
<ul class="dropdown-menu" style="max-height:240px; max-width: 300px; overflow-y:auto">
|
||||
<?php foreach($products as $product): ?>
|
||||
<li><?php echo html::a($this->inLink('browse', "productID=$product->id&branch=0&type=$type", '', '', $this->session->PRJ), $product->name);?></li>
|
||||
<?php endforeach;?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php
|
||||
echo html::a(inlink('browse', "productID={$product->id}&branch=$branch&type=all"), "<span class='text'>{$lang->release->all}</span>" . ($type == 'all' ? ' <span class="label label-light label-badge">' . count($releases) . '</span>' : ''), '', "id='allTab' class='btn btn-link" . ('all' == $type ? ' btn-active-text' : '') . "'");
|
||||
echo html::a(inlink('browse', "productID={$product->id}&branch=$branch&type=normal"), "<span class='text'>{$lang->release->statusList['normal']}</span>" . ($type == 'normal' ? ' <span class="label label-light label-badge">' . count($releases) . '</span>' : ''), '', "id='normalTab' class='btn btn-link" . ('normal' == $type ? ' btn-active-text' : '') . "'");
|
||||
echo html::a(inlink('browse', "productID={$product->id}&branch=$branch&type=terminate"), "<span class='text'>{$lang->release->statusList['terminate']}</span>" . ($type == 'terminate' ? ' <span class="label label-light label-badge">' . count($releases) . '</span>' : ''), '', "id='terminateTab' class='btn btn-link" . ('terminate' == $type ? ' btn-active-text' : '') . "'");
|
||||
echo html::a(inlink('browse', "type=all"), "<span class='text'>{$lang->release->all}</span>" . ($type == 'all' ? ' <span class="label label-light label-badge">' . count($releases) . '</span>' : ''), '', "id='allTab' class='btn btn-link" . ('all' == $type ? ' btn-active-text' : '') . "'");
|
||||
echo html::a(inlink('browse', "type=normal"), "<span class='text'>{$lang->release->statusList['normal']}</span>" . ($type == 'normal' ? ' <span class="label label-light label-badge">' . count($releases) . '</span>' : ''), '', "id='normalTab' class='btn btn-link" . ('normal' == $type ? ' btn-active-text' : '') . "'");
|
||||
echo html::a(inlink('browse', "type=terminate"), "<span class='text'>{$lang->release->statusList['terminate']}</span>" . ($type == 'terminate' ? ' <span class="label label-light label-badge">' . count($releases) . '</span>' : ''), '', "id='terminateTab' class='btn btn-link" . ('terminate' == $type ? ' btn-active-text' : '') . "'");
|
||||
?>
|
||||
</div>
|
||||
<div class="btn-toolbar pull-right">
|
||||
<?php if(common::canModify('project', $project)):?>
|
||||
<?php common::printLink('projectrelease', 'create', "productID=$product->id&branch=$branch", "<i class='icon icon-plus'></i> {$lang->release->create}", '', "class='btn btn-primary'");?>
|
||||
<?php common::printLink('projectrelease', 'create', '', "<i class='icon icon-plus'></i> {$lang->release->create}", '', "class='btn btn-primary'");?>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
</div>
|
||||
@@ -41,7 +33,7 @@
|
||||
<p>
|
||||
<span class="text-muted"><?php echo $lang->release->noRelease;?></span>
|
||||
<?php if(common::canModify('project', $project) and common::hasPriv('projectrelease', 'create')):?>
|
||||
<?php echo html::a($this->createLink('projectrelease', 'create', "productID=$product->id&branch=$branch"), "<i class='icon icon-plus'></i> " . $lang->release->create, '', "class='btn btn-info'");?>
|
||||
<?php echo html::a($this->createLink('projectrelease', 'create'), "<i class='icon icon-plus'></i> " . $lang->release->create, '', "class='btn btn-info'");?>
|
||||
<?php endif;?>
|
||||
</p>
|
||||
</div>
|
||||
@@ -51,10 +43,9 @@
|
||||
<tr>
|
||||
<th class='w-id'><?php echo $lang->release->id;?></th>
|
||||
<th><?php echo $lang->release->name;?></th>
|
||||
<th class='w-product'><?php echo $lang->release->product;?></th>
|
||||
<th class='w-project'><?php echo $lang->executionCommon;?></th>
|
||||
<th class='w-100px'><?php echo $lang->release->build;?></th>
|
||||
<?php if(isset($product->type) and $product->type != 'normal'):?>
|
||||
<th class='text-center w-100px'><?php echo $lang->product->branch;?></th>
|
||||
<?php endif;?>
|
||||
<th class='c-date text-center w-100px'><?php echo $lang->release->date;?></th>
|
||||
<th class='text-center w-90px'><?php echo $lang->release->status;?></th>
|
||||
<?php
|
||||
@@ -75,10 +66,9 @@
|
||||
echo html::a(inlink('view', "release=$release->id"), $release->name) . $flagIcon;
|
||||
?>
|
||||
</td>
|
||||
<td title='<?php echo $release->productName?>'><?php echo $release->productName?></td>
|
||||
<td title='<?php echo $release->executionName?>'><?php echo $release->executionName?></td>
|
||||
<td title='<?php echo $release->buildName?>'><?php echo empty($release->project) ? $release->buildName : html::a($this->createLink('build', 'view', "buildID=$release->buildID"), $release->buildName);?></td>
|
||||
<?php if(isset($product->type) and $product->type != 'normal'):?>
|
||||
<td class='text-center' title='<?php echo zget($branches, $release->branch, '');?>'><?php echo $branches[$release->branch];?></td>
|
||||
<?php endif;?>
|
||||
<td class='text-center'><?php echo $release->date;?></td>
|
||||
<?php $status = $this->processStatus('release', $release);?>
|
||||
<td class='c-status text-center' title='<?php echo $status;?>'>
|
||||
|
||||
@@ -33,7 +33,16 @@
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->release->build;?></th>
|
||||
<td><?php echo html::select('build', $builds, '', "class='form-control chosen'");?></td><td></td>
|
||||
<td><?php echo html::select('build', $builds, '', "onchange='showProducts(this.value)' class='form-control chosen'");?></td><td></td>
|
||||
</tr>
|
||||
<tr id='productBox'>
|
||||
<th><?php echo $lang->release->product;?></th>
|
||||
<td>
|
||||
<div class='input-group'>
|
||||
<?php echo html::select('product', $products, '', "onchange='loadBranches(this.value)' class='form-control chosen'");?>
|
||||
<?php if($product->type != 'normal') echo html::select('branch', $branches, $branch, "class='form-control chosen control-branch'");?>
|
||||
</div>
|
||||
</td><td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->release->date;?></th>
|
||||
|
||||
Reference in New Issue
Block a user