Merge branch 'master' of https://gitlab.zcorp.cc/easycorp/zentaopms
This commit is contained in:
@@ -19,6 +19,30 @@ $config->productCommonList['fr'][0] = 'Product';
|
||||
$config->productCommonList['vi'][0] = 'Sản phẩm';
|
||||
|
||||
/* Project common list. */
|
||||
$config->projectCommonList['zh-cn'][0] = '项目';
|
||||
$config->projectCommonList['zh-cn'][1] = '迭代';
|
||||
$config->projectCommonList['zh-cn'][2] = '冲刺';
|
||||
|
||||
$config->projectCommonList['zh-tw'][0] = '項目';
|
||||
$config->projectCommonList['zh-tw'][1] = '迭代';
|
||||
$config->projectCommonList['zh-tw'][2] = '冲刺';
|
||||
|
||||
$config->projectCommonList['en'][0] = 'Project';
|
||||
$config->projectCommonList['en'][1] = 'Iteration';
|
||||
$config->projectCommonList['en'][2] = 'Sprint';
|
||||
|
||||
$config->projectCommonList['de'][0] = 'Project';
|
||||
$config->projectCommonList['de'][1] = 'Iteration';
|
||||
$config->projectCommonList['de'][2] = 'Sprint';
|
||||
|
||||
$config->projectCommonList['fr'][0] = 'Project';
|
||||
$config->projectCommonList['fr'][1] = 'Iteration';
|
||||
$config->projectCommonList['fr'][2] = 'Sprint';
|
||||
|
||||
$config->projectCommonList['vi'][0] = 'Project';
|
||||
$config->projectCommonList['vi'][1] = 'Iteration';
|
||||
$config->projectCommonList['vi'][2] = 'Sprint';
|
||||
|
||||
$config->executionCommonList['zh-cn'][0] = '迭代';
|
||||
$config->executionCommonList['zh-cn'][1] = '冲刺';
|
||||
$config->executionCommonList['zh-cn'][2] = '阶段';
|
||||
|
||||
@@ -171,7 +171,7 @@ class router extends baseRouter
|
||||
$commonSettings = array();
|
||||
try
|
||||
{
|
||||
$commonSettings = $this->dbh->query('SELECT section, `key`, value FROM' . TABLE_CONFIG . "WHERE `owner`='system' AND `module`='custom' and `key` in ('sprintConcept', 'hourPoint', 'URSR')")->fetchAll();
|
||||
$commonSettings = $this->dbh->query('SELECT section, `key`, value FROM' . TABLE_CONFIG . "WHERE `owner`='system' AND (`module`='custom' or `module`='common') and `key` in ('sprintConcept', 'hourPoint', 'URSR', 'mode')")->fetchAll();
|
||||
}
|
||||
catch (PDOException $exception)
|
||||
{
|
||||
@@ -180,6 +180,7 @@ class router extends baseRouter
|
||||
}
|
||||
|
||||
$hourKey = $planKey = $URSR = 0;
|
||||
$mode = 'new';
|
||||
$projectKey = empty($this->config->isINT) ? ITERATION_KEY : SPRINT_KEY;
|
||||
|
||||
foreach($commonSettings as $setting)
|
||||
@@ -187,8 +188,13 @@ class router extends baseRouter
|
||||
if($setting->key == 'sprintConcept') $projectKey = $setting->value;
|
||||
if($setting->key == 'hourPoint') $hourKey = $setting->value;
|
||||
if($setting->key == 'URSR') $URSR = $setting->value;
|
||||
if($setting->key == 'mode' and $setting->section == 'global') $mode = $setting->value;
|
||||
}
|
||||
|
||||
/* Record system mode. */
|
||||
$config->systemMode = $mode;
|
||||
if($config->systemMode == 'old') $this->config->executionCommonList = $this->config->projectCommonList;
|
||||
|
||||
/* Record hour unit. */
|
||||
$config->hourUnit = 'H';
|
||||
if($hourKey == STORYPOINT_KEY) $config->hourUnit = 'SP';
|
||||
|
||||
@@ -208,6 +208,7 @@ class actionModel extends model
|
||||
*/
|
||||
public function getList($objectType, $objectID)
|
||||
{
|
||||
if($this->config->global->mode == 'old' and $objectType == 'execution') $objectType = 'project';
|
||||
$commiters = $this->loadModel('user')->getCommiters();
|
||||
$actions = $this->dao->select('*')->from(TABLE_ACTION)
|
||||
->beginIF($objectType == 'project')
|
||||
|
||||
+22
-13
@@ -609,7 +609,8 @@ class block extends control
|
||||
$this->session->set('bugList', $this->app->getURI(true));
|
||||
if(preg_match('/[^a-zA-Z0-9_]/', $this->params->type)) die();
|
||||
|
||||
$projectID = $this->view->block->module == 'my' ? 0 : (int)$this->session->PRJ;
|
||||
$projectID = $this->lang->navGroup->qa == 'project' ? $this->session->PRJ : 0;
|
||||
$projectID = $this->view->block->module == 'my' ? 0 : $projectID;
|
||||
$this->view->bugs = $this->loadModel('bug')->getUserBugs($this->app->user->account, $this->params->type, $this->params->orderBy, $this->viewType == 'json' ? 0 : (int)$this->params->count, null, $projectID);
|
||||
}
|
||||
|
||||
@@ -625,6 +626,9 @@ class block extends control
|
||||
$this->app->loadLang('testcase');
|
||||
$this->app->loadLang('testtask');
|
||||
|
||||
$projectID = $this->lang->navGroup->qa == 'project' ? $this->session->PRJ : 0;
|
||||
$projectID = $this->view->block->module == 'my' ? 0 : $projectID;
|
||||
|
||||
$cases = array();
|
||||
if($this->params->type == 'assigntome')
|
||||
{
|
||||
@@ -636,7 +640,7 @@ class block extends control
|
||||
->andWhere('t3.status')->ne('done')
|
||||
->andWhere('t3.deleted')->eq(0)
|
||||
->andWhere('t2.deleted')->eq(0)
|
||||
->beginIF($this->view->block->module != 'my' and $this->session->PRJ)->andWhere('t2.PRJ')->eq((int)$this->session->PRJ)->fi()
|
||||
->beginIF($projectID)->andWhere('t2.PRJ')->eq($projectID)->fi()
|
||||
->orderBy($this->params->orderBy)
|
||||
->beginIF($this->viewType != 'json')->limit((int)$this->params->count)->fi()
|
||||
->fetchAll();
|
||||
@@ -645,12 +649,12 @@ class block extends control
|
||||
{
|
||||
$cases = $this->dao->findByOpenedBy($this->app->user->account)->from(TABLE_CASE)
|
||||
->andWhere('deleted')->eq(0)
|
||||
->beginIF($this->view->block->module != 'my' and $this->session->PRJ)->andWhere('PRJ')->eq((int)$this->session->PRJ)->fi()
|
||||
->beginIF($projectID)->andWhere('PRJ')->eq($projectID)->fi()
|
||||
->orderBy($this->params->orderBy)
|
||||
->beginIF($this->viewType != 'json')->limit((int)$this->params->count)->fi()
|
||||
->fetchAll();
|
||||
}
|
||||
$this->view->cases = $cases;
|
||||
$this->view->cases = $cases;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -661,16 +665,21 @@ class block extends control
|
||||
*/
|
||||
public function printTesttaskBlock()
|
||||
{
|
||||
$this->app->loadLang('testtask');
|
||||
|
||||
$this->session->set('testtaskList', $this->app->getURI(true));
|
||||
if(preg_match('/[^a-zA-Z0-9_]/', $this->params->type)) die();
|
||||
$this->app->loadLang('testtask');
|
||||
|
||||
$projectID = $this->lang->navGroup->qa == 'project' ? $this->session->PRJ : 0;
|
||||
$projectID = $this->view->block->module == 'my' ? 0 : $projectID;
|
||||
|
||||
$this->view->testtasks = $this->dao->select('t1.*,t2.name as productName,t3.name as buildName,t4.name as projectName')->from(TABLE_TESTTASK)->alias('t1')
|
||||
->leftJoin(TABLE_PRODUCT)->alias('t2')->on('t1.product=t2.id')
|
||||
->leftJoin(TABLE_BUILD)->alias('t3')->on('t1.build=t3.id')
|
||||
->leftJoin(TABLE_PROJECT)->alias('t4')->on('t1.project=t4.id')
|
||||
->leftJoin(TABLE_PROJECTPRODUCT)->alias('t5')->on('t1.project=t5.project')
|
||||
->where('t1.deleted')->eq('0')
|
||||
->beginIF($this->view->block->module != 'my' and $this->session->PRJ)->andWhere('t1.PRJ')->eq((int)$this->session->PRJ)->fi()
|
||||
->beginIF($projectID)->andWhere('t1.PRJ')->eq($projectID)->fi()
|
||||
->beginIF(!$this->app->user->admin)->andWhere('t1.product')->in($this->app->user->view->products)->fi()
|
||||
->andWhere('t1.product = t5.product')
|
||||
->beginIF($this->params->type != 'all')->andWhere('t1.status')->eq($this->params->type)->fi()
|
||||
@@ -1474,19 +1483,19 @@ class block extends control
|
||||
$status = isset($this->params->type) ? $this->params->type : '';
|
||||
$count = isset($this->params->count) ? (int)$this->params->count : 0;
|
||||
|
||||
$products = $this->loadModel('product')->getOrderedProducts($status, $count, $this->session->PRJ);
|
||||
$productIdList = array_keys($products);
|
||||
|
||||
$projectID = $this->lang->navGroup->qa == 'project' ? $this->session->PRJ : 0;
|
||||
$products = $this->loadModel('product')->getOrderedProducts($status, $count, $projectID);
|
||||
if(empty($products))
|
||||
{
|
||||
$this->view->products = $products;
|
||||
return false;
|
||||
}
|
||||
|
||||
$today = date(DT_DATE1);
|
||||
$yesterday = date(DT_DATE1, strtotime('yesterday'));
|
||||
$testtasks = $this->dao->select('*')->from(TABLE_TESTTASK)->where('product')->in($productIdList)->andWhere('project')->ne(0)->andWhere('deleted')->eq(0)->orderBy('id')->fetchAll('product');
|
||||
$bugs = $this->dao->select("product, count(id) as total,
|
||||
$productIdList = array_keys($products);
|
||||
$today = date(DT_DATE1);
|
||||
$yesterday = date(DT_DATE1, strtotime('yesterday'));
|
||||
$testtasks = $this->dao->select('*')->from(TABLE_TESTTASK)->where('product')->in($productIdList)->andWhere('project')->ne(0)->andWhere('deleted')->eq(0)->orderBy('id')->fetchAll('product');
|
||||
$bugs = $this->dao->select("product, count(id) as total,
|
||||
count(assignedTo = '{$this->app->user->account}' or null) as assignedToMe,
|
||||
count(status != 'closed' or null) as unclosed,
|
||||
count((status != 'closed' and status != 'resolved') or null) as unresolved,
|
||||
|
||||
+12
-2
@@ -11,7 +11,8 @@
|
||||
*/
|
||||
class bug extends control
|
||||
{
|
||||
public $products = array();
|
||||
public $products = array();
|
||||
public $projectID = 0;
|
||||
|
||||
/**
|
||||
* Construct function, load some modules auto.
|
||||
@@ -32,7 +33,16 @@ class bug extends control
|
||||
$this->loadModel('story');
|
||||
$this->loadModel('task');
|
||||
|
||||
$this->view->products = $this->products = $this->product->getProductPairsByProject($this->session->PRJ);
|
||||
/* Set bug menu group. */
|
||||
$this->projectID = isset($_GET['PRJ']) ? $_GET['PRJ'] : 0;
|
||||
if(!$this->projectID)
|
||||
{
|
||||
$this->app->loadConfig('qa');
|
||||
foreach($this->config->qa->menuList as $module) $this->lang->navGroup->$module = 'qa';
|
||||
$this->lang->noMenuModule[] = $this->app->rawModule;
|
||||
}
|
||||
|
||||
$this->view->products = $this->products = $this->product->getProductPairsByProject($this->projectID);
|
||||
if($this->session->PRJ and empty($this->products)) die($this->locate($this->createLink('product', 'showErrorNone', "fromModule=bug")));
|
||||
}
|
||||
|
||||
|
||||
@@ -48,6 +48,8 @@ class bugModel extends model
|
||||
$replace = $productID;
|
||||
common::setMenuVars($this->lang->bug->menu, $key, $replace);
|
||||
}
|
||||
|
||||
if($this->lang->navGroup->bug == 'qa') $this->lang->qa->menu = $this->lang->bug->menu;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -61,12 +63,12 @@ class bugModel extends model
|
||||
{
|
||||
$now = helper::now();
|
||||
$bug = fixer::input('post')
|
||||
->setDefault('PRJ', $this->session->PRJ)
|
||||
->setDefault('openedBy', $this->app->user->account)
|
||||
->setDefault('openedDate', $now)
|
||||
->setDefault('project,story,task', 0)
|
||||
->setDefault('openedBuild', '')
|
||||
->setDefault('deadline', '0000-00-00')
|
||||
->setIF($this->config->global->mode == 'new', 'PRJ', $this->session->PRJ)
|
||||
->setIF(strpos($this->config->bug->create->requiredFields, 'deadline') !== false, 'deadline', $this->post->deadline)
|
||||
->setIF($this->post->assignedTo != '', 'assignedDate', $now)
|
||||
->setIF($this->post->story != false, 'storyVersion', $this->loadModel('story')->getVersion($this->post->story))
|
||||
@@ -228,7 +230,7 @@ class bugModel extends model
|
||||
}
|
||||
}
|
||||
|
||||
$bug->PRJ = $this->session->PRJ;
|
||||
if($this->config->global->mode == 'new') $bug->PRJ = $this->session->PRJ;
|
||||
$this->dao->insert(TABLE_BUG)->data($bug)
|
||||
->autoCheck()
|
||||
->batchCheck($this->config->bug->create->requiredFields, 'notempty')
|
||||
|
||||
@@ -13,6 +13,21 @@ class caselib extends control
|
||||
{
|
||||
public $products = array();
|
||||
|
||||
public function __construct($moduleName = '', $methodName = '')
|
||||
{
|
||||
parent::__construct($moduleName, $methodName);
|
||||
|
||||
/* Set testtask menu group. */
|
||||
$this->projectID = isset($_GET['PRJ']) ? $_GET['PRJ'] : 0;
|
||||
if(!$this->projectID)
|
||||
{
|
||||
$this->app->loadConfig('qa');
|
||||
foreach($this->config->qa->menuList as $module) $this->lang->navGroup->$module = 'qa';
|
||||
$this->lang->noMenuModule[] = $this->app->rawModule;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Index page, header to browse.
|
||||
*
|
||||
|
||||
@@ -104,7 +104,9 @@ class caselibModel extends model
|
||||
$replace = $libID;
|
||||
common::setMenuVars($this->lang->caselib->menu, $key, $replace);
|
||||
}
|
||||
|
||||
if($this->config->global->flow != 'full' && $this->app->getMethodName() != 'view') $this->lang->caselib->menu->bysearch = "<a class='querybox-toggle' id='bysearchTab'><i class='icon icon-search muted'> </i>{$this->lang->testcase->bySearch}</a>";
|
||||
if($this->lang->navGroup->caselib == 'qa') $this->lang->qa->menu = $this->lang->caselib->menu;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -217,7 +219,7 @@ class caselibModel extends model
|
||||
$lib = fixer::input('post')
|
||||
->stripTags($this->config->caselib->editor->create['id'], $this->config->allowedTags)
|
||||
->setForce('type', 'library')
|
||||
->add('PRJ', $this->session->PRJ)
|
||||
->setIF($this->config->global->mode == 'new', 'PRJ', $this->session->PRJ)
|
||||
->add('addedBy', $this->app->user->account)
|
||||
->add('addedDate', helper::now())
|
||||
->remove('uid')
|
||||
@@ -610,7 +612,7 @@ class caselibModel extends model
|
||||
$data[$i]->openedDate = $now;
|
||||
$data[$i]->status = $forceNotReview ? 'normal' : 'wait';
|
||||
$data[$i]->version = 1;
|
||||
$data[$i]->PRJ = $this->session->PRJ;
|
||||
if($this->config->global->mode == 'new') $data[$i]->PRJ = $this->session->PRJ;
|
||||
|
||||
$this->dao->insert(TABLE_CASE)->data($data[$i])
|
||||
->autoCheck()
|
||||
|
||||
@@ -141,7 +141,6 @@ list($projectModule, $projectMethod) = explode('-', $config->projectLink);
|
||||
/* Main menu. */
|
||||
$lang->mainNav = new stdclass();
|
||||
$lang->mainNav->my = '<i class="icon icon-menu-my"></i> My|my|index|';
|
||||
$lang->mainNav->program = '<i class="icon icon-folder-open-o"></i> Program|program|pgmbrowse|';
|
||||
$lang->mainNav->product = '<i class="icon icon-menu-project"></i> Product|product|index|';
|
||||
$lang->mainNav->project = '<i class="icon icon-file"></i> Project|program|prjbrowse|';
|
||||
$lang->mainNav->qa = '<i class="icon icon-test"></i> Test|qa|index|';
|
||||
@@ -150,6 +149,7 @@ $lang->mainNav->doc = '<i class="icon icon-doc"></i> Doc|doc|index|';
|
||||
$lang->mainNav->report = "<i class='icon icon-statistic'></i> Statistic|report|productsummary|";
|
||||
$lang->mainNav->system = '<i class="icon icon-menu-users"></i> System|custom|estimate|';
|
||||
$lang->mainNav->admin = '<i class="icon icon-menu-backend"></i> Admin|admin|index|';
|
||||
if($config->systemMode == 'new') $lang->mainNav->program = '<i class="icon icon-folder-open-o"></i> Program|program|pgmbrowse|';
|
||||
|
||||
$lang->reporting = new stdclass();
|
||||
$lang->dividerMenu = ',qa,report,admin,';
|
||||
@@ -294,8 +294,15 @@ $lang->my->menu = new stdclass();
|
||||
$lang->my->menu->index = 'Index|my|index';
|
||||
$lang->my->menu->calendar = array('link' => 'Calendar|my|calendar|', 'subModule' => 'todo', 'alias' => 'todo');
|
||||
$lang->my->menu->myWork = array('link' => 'Work|my|work|mode=task');
|
||||
$lang->my->menu->myProject = array('link' => 'Project|my|project|');
|
||||
$lang->my->menu->myExecution = 'Execution|my|execution|type=undone';
|
||||
if($config->systemMode == 'new')
|
||||
{
|
||||
$lang->my->menu->myProject = array('link' => 'Project|my|project|');
|
||||
$lang->my->menu->myExecution = 'Execution|my|execution|type=undone';
|
||||
}
|
||||
else
|
||||
{
|
||||
$lang->my->menu->myExecution = $lang->executionCommon . '|my|execution|type=undone';
|
||||
}
|
||||
$lang->my->menu->contribute = array('link' => 'Contribute|my|contribute|mode=task');
|
||||
$lang->my->menu->dynamic = 'Dynamic|my|dynamic|';
|
||||
$lang->my->menu->score = 'Score|my|score|';
|
||||
@@ -309,8 +316,11 @@ $lang->my->workMenu->story = "$lang->SRCommon|my|work|mode=story";
|
||||
$lang->my->workMenu->bug = 'Bug|my|work|mode=bug';
|
||||
$lang->my->workMenu->testcase = 'Test Case|my|work|mode=testcase&type=assigntome';
|
||||
$lang->my->workMenu->testtask = 'Test Task|my|work|mode=testtask&type=wait';
|
||||
$lang->my->workMenu->issue = 'Issue|my|work|mode=issue';
|
||||
$lang->my->workMenu->risk = 'Risk|my|work|mode=risk';
|
||||
if($config->systemMode == 'new')
|
||||
{
|
||||
$lang->my->workMenu->issue = 'Issue|my|work|mode=issue';
|
||||
$lang->my->workMenu->risk = 'Risk|my|work|mode=risk';
|
||||
}
|
||||
|
||||
$lang->my->contributeMenu = new stdclass();
|
||||
$lang->my->contributeMenu->task = 'Task|my|contribute|mode=task';
|
||||
@@ -319,8 +329,11 @@ $lang->my->contributeMenu->story = "$lang->SRCommon|my|contribute|mode=sto
|
||||
$lang->my->contributeMenu->bug = 'Bug|my|contribute|mode=bug';
|
||||
$lang->my->contributeMenu->testcase = 'Test Case|my|contribute|mode=testtask&type=openedbyme';
|
||||
$lang->my->contributeMenu->testtask = 'Test Task|my|contribute|mode=testtask&type=done';
|
||||
$lang->my->contributeMenu->issue = 'Issue|my|contribute|mode=issue';
|
||||
$lang->my->contributeMenu->risk = 'Risk|my|contribute|mode=risk';
|
||||
if($config->systemMode == 'new')
|
||||
{
|
||||
$lang->my->contributeMenu->issue = 'Issue|my|contribute|mode=issue';
|
||||
$lang->my->contributeMenu->risk = 'Risk|my|contribute|mode=risk';
|
||||
}
|
||||
|
||||
$lang->my->dividerMenu = ',myProject,team,';
|
||||
|
||||
@@ -1026,5 +1039,10 @@ $lang->design->menu->bysearch = array('link' => '<a href="javascript:;" class="q
|
||||
|
||||
$lang->nc->menu = $lang->auditplan->menu;
|
||||
$lang->noMenuModule = array('report', 'my', 'todo', 'effort', 'program', 'product', 'productplan', 'projectbuild', 'projectrelease', 'projectstory', 'story', 'branch', 'release', 'attend', 'leave', 'makeup', 'overtime', 'lieu', 'custom', 'admin', 'mail', 'extension', 'dev', 'backup', 'action', 'cron', 'issue', 'risk', 'pssp', 'sms', 'message', 'webhook', 'search', 'score', 'stage');
|
||||
if($config->systemMode == 'old')
|
||||
{
|
||||
$lang->noMenuModule[] = 'project';
|
||||
$lang->noMenuModule[] = 'task';
|
||||
}
|
||||
|
||||
include (dirname(__FILE__) . '/menuOrder.php');
|
||||
|
||||
@@ -141,7 +141,6 @@ list($projectModule, $projectMethod) = explode('-', $config->projectLink);
|
||||
/* Main menu. */
|
||||
$lang->mainNav = new stdclass();
|
||||
$lang->mainNav->my = '<i class="icon icon-menu-my"></i> My|my|index|';
|
||||
$lang->mainNav->program = '<i class="icon icon-folder-open-o"></i> Program|program|pgmbrowse|';
|
||||
$lang->mainNav->product = '<i class="icon icon-menu-project"></i> Product|product|index|';
|
||||
$lang->mainNav->project = '<i class="icon icon-file"></i> Project|program|prjbrowse|';
|
||||
$lang->mainNav->qa = '<i class="icon icon-test"></i> Test|qa|index|';
|
||||
@@ -150,6 +149,7 @@ $lang->mainNav->doc = '<i class="icon icon-doc"></i> Doc|doc|index|';
|
||||
$lang->mainNav->report = "<i class='icon icon-statistic'></i> Statistic|report|productsummary|";
|
||||
$lang->mainNav->system = '<i class="icon icon-menu-users"></i> System|custom|estimate|';
|
||||
$lang->mainNav->admin = '<i class="icon icon-menu-backend"></i> Admin|admin|index|';
|
||||
if($config->systemMode == 'new') $lang->mainNav->program = '<i class="icon icon-folder-open-o"></i> Program|program|pgmbrowse|';
|
||||
|
||||
$lang->reporting = new stdclass();
|
||||
$lang->dividerMenu = ',qa,report,admin,';
|
||||
@@ -294,8 +294,15 @@ $lang->my->menu = new stdclass();
|
||||
$lang->my->menu->index = 'Index|my|index';
|
||||
$lang->my->menu->calendar = array('link' => 'Calendar|my|calendar|', 'subModule' => 'todo', 'alias' => 'todo');
|
||||
$lang->my->menu->myWork = array('link' => 'Work|my|work|mode=task');
|
||||
$lang->my->menu->myProject = array('link' => 'Project|my|project|');
|
||||
$lang->my->menu->myExecution = 'Execution|my|execution|type=undone';
|
||||
if($config->systemMode == 'new')
|
||||
{
|
||||
$lang->my->menu->myProject = array('link' => 'Project|my|project|');
|
||||
$lang->my->menu->myExecution = 'Execution|my|execution|type=undone';
|
||||
}
|
||||
else
|
||||
{
|
||||
$lang->my->menu->myExecution = $lang->executionCommon . '|my|execution|type=undone';
|
||||
}
|
||||
$lang->my->menu->contribute = array('link' => 'Contribute|my|contribute|mode=task');
|
||||
$lang->my->menu->dynamic = 'Dynamic|my|dynamic|';
|
||||
$lang->my->menu->score = 'Score|my|score|';
|
||||
@@ -309,8 +316,11 @@ $lang->my->workMenu->story = "$lang->SRCommon|my|work|mode=story";
|
||||
$lang->my->workMenu->bug = 'Bug|my|work|mode=bug';
|
||||
$lang->my->workMenu->testcase = 'Test Case|my|work|mode=testcase&type=assigntome';
|
||||
$lang->my->workMenu->testtask = 'Test Task|my|work|mode=testtask&type=wait';
|
||||
$lang->my->workMenu->issue = 'Issue|my|work|mode=issue';
|
||||
$lang->my->workMenu->risk = 'Risk|my|work|mode=risk';
|
||||
if($config->systemMode == 'new')
|
||||
{
|
||||
$lang->my->workMenu->issue = 'Issue|my|work|mode=issue';
|
||||
$lang->my->workMenu->risk = 'Risk|my|work|mode=risk';
|
||||
}
|
||||
|
||||
$lang->my->contributeMenu = new stdclass();
|
||||
$lang->my->contributeMenu->task = 'Task|my|contribute|mode=task';
|
||||
@@ -319,8 +329,11 @@ $lang->my->contributeMenu->story = "$lang->SRCommon|my|contribute|mode=sto
|
||||
$lang->my->contributeMenu->bug = 'Bug|my|contribute|mode=bug';
|
||||
$lang->my->contributeMenu->testcase = 'Test Case|my|contribute|mode=testtask&type=openedbyme';
|
||||
$lang->my->contributeMenu->testtask = 'Test Task|my|contribute|mode=testtask&type=done';
|
||||
$lang->my->contributeMenu->issue = 'Issue|my|contribute|mode=issue';
|
||||
$lang->my->contributeMenu->risk = 'Risk|my|contribute|mode=risk';
|
||||
if($config->systemMode == 'new')
|
||||
{
|
||||
$lang->my->contributeMenu->issue = 'Issue|my|contribute|mode=issue';
|
||||
$lang->my->contributeMenu->risk = 'Risk|my|contribute|mode=risk';
|
||||
}
|
||||
|
||||
$lang->my->dividerMenu = ',myProject,team,';
|
||||
|
||||
@@ -1026,5 +1039,10 @@ $lang->design->menu->bysearch = array('link' => '<a href="javascript:;" class="q
|
||||
|
||||
$lang->nc->menu = $lang->auditplan->menu;
|
||||
$lang->noMenuModule = array('report', 'my', 'todo', 'effort', 'program', 'product', 'productplan', 'projectbuild', 'projectrelease', 'projectstory', 'story', 'branch', 'release', 'attend', 'leave', 'makeup', 'overtime', 'lieu', 'custom', 'admin', 'mail', 'extension', 'dev', 'backup', 'action', 'cron', 'issue', 'risk', 'pssp', 'sms', 'message', 'webhook', 'search', 'score', 'stage');
|
||||
if($config->systemMode == 'old')
|
||||
{
|
||||
$lang->noMenuModule[] = 'project';
|
||||
$lang->noMenuModule[] = 'task';
|
||||
}
|
||||
|
||||
include (dirname(__FILE__) . '/menuOrder.php');
|
||||
|
||||
@@ -141,7 +141,6 @@ list($projectModule, $projectMethod) = explode('-', $config->projectLink);
|
||||
/* Main menu. */
|
||||
$lang->mainNav = new stdclass();
|
||||
$lang->mainNav->my = '<i class="icon icon-menu-my"></i> My|my|index|';
|
||||
$lang->mainNav->program = '<i class="icon icon-folder-open-o"></i> Program|program|pgmbrowse|';
|
||||
$lang->mainNav->product = '<i class="icon icon-menu-project"></i> Product|product|index|';
|
||||
$lang->mainNav->project = '<i class="icon icon-file"></i> Project|program|prjbrowse|';
|
||||
$lang->mainNav->qa = '<i class="icon icon-test"></i> Test|qa|index|';
|
||||
@@ -150,6 +149,7 @@ $lang->mainNav->report = "<i class='icon icon-statistic'></i> Statistic|report|
|
||||
$lang->mainNav->doc = '<i class="icon icon-doc"></i> Doc|doc|index|';
|
||||
$lang->mainNav->system = '<i class="icon icon-menu-users"></i> System|custom|estimate|';
|
||||
$lang->mainNav->admin = '<i class="icon icon-menu-backend"></i> Admin|admin|index|';
|
||||
if($config->systemMode == 'new') $lang->mainNav->program = '<i class="icon icon-folder-open-o"></i> Program|program|pgmbrowse|';
|
||||
|
||||
$lang->reporting = new stdclass();
|
||||
$lang->dividerMenu = ',qa,report,admin,';
|
||||
@@ -294,8 +294,15 @@ $lang->my->menu = new stdclass();
|
||||
$lang->my->menu->index = 'Index|my|index';
|
||||
$lang->my->menu->calendar = array('link' => 'Calendar|my|calendar|', 'subModule' => 'todo', 'alias' => 'todo');
|
||||
$lang->my->menu->myWork = array('link' => 'Work|my|work|mode=task');
|
||||
$lang->my->menu->myProject = array('link' => 'Project|my|project|');
|
||||
$lang->my->menu->myExecution = 'Execution|my|execution|type=undone';
|
||||
if($config->systemMode == 'new')
|
||||
{
|
||||
$lang->my->menu->myProject = array('link' => 'Project|my|project|');
|
||||
$lang->my->menu->myExecution = 'Execution|my|execution|type=undone';
|
||||
}
|
||||
else
|
||||
{
|
||||
$lang->my->menu->myExecution = $lang->executionCommon . '|my|execution|type=undone';
|
||||
}
|
||||
$lang->my->menu->contribute = array('link' => 'Contribute|my|contribute|mode=task');
|
||||
$lang->my->menu->dynamic = 'Dynamic|my|dynamic|';
|
||||
$lang->my->menu->score = 'Score|my|score|';
|
||||
@@ -309,8 +316,11 @@ $lang->my->workMenu->story = "$lang->SRCommon|my|work|mode=story";
|
||||
$lang->my->workMenu->bug = 'Bug|my|work|mode=bug';
|
||||
$lang->my->workMenu->testcase = 'Test Case|my|work|mode=testcase&type=assigntome';
|
||||
$lang->my->workMenu->testtask = 'Test Task|my|work|mode=testtask&type=wait';
|
||||
$lang->my->workMenu->issue = 'Issue|my|work|mode=issue';
|
||||
$lang->my->workMenu->risk = 'Risk|my|work|mode=risk';
|
||||
if($config->systemMode == 'new')
|
||||
{
|
||||
$lang->my->workMenu->issue = 'Issue|my|work|mode=issue';
|
||||
$lang->my->workMenu->risk = 'Risk|my|work|mode=risk';
|
||||
}
|
||||
|
||||
$lang->my->contributeMenu = new stdclass();
|
||||
$lang->my->contributeMenu->task = 'Task|my|contribute|mode=task';
|
||||
@@ -319,8 +329,11 @@ $lang->my->contributeMenu->story = "$lang->SRCommon|my|contribute|mode=sto
|
||||
$lang->my->contributeMenu->bug = 'Bug|my|contribute|mode=bug';
|
||||
$lang->my->contributeMenu->testcase = 'Test Case|my|contribute|mode=testtask&type=openedbyme';
|
||||
$lang->my->contributeMenu->testtask = 'Test Task|my|contribute|mode=testtask&type=done';
|
||||
$lang->my->contributeMenu->issue = 'Issue|my|contribute|mode=issue';
|
||||
$lang->my->contributeMenu->risk = 'Risk|my|contribute|mode=risk';
|
||||
if($config->systemMode == 'new')
|
||||
{
|
||||
$lang->my->contributeMenu->issue = 'Issue|my|contribute|mode=issue';
|
||||
$lang->my->contributeMenu->risk = 'Risk|my|contribute|mode=risk';
|
||||
}
|
||||
|
||||
$lang->my->dividerMenu = ',myProject,team,';
|
||||
|
||||
@@ -1026,5 +1039,10 @@ $lang->design->menu->bysearch = array('link' => '<a href="javascript:;" class="q
|
||||
|
||||
$lang->nc->menu = $lang->auditplan->menu;
|
||||
$lang->noMenuModule = array('report', 'my', 'todo', 'effort', 'program', 'product', 'productplan', 'projectbuild', 'projectrelease', 'projectstory', 'story', 'branch', 'release', 'attend', 'leave', 'makeup', 'overtime', 'lieu', 'custom', 'admin', 'mail', 'extension', 'dev', 'backup', 'action', 'cron', 'issue', 'risk', 'pssp', 'sms', 'message', 'webhook', 'search', 'score', 'stage');
|
||||
if($config->systemMode == 'old')
|
||||
{
|
||||
$lang->noMenuModule[] = 'project';
|
||||
$lang->noMenuModule[] = 'task';
|
||||
}
|
||||
|
||||
include (dirname(__FILE__) . '/menuOrder.php');
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
<?php
|
||||
$lang->mainNav->menuOrder[5] = 'my';
|
||||
$lang->mainNav->menuOrder[10] = 'program';
|
||||
$lang->mainNav->menuOrder[15] = 'product';
|
||||
$lang->mainNav->menuOrder[20] = 'project';
|
||||
$lang->mainNav->menuOrder[23] = 'qa';
|
||||
@@ -9,6 +8,7 @@ $lang->mainNav->menuOrder[30] = 'doc';
|
||||
$lang->mainNav->menuOrder[35] = 'report';
|
||||
$lang->mainNav->menuOrder[60] = 'system';
|
||||
$lang->mainNav->menuOrder[70] = 'admin';
|
||||
if($config->systemMode == 'new') $lang->mainNav->menuOrder[10] = 'program';
|
||||
|
||||
/* Sort of main menu. */
|
||||
$lang->waterfall->menuOrder[5] = 'programindex';
|
||||
|
||||
@@ -141,7 +141,6 @@ list($projectModule, $projectMethod) = explode('-', $config->projectLink);
|
||||
/* Main menu. */
|
||||
$lang->mainNav = new stdclass();
|
||||
$lang->mainNav->my = '<i class="icon icon-menu-my"></i> My|my|index|';
|
||||
$lang->mainNav->program = '<i class="icon icon-folder-open-o"></i> Program|program|pgmbrowse|';
|
||||
$lang->mainNav->product = '<i class="icon icon-menu-project"></i> Product|product|index|';
|
||||
$lang->mainNav->project = '<i class="icon icon-file"></i> Project|program|prjbrowse|';
|
||||
$lang->mainNav->qa = '<i class="icon icon-test"></i> Test|qa|index|';
|
||||
@@ -150,6 +149,7 @@ $lang->mainNav->doc = '<i class="icon icon-doc"></i> Doc|doc|index|';
|
||||
$lang->mainNav->report = "<i class='icon icon-statistic'></i> Statistic|report|productsummary|";
|
||||
$lang->mainNav->system = '<i class="icon icon-menu-users"></i> System|custom|estimate|';
|
||||
$lang->mainNav->admin = '<i class="icon icon-menu-backend"></i> Admin|admin|index|';
|
||||
if($config->systemMode == 'new') $lang->mainNav->program = '<i class="icon icon-folder-open-o"></i> Program|program|pgmbrowse|';
|
||||
|
||||
$lang->reporting = new stdclass();
|
||||
$lang->dividerMenu = ',qa,report,admin,';
|
||||
@@ -294,8 +294,15 @@ $lang->my->menu = new stdclass();
|
||||
$lang->my->menu->index = 'Index|my|index';
|
||||
$lang->my->menu->calendar = array('link' => 'Calendar|my|calendar|', 'subModule' => 'todo', 'alias' => 'todo');
|
||||
$lang->my->menu->myWork = array('link' => 'Work|my|work|mode=task');
|
||||
$lang->my->menu->myProject = array('link' => 'Project|my|project|');
|
||||
$lang->my->menu->myExecution = 'Execution|my|execution|type=undone';
|
||||
if($config->systemMode == 'new')
|
||||
{
|
||||
$lang->my->menu->myProject = array('link' => 'Project|my|project|');
|
||||
$lang->my->menu->myExecution = 'Execution|my|execution|type=undone';
|
||||
}
|
||||
else
|
||||
{
|
||||
$lang->my->menu->myExecution = $lang->executionCommon . '|my|execution|type=undone';
|
||||
}
|
||||
$lang->my->menu->contribute = array('link' => 'Contribute|my|contribute|mode=task');
|
||||
$lang->my->menu->dynamic = 'Dynamic|my|dynamic|';
|
||||
$lang->my->menu->score = 'Score|my|score|';
|
||||
@@ -309,8 +316,11 @@ $lang->my->workMenu->story = "$lang->SRCommon|my|work|mode=story";
|
||||
$lang->my->workMenu->bug = 'Bug|my|work|mode=bug';
|
||||
$lang->my->workMenu->testcase = 'Test Case|my|work|mode=testcase&type=assigntome';
|
||||
$lang->my->workMenu->testtask = 'Test Task|my|work|mode=testtask&type=wait';
|
||||
$lang->my->workMenu->issue = 'Issue|my|work|mode=issue';
|
||||
$lang->my->workMenu->risk = 'Risk|my|work|mode=risk';
|
||||
if($config->systemMode == 'new')
|
||||
{
|
||||
$lang->my->workMenu->issue = 'Issue|my|work|mode=issue';
|
||||
$lang->my->workMenu->risk = 'Risk|my|work|mode=risk';
|
||||
}
|
||||
|
||||
$lang->my->contributeMenu = new stdclass();
|
||||
$lang->my->contributeMenu->task = 'Task|my|contribute|mode=task';
|
||||
@@ -319,8 +329,11 @@ $lang->my->contributeMenu->story = "$lang->SRCommon|my|contribute|mode=sto
|
||||
$lang->my->contributeMenu->bug = 'Bug|my|contribute|mode=bug';
|
||||
$lang->my->contributeMenu->testcase = 'Test Case|my|contribute|mode=testtask&type=openedbyme';
|
||||
$lang->my->contributeMenu->testtask = 'Test Task|my|contribute|mode=testtask&type=done';
|
||||
$lang->my->contributeMenu->issue = 'Issue|my|contribute|mode=issue';
|
||||
$lang->my->contributeMenu->risk = 'Risk|my|contribute|mode=risk';
|
||||
if($config->systemMode == 'new')
|
||||
{
|
||||
$lang->my->contributeMenu->issue = 'Issue|my|contribute|mode=issue';
|
||||
$lang->my->contributeMenu->risk = 'Risk|my|contribute|mode=risk';
|
||||
}
|
||||
|
||||
$lang->my->dividerMenu = ',myProject,team,';
|
||||
|
||||
@@ -1026,5 +1039,10 @@ $lang->design->menu->bysearch = array('link' => '<a href="javascript:;" class="q
|
||||
|
||||
$lang->nc->menu = $lang->auditplan->menu;
|
||||
$lang->noMenuModule = array('report', 'my', 'todo', 'effort', 'program', 'product', 'productplan', 'projectbuild', 'projectrelease', 'projectstory', 'story', 'branch', 'release', 'attend', 'leave', 'makeup', 'overtime', 'lieu', 'custom', 'admin', 'mail', 'extension', 'dev', 'backup', 'action', 'cron', 'issue', 'risk', 'pssp', 'sms', 'message', 'webhook', 'search', 'score', 'stage');
|
||||
if($config->systemMode == 'old')
|
||||
{
|
||||
$lang->noMenuModule[] = 'project';
|
||||
$lang->noMenuModule[] = 'task';
|
||||
}
|
||||
|
||||
include (dirname(__FILE__) . '/menuOrder.php');
|
||||
|
||||
@@ -141,7 +141,6 @@ list($projectModule, $projectMethod) = explode('-', $config->projectLink);
|
||||
/* 主导航菜单。*/
|
||||
$lang->mainNav = new stdclass();
|
||||
$lang->mainNav->my = '<i class="icon icon-menu-my"></i> 地盘|my|index|';
|
||||
$lang->mainNav->program = "<i class='icon icon-folder-open-o'></i> 项目集|$programModule|$programMethod|";
|
||||
$lang->mainNav->product = "<i class='icon icon-product'></i> 产品|$productModule|$productMethod|";
|
||||
$lang->mainNav->project = "<i class='icon icon-project'></i> 项目|$projectModule|$projectMethod|";
|
||||
$lang->mainNav->qa = '<i class="icon icon-test"></i> 测试|qa|index|';
|
||||
@@ -150,6 +149,7 @@ $lang->mainNav->doc = '<i class="icon icon-doc"></i> 文档|doc|index|';
|
||||
$lang->mainNav->report = "<i class='icon icon-statistic'></i> 统计|report|productSummary|";
|
||||
$lang->mainNav->system = '<i class="icon icon-group"></i> 组织|subject|browse|';
|
||||
$lang->mainNav->admin = '<i class="icon icon-cog-outline"></i> 后台|admin|index|';
|
||||
if($config->systemMode == 'new') $lang->mainNav->program = "<i class='icon icon-folder-open-o'></i> 项目集|$programModule|$programMethod|";
|
||||
|
||||
$lang->dividerMenu = ',qa,report,admin,';
|
||||
|
||||
@@ -293,8 +293,15 @@ $lang->my->menu = new stdclass();
|
||||
$lang->my->menu->index = '首页|my|index';
|
||||
$lang->my->menu->calendar = array('link' => '日程|my|calendar|', 'subModule' => 'todo', 'alias' => 'todo');
|
||||
$lang->my->menu->myWork = array('link' => '待处理|my|work|mode=task');
|
||||
$lang->my->menu->myProject = array('link' => '项目|my|project|');
|
||||
$lang->my->menu->myExecution = '执行|my|execution|type=undone';
|
||||
if($config->systemMode == 'new')
|
||||
{
|
||||
$lang->my->menu->myProject = array('link' => '项目|my|project|');
|
||||
$lang->my->menu->myExecution = '执行|my|execution|type=undone';
|
||||
}
|
||||
else
|
||||
{
|
||||
$lang->my->menu->myExecution = $lang->executionCommon . '|my|execution|type=undone';
|
||||
}
|
||||
$lang->my->menu->contribute = array('link' => '贡献|my|contribute|mode=task');
|
||||
$lang->my->menu->dynamic = '动态|my|dynamic|';
|
||||
$lang->my->menu->score = array('link' => '积分|my|score|', 'subModule' => 'score');
|
||||
@@ -308,8 +315,11 @@ $lang->my->workMenu->story = "$lang->SRCommon|my|work|mode=story";
|
||||
$lang->my->workMenu->bug = 'Bug|my|work|mode=bug';
|
||||
$lang->my->workMenu->testcase = '用例|my|work|mode=testcase&type=assigntome';
|
||||
$lang->my->workMenu->testtask = '测试单|my|work|mode=testtask&type=wait';
|
||||
$lang->my->workMenu->issue = '问题|my|work|mode=issue';
|
||||
$lang->my->workMenu->risk = '风险|my|work|mode=risk';
|
||||
if($config->systemMode == 'new')
|
||||
{
|
||||
$lang->my->workMenu->issue = '问题|my|work|mode=issue';
|
||||
$lang->my->workMenu->risk = '风险|my|work|mode=risk';
|
||||
}
|
||||
|
||||
$lang->my->contributeMenu = new stdclass();
|
||||
$lang->my->contributeMenu->task = '任务|my|contribute|mode=task';
|
||||
@@ -318,8 +328,11 @@ $lang->my->contributeMenu->story = "$lang->SRCommon|my|contribute|mode=sto
|
||||
$lang->my->contributeMenu->bug = 'Bug|my|contribute|mode=bug';
|
||||
$lang->my->contributeMenu->testcase = '用例|my|contribute|mode=testcase&type=openedbyme';
|
||||
$lang->my->contributeMenu->testtask = '测试单|my|contribute|mode=testtask&type=done';
|
||||
$lang->my->contributeMenu->issue = '问题|my|contribute|mode=issue';
|
||||
$lang->my->contributeMenu->risk = '风险|my|contribute|mode=risk';
|
||||
if($config->systemMode == 'new')
|
||||
{
|
||||
$lang->my->contributeMenu->issue = '问题|my|contribute|mode=issue';
|
||||
$lang->my->contributeMenu->risk = '风险|my|contribute|mode=risk';
|
||||
}
|
||||
|
||||
$lang->my->dividerMenu = ',myProject,team,';
|
||||
|
||||
@@ -403,7 +416,7 @@ $lang->qa->menu->caselib = array('link' => '用例库|caselib|browse', 'alias'
|
||||
$lang->qa->subMenu = new stdclass();
|
||||
$lang->qa->subMenu->testcase = new stdclass();
|
||||
$lang->qa->subMenu->testcase->feature = array('link' => '功能测试|testcase|browse|productID=%s', 'alias' => 'view,create,batchcreate,edit,batchedit,showimport,groupcase,importfromlib', 'subModule' => 'tree,story');
|
||||
$lang->qa->subMenu->testcase->unit = array('link' => '单元测试|testtask|browseUnits|productID=%s');
|
||||
$lang->qa->subMenu->testcase->unit = array('link' => '单元测试|testtask|browseUnits|productID=%s', 'alias' => 'browseunits');
|
||||
|
||||
$lang->bug = new stdclass();
|
||||
$lang->bug->menu = new stdclass();
|
||||
@@ -1024,5 +1037,10 @@ $lang->design->menu->bysearch = array('link' => '<a href="javascript:;" class="q
|
||||
|
||||
$lang->nc->menu = $lang->auditplan->menu;
|
||||
$lang->noMenuModule = array('report', 'my', 'todo', 'effort', 'program', 'product', 'productplan', 'projectbuild', 'projectrelease', 'projectstory', 'story', 'branch', 'release', 'attend', 'leave', 'makeup', 'overtime', 'lieu', 'custom', 'admin', 'mail', 'extension', 'dev', 'backup', 'action', 'cron', 'issue', 'risk', 'pssp', 'sms', 'message', 'webhook', 'search', 'score', 'stage');
|
||||
if($config->systemMode == 'old')
|
||||
{
|
||||
$lang->noMenuModule[] = 'project';
|
||||
$lang->noMenuModule[] = 'task';
|
||||
}
|
||||
|
||||
include (dirname(__FILE__) . '/menuOrder.php');
|
||||
|
||||
+10
-4
@@ -1144,7 +1144,7 @@ EOD;
|
||||
/* Remove iframe for operation button in modal. Prevent pop up in modal. */
|
||||
if(isonlybody() and strpos($extraClass, 'showinonlybody') !== false) $extraClass = str_replace('iframe', '', $extraClass);
|
||||
|
||||
global $app, $lang;
|
||||
global $app, $lang, $config;
|
||||
|
||||
/* Judge the $method of $module clickable or not, default is clickable. */
|
||||
$clickable = true;
|
||||
@@ -1162,6 +1162,7 @@ EOD;
|
||||
if(strtolower($module) == 'story' and strtolower($method) == 'createcase') ($module = 'testcase') and ($method = 'create');
|
||||
if(strtolower($module) == 'bug' and strtolower($method) == 'tostory') ($module = 'story') and ($method = 'create');
|
||||
if(strtolower($module) == 'bug' and strtolower($method) == 'createcase') ($module = 'testcase') and ($method = 'create');
|
||||
if($config->global->mode == 'old' and strtolower($module) == 'program' and strpos($method, 'PRJ') === 0) ($module = 'project') and ($method = substr(strtolower($method), 3));
|
||||
if(!commonModel::hasPriv($module, $method, $object)) return false;
|
||||
$link = helper::createLink($module, $method, $vars, '', $onlyBody, $programID);
|
||||
|
||||
@@ -2293,7 +2294,7 @@ EOD;
|
||||
*/
|
||||
public static function setMainMenuByGroup($group, $moduleName, $methodName)
|
||||
{
|
||||
global $lang;
|
||||
global $lang, $config;
|
||||
if($group == 'my')
|
||||
{
|
||||
$lang->menu = $lang->my->menu;
|
||||
@@ -2311,6 +2312,11 @@ EOD;
|
||||
$lang->menu = $lang->report->menu;
|
||||
$lang->menuOrder = $lang->report->menuOrder;
|
||||
}
|
||||
if($group == 'qa')
|
||||
{
|
||||
$lang->menu = $lang->qa->menu;
|
||||
$lang->menuOrder = $lang->qa->menuOrder;
|
||||
}
|
||||
if($group == 'attend')
|
||||
{
|
||||
$lang->menu = $lang->attend->menu;
|
||||
@@ -2347,7 +2353,7 @@ EOD;
|
||||
}
|
||||
if($group == 'project')
|
||||
{
|
||||
$lang->menu = self::getProgramMainMenu($moduleName);
|
||||
$lang->menu = $config->global->mode == 'new' ? self::getProgramMainMenu($moduleName) : $lang->project->menu;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2396,7 +2402,7 @@ EOD;
|
||||
*/
|
||||
public static function getProgramMainMenu($moduleName)
|
||||
{
|
||||
global $app, $lang, $dbh;
|
||||
global $app, $lang, $dbh, $config;
|
||||
$program = $dbh->query("SELECT * FROM " . TABLE_PROGRAM . " WHERE `id` = '{$app->session->PRJ}'")->fetch();
|
||||
if(empty($program)) return;
|
||||
|
||||
|
||||
@@ -18,16 +18,22 @@ $isReport = $rawModule == 'report';
|
||||
<div id='mainHeader'>
|
||||
<div class='container'>
|
||||
<div id='heading'>
|
||||
<?php if($isProduct) echo isset($lang->product->switcherMenu) ? $lang->product->switcherMenu : '';?>
|
||||
<?php if($this->config->global->mode == 'new'):?>
|
||||
<?php if($isProgram) echo isset($lang->program->switcherMenu) ? $lang->program->switcherMenu : '';?>
|
||||
<?php if($isProject) echo $this->loadModel('program')->getPRJSwitcher($this->session->PRJ, $app->rawModule, $app->rawMethod);?>
|
||||
<?php if($isProduct) echo isset($lang->product->switcherMenu) ? $lang->product->switcherMenu : '';?>
|
||||
<?php elseif($this->config->global->mode == 'old'):?>
|
||||
<?php if($isProject) echo isset($lang->project->switcherMenu) ? $lang->project->switcherMenu : '';;?>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
<nav id='navbar'><?php commonModel::printMainmenu($app->rawModule, $app->rawMethod);?></nav>
|
||||
<div id='toolbar'>
|
||||
<?php if($this->config->global->mode == 'new'):?>
|
||||
<?php if($isProgram) echo isset($lang->program->mainMenuAction) ? $lang->program->mainMenuAction : '';?>
|
||||
<?php if($isProject) echo $this->loadModel('program')->getPRJMainAction($app->rawModule, $app->rawMethod);?>
|
||||
<?php if($isProduct) echo isset($lang->product->mainMenuAction) ? $lang->product->mainMenuAction : '';?>
|
||||
<?php if($isReport) echo isset($lang->report->mainMenuAction) ? $lang->report->mainMenuAction : '';?>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -125,6 +125,7 @@ class doc extends control
|
||||
$this->lang->navGroup->doc = 'project';
|
||||
$this->lang->doc->menu = $this->lang->project->menu;
|
||||
$this->lang->doc->menuOrder = $this->lang->project->menuOrder;
|
||||
if($this->config->global->mode == 'old') $this->lang->noMenuModule[] = 'doc';
|
||||
$this->project->setMenu($this->project->getExecutionsByProject($this->session->PRJ, 'all', 0, true), $lib->project);
|
||||
$this->lang->set('menugroup.doc', 'project');
|
||||
}
|
||||
@@ -361,6 +362,7 @@ class doc extends control
|
||||
$this->lang->navGroup->doc = 'project';
|
||||
$this->lang->doc->menu = $this->lang->project->menu;
|
||||
$this->lang->doc->menuOrder = $this->lang->project->menuOrder;
|
||||
if($this->config->global->mode == 'old') $this->lang->noMenuModule[] = 'doc';
|
||||
$this->project->setMenu($this->project->getExecutionsByProject($this->session->PRJ, 'all', 0, true), $lib->project);
|
||||
$this->lang->set('menugroup.doc', 'project');
|
||||
|
||||
@@ -447,6 +449,7 @@ class doc extends control
|
||||
$this->lang->navGroup->doc = 'project';
|
||||
$this->lang->doc->menu = $this->lang->project->menu;
|
||||
$this->lang->doc->menuOrder = $this->lang->project->menuOrder;
|
||||
if($this->config->global->mode == 'old') $this->lang->noMenuModule[] = 'doc';
|
||||
$this->project->setMenu($this->project->getExecutionsByProject($this->session->PRJ, 'all', 0, true), $objectID);
|
||||
$this->lang->set('menugroup.doc', 'project');
|
||||
}
|
||||
@@ -512,6 +515,7 @@ class doc extends control
|
||||
$this->lang->navGroup->doc = 'project';
|
||||
$this->lang->doc->menu = $this->lang->project->menu;
|
||||
$this->lang->doc->menuOrder = $this->lang->project->menuOrder;
|
||||
if($this->config->global->mode == 'old') $this->lang->noMenuModule[] = 'doc';
|
||||
$this->project->setMenu($this->project->getExecutionsByProject($this->session->PRJ, 'all', 0, true), $objectID);
|
||||
$this->lang->set('menugroup.doc', 'project');
|
||||
}
|
||||
@@ -841,6 +845,7 @@ class doc extends control
|
||||
$this->lang->navGroup->doc = 'project';
|
||||
$this->lang->doc->menu = $this->lang->project->menu;
|
||||
$this->lang->doc->menuOrder = $this->lang->project->menuOrder;
|
||||
if($this->config->global->mode == 'old') $this->lang->noMenuModule[] = 'doc';
|
||||
$this->project->setMenu($this->project->getExecutionsByProject($this->session->PRJ, 'all', 0, true), $objectID);
|
||||
$this->lang->set('menugroup.doc', 'project');
|
||||
}
|
||||
@@ -940,6 +945,7 @@ class doc extends control
|
||||
$this->lang->navGroup->doc = 'project';
|
||||
$this->lang->doc->menu = $this->lang->project->menu;
|
||||
$this->lang->doc->menuOrder = $this->lang->project->menuOrder;
|
||||
if($this->config->global->mode == 'old') $this->lang->noMenuModule[] = 'doc';
|
||||
$this->project->setMenu($this->project->getExecutionsByProject($this->session->PRJ, 'all', 0, true), $objectID);
|
||||
$this->lang->set('menugroup.doc', 'project');
|
||||
}
|
||||
|
||||
@@ -79,7 +79,10 @@
|
||||
{
|
||||
return 'system';
|
||||
}
|
||||
|
||||
if(['caselib', 'testreport', 'testsuite', 'testtask', 'testcase', 'bug', 'qa'].includes(moduleName))
|
||||
{
|
||||
return link.prj ? 'project' : 'qa';
|
||||
}
|
||||
if(moduleName === 'report')
|
||||
{
|
||||
if(['usereport', 'editreport', 'deletereport', 'custom'].includes(methodLowerCase) && link.params.from)
|
||||
|
||||
@@ -39,10 +39,12 @@ html,body {height: 100%;}
|
||||
<th class='w-120px'><?php echo $lang->my->storyConcept;?></th>
|
||||
<td><?php echo html::select('URSR', $URSRList, $URSR, "class='form-control chosen'");?></td>
|
||||
</tr>
|
||||
<?php if($this->config->global->mode == 'new'):?>
|
||||
<tr>
|
||||
<th><?php echo $lang->my->programLink;?></th>
|
||||
<td><?php echo html::select('programLink', $lang->my->programLinkList, $programLink, "class='form-control chosen'");?></td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<tr>
|
||||
<th><?php echo $lang->my->productLink;?></th>
|
||||
<td><?php echo html::select('productLink', $lang->my->productLinkList, $productLink, "class='form-control chosen'");?></td>
|
||||
|
||||
@@ -21,16 +21,16 @@
|
||||
<table class="table has-sort-head table-fixed table-bordered text-center">
|
||||
<thead>
|
||||
<tr>
|
||||
<th rowspan='2' class="w-80px"><?php echo $lang->personnel->name;?></th>
|
||||
<th rowspan='2'><?php echo $lang->personnel->role;?></th>
|
||||
<th rowspan='2'><?php echo $lang->personnel->projects;?></th>
|
||||
<th rowspan='2'><?php echo $lang->personnel->executions;?></th>
|
||||
<th colspan="2"><?php echo $lang->personnel->workingHours;?></th>
|
||||
<th colspan="3"><?php echo $lang->personnel->task;?></th>
|
||||
<th colspan="3"><?php echo $lang->personnel->bug;?></th>
|
||||
<th colspan="2"><?php echo $lang->personnel->createStories;?></th>
|
||||
<th colspan="3"><?php echo $lang->personnel->issue;?></th>
|
||||
<th colspan="3"><?php echo $lang->personnel->risk;?></th>
|
||||
<th rowspan='2' class="w-80px"> <?php echo $lang->personnel->name;?></th>
|
||||
<th rowspan='2'> <?php echo $lang->personnel->role;?></th>
|
||||
<th rowspan='2'> <?php echo $lang->personnel->projects;?></th>
|
||||
<th rowspan='2'> <?php echo $lang->personnel->executions;?></th>
|
||||
<th colspan="2"> <?php echo $lang->personnel->workingHours;?></th>
|
||||
<th colspan="3"> <?php echo $lang->personnel->task;?></th>
|
||||
<th colspan="3"> <?php echo $lang->personnel->bug;?></th>
|
||||
<th colspan="2" class="w-150px"><?php echo $lang->personnel->createStories;?></th>
|
||||
<th colspan="3"> <?php echo $lang->personnel->issue;?></th>
|
||||
<th colspan="3"> <?php echo $lang->personnel->risk;?></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->personnel->putInto;?></th>
|
||||
|
||||
@@ -83,8 +83,13 @@ $config->product->search['params']['lastEditedDate'] = array('operator' => '=',
|
||||
|
||||
$config->product->create = new stdclass();
|
||||
$config->product->edit = new stdclass();
|
||||
$config->product->create->requiredFields = 'name,program';
|
||||
$config->product->edit->requiredFields = 'name,program';
|
||||
$config->product->create->requiredFields = 'name';
|
||||
$config->product->edit->requiredFields = 'name';
|
||||
if($config->global->mode == 'new')
|
||||
{
|
||||
$config->product->create->requiredFields .= ',program';
|
||||
$config->product->edit->requiredFields .= ',program';
|
||||
}
|
||||
|
||||
$config->product->editor = new stdclass();
|
||||
$config->product->editor->create = array('id' => 'desc', 'tools' => 'simpleTools');
|
||||
|
||||
@@ -333,6 +333,7 @@ class product extends control
|
||||
$this->view->rdUsers = $rdUsers;
|
||||
$this->view->users = $this->user->getPairs('nodeleted|noclosed');
|
||||
$this->view->programs = array('') + $this->loadModel('program')->getTopPGMPairs('', 'noclosed');
|
||||
$this->view->lines = $this->config->global->mode == 'new' ? array() : array('' => '') + $this->product->getLinePairs();
|
||||
$this->view->URSRPairs = $this->loadModel('custom')->getURSRPairs();
|
||||
|
||||
unset($this->lang->product->typeList['']);
|
||||
@@ -467,6 +468,10 @@ class product extends control
|
||||
$rdUsers = $this->user->getPairs('nodeleted|devfirst', $product->RD, $this->config->maxCount);
|
||||
if(!empty($this->config->user->moreLink)) $this->config->moreLinks["RD"] = $this->config->user->moreLink;
|
||||
|
||||
$lines = array();
|
||||
if($product->program) $lines = array('') + $this->product->getLinePairs($product->program);
|
||||
if($this->config->global->mode == 'old') $lines = array('') + $this->product->getLinePairs();
|
||||
|
||||
$this->view->title = $this->lang->product->edit . $this->lang->colon . $product->name;
|
||||
$this->view->position[] = html::a($this->createLink($this->moduleName, 'browse'), $product->name);
|
||||
$this->view->position[] = $this->lang->product->edit;
|
||||
@@ -480,7 +485,7 @@ class product extends control
|
||||
$this->view->rdUsers = $rdUsers;
|
||||
$this->view->users = $this->user->getPairs('nodeleted|noclosed');
|
||||
$this->view->programs = array('') + $this->loadModel('program')->getTopPGMPairs();
|
||||
$this->view->lines = $product->program ? array('') + $this->product->getLinePairs($product->program) : array();
|
||||
$this->view->lines = $lines;
|
||||
$this->view->URSRPairs = $this->loadModel('custom')->getURSRPairs();
|
||||
$this->view->canChangePGM = $canChangePGM;
|
||||
$this->view->singleLinkProjects = $singleLinkProjects;
|
||||
|
||||
@@ -328,8 +328,8 @@ class productModel extends model
|
||||
->leftJoin(TABLE_PRODUCT)->alias('t2')
|
||||
->on('t1.product = t2.id')
|
||||
->where('t2.deleted')->eq(0)
|
||||
->andWhere('t2.id')->in($this->app->user->view->products)
|
||||
->beginIF($projectID)->andWhere('t1.project')->eq($projectID)->fi()
|
||||
->beginIF(!empty($projectID))->andWhere('t1.project')->eq($projectID)->fi()
|
||||
->beginIF(!$this->app->user->admin)->andWhere('t2.id')->in($this->app->user->view->products)->fi()
|
||||
->beginIF(strpos($status, 'noclosed') !== false)->andWhere('status')->ne('closed')->fi()
|
||||
->orderBy('t2.order desc')
|
||||
->fetchAll('id');
|
||||
|
||||
@@ -80,9 +80,18 @@
|
||||
<?php foreach($program as $lineID => $line):?>
|
||||
<?php if(isset($line['lineName'])):?>
|
||||
<?php
|
||||
$trAttrs = "data-id='line.$lineID' data-parent='program.$programID'";
|
||||
$trClass .= ' is-nest-child table-nest';
|
||||
$trAttrs .= " data-nest-parent='program.$programID' data-nest-path='program.$programID,$lineID'";
|
||||
if($this->config->global->mode == 'new')
|
||||
{
|
||||
$trAttrs = "data-id='line.$lineID' data-parent='program.$programID'";
|
||||
$trClass .= ' is-nest-child table-nest';
|
||||
$trAttrs .= " data-nest-parent='program.$programID' data-nest-path='program.$programID,$lineID'";
|
||||
}
|
||||
else
|
||||
{
|
||||
$trAttrs = "data-id='line.$lineID' data-parent='0' data-nested='true'";
|
||||
$trClass = 'is-top-level table-nest-child';
|
||||
$trAttrs .= " class='$trClass'";
|
||||
}
|
||||
?>
|
||||
<tr <?php echo $trAttrs;?>>
|
||||
<td colspan="14">
|
||||
|
||||
@@ -21,13 +21,15 @@
|
||||
<form class="load-indicator main-form form-ajax" id="createForm" method="post" target='hiddenwin'>
|
||||
<table class="table table-form">
|
||||
<tbody>
|
||||
<?php if($this->config->global->mode == 'new'):?>
|
||||
<tr>
|
||||
<th class='w-140px'><?php echo $lang->program->PGMCommon;?></th>
|
||||
<td><?php echo html::select('program', $programs, '', "class='form-control chosen' required");?></td><td></td>
|
||||
</tr>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<tr>
|
||||
<th class='w-140px'><?php echo $lang->product->line;?></th>
|
||||
<td><?php echo html::select('line', '', '', "class='form-control chosen'");?></td><td></td>
|
||||
<td><?php echo html::select('line', $lines, '', "class='form-control chosen'");?></td><td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->product->name;?></th>
|
||||
|
||||
@@ -32,10 +32,12 @@
|
||||
<form class="load-indicator main-form form-ajax" id="createForm" method="post" target='hiddenwin'>
|
||||
<table class="table table-form">
|
||||
<tbody>
|
||||
<?php if($this->config->global->mode == 'new'):?>
|
||||
<tr>
|
||||
<th class='w-140px'><?php echo $lang->product->program;?></th>
|
||||
<td><?php echo html::select('program', $programs, $product->program, "class='form-control chosen'");?></td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<tr>
|
||||
<th class='w-140px'><?php echo $lang->product->line;?></th>
|
||||
<td><?php echo html::select('line', $lines, $product->line, "class='form-control chosen'");?></td><td></td>
|
||||
|
||||
@@ -44,21 +44,27 @@
|
||||
<div id='son'>
|
||||
<div class="table-row row-module row-module-new">
|
||||
<div class="table-col text-center"><strong><?php echo $lang->product->lineName;?></strong></div>
|
||||
<?php if($this->config->global->mode == 'new'):?>
|
||||
<div class="table-col text-center"><strong><?php echo $lang->product->program;?></strong></div>
|
||||
<?php endif;?>
|
||||
<div class="table-col col-actions"> </div>
|
||||
</div>
|
||||
<?php $maxOrder = 0;?>
|
||||
<?php foreach($lines as $line):?>
|
||||
<div class="table-row row-module">
|
||||
<div class="table-col col-module"><?php echo html::input("modules[id$line->id]", $line->name, 'class="form-control"');?></div>
|
||||
<?php if($this->config->global->mode == 'new'):?>
|
||||
<div class="table-col col-programs"><?php echo html::select("programs[id$line->id]", $programs, $line->root, "class='form-control chosen'");?></div>
|
||||
<?php endif;?>
|
||||
<div class="table-col col-actions"> </div>
|
||||
</div>
|
||||
<?php endforeach;?>
|
||||
<?php for($i = 0; $i <= 5 ; $i ++):?>
|
||||
<div class="table-row row-module row-module-new">
|
||||
<div class="table-col col-module"><?php echo html::input("modules[]", '', "class='form-control'");?></div>
|
||||
<?php if($this->config->global->mode == 'new'):?>
|
||||
<div class="table-col col-programs"><?php echo html::select("programs[]", $programs, '', "class='form-control chosen'");?></div>
|
||||
<?php endif;?>
|
||||
<div class="table-col col-actions">
|
||||
<button type="button" class="btn btn-link btn-icon btn-add" onclick="addItem(this)"><i class="icon icon-plus"></i></button>
|
||||
<button type="button" class="btn btn-link btn-icon btn-delete" onclick="deleteItem(this)"><i class="icon icon-close"></i></button>
|
||||
@@ -69,7 +75,9 @@
|
||||
<div id="insertItemBox" class="template">
|
||||
<div class="table-row row-module row-module-new">
|
||||
<div class="table-col col-module"><?php echo html::input("modules[]", '', "class='form-control'");?></div>
|
||||
<?php if($this->config->global->mode == 'new'):?>
|
||||
<div class="table-col col-programs"><?php echo html::select("programs[]", $programs, '', "class='form-control chosen'");?></div>
|
||||
<?php endif;?>
|
||||
<div class="table-col col-actions">
|
||||
<button type="button" class="btn btn-link btn-icon btn-add" onclick="addItem(this)"><i class="icon icon-plus"></i></button>
|
||||
<button type="button" class="btn btn-link btn-icon btn-delete" onclick="deleteItem(this)"><i class="icon icon-close"></i></button>
|
||||
|
||||
@@ -924,7 +924,8 @@ class programModel extends model
|
||||
}
|
||||
|
||||
$projectList = $this->dao->select('*')->from(TABLE_PROJECT)
|
||||
->where('type')->eq('project')
|
||||
->where('deleted')->eq('0')
|
||||
->beginIF($this->config->global->mode == 'new')->andWhere('type')->eq('project')->fi()
|
||||
->beginIF($browseType != 'all')->andWhere('status')->eq($browseType)->fi()
|
||||
->beginIF($path)->andWhere('path')->like($path . '%')->fi()
|
||||
->beginIF(!$this->app->user->admin)->andWhere('id')->in($this->app->user->view->projects)->fi()
|
||||
@@ -933,13 +934,12 @@ class programModel extends model
|
||||
->orWhere('PM')->eq($this->app->user->account)
|
||||
->markRight(1)
|
||||
->fi()
|
||||
->andWhere('deleted')->eq('0')
|
||||
->orderBy($orderBy)
|
||||
->page($pager)
|
||||
->fetchAll('id');
|
||||
|
||||
/* Determine how to display the name of the program. */
|
||||
if($programTitle)
|
||||
if($programTitle and $this->config->global->mode == 'new')
|
||||
{
|
||||
$programList = $this->getPGMPairs();
|
||||
foreach($projectList as $id => $project)
|
||||
@@ -1841,7 +1841,7 @@ class programModel extends model
|
||||
{
|
||||
$canOrder = common::hasPriv('program', 'PRJOrderUpdate');
|
||||
$canBatchEdit = common::hasPriv('program', 'PRJBatchEdit');
|
||||
$projectLink = helper::createLink('program', 'index', "projectID=$project->id", '', '', $project->id);
|
||||
$projectLink = $this->config->global->mode == 'new' ? helper::createLink('program', 'index', "projectID=$project->id", '', '', $project->id) : helper::createLink('project', 'task', "projectID=$project->id");
|
||||
$account = $this->app->user->account;
|
||||
$id = $col->id;
|
||||
|
||||
@@ -1957,16 +1957,16 @@ class programModel extends model
|
||||
$from = $project->from == 'PRJ' ? 'PRJ' : 'pgmproject';
|
||||
$openModule = $project->from == 'PRJ' ? 'project' : 'program';
|
||||
common::printIcon('program', 'PRJEdit', "projectID=$project->id&from=$from", $project, 'list', 'edit', '', '', '', "data-group=$openModule", '', $project->id);
|
||||
common::printIcon('program', 'PRJManageMembers', "projectID=$project->id", $project, 'list', 'group', '', '', '', '', '', $project->id);
|
||||
common::printIcon('program', 'PRJGroup', "projectID=$project->id&programID=$programID", $project, 'list', 'lock', '', '', '', '', '', $project->id);
|
||||
common::printIcon('program', 'PRJManageMembers', "projectID=$project->id", $project, 'list', 'group', '', '', '', '', $this->lang->project->team, $project->id);
|
||||
if($this->config->global->mode == 'new') common::printIcon('program', 'PRJGroup', "projectID=$project->id&programID=$programID", $project, 'list', 'lock', '', '', '', '', '', $project->id);
|
||||
|
||||
if(common::hasPriv('program','PRJManageProducts') || common::hasPriv('program','PRJWhitelist') || common::hasPriv('program','PRJDelete'))
|
||||
{
|
||||
echo "<div class='btn-group'>";
|
||||
echo "<button type='button' class='btn dropdown-toggle' data-toggle='context-dropdown' title='{$this->lang->more}'><i class='icon-more-alt'></i></button>";
|
||||
echo "<ul class='dropdown-menu pull-right text-center' role='menu'>";
|
||||
common::printIcon('program', 'PRJManageProducts', "projectID=$project->id&programID=$programID&from=$from", $project, 'list', 'link', '', 'btn-action', '', "data-group=$openModule", '', $project->id);
|
||||
common::printIcon('program', 'PRJWhitelist', "projectID=$project->id&programID=$programID&module=program&from=$from", $project, 'list', 'shield-check', '', 'btn-action', '', "data-group=$openModule", '', $project->id);
|
||||
common::printIcon('program', 'PRJManageProducts', "projectID=$project->id&programID=$programID&from=$from", $project, 'list', 'link', '', 'btn-action', '', "data-group=$openModule", $this->lang->project->manageProducts, $project->id);
|
||||
if($this->config->global->mode == 'new') common::printIcon('program', 'PRJWhitelist', "projectID=$project->id&programID=$programID&module=program&from=$from", $project, 'list', 'shield-check', '', 'btn-action', '', "data-group=$openModule", '', $project->id);
|
||||
if(common::hasPriv('program','PRJDelete')) echo html::a(inLink("PRJDelete", "projectID=$project->id"), "<i class='icon-trash'></i>", 'hiddenwin', "class='btn btn-action' title='{$this->lang->program->PRJDelete}'");
|
||||
echo "</ul>";
|
||||
echo "</div>";
|
||||
|
||||
@@ -17,12 +17,14 @@ js::set('programID', $programID);
|
||||
js::set('browseType', $browseType);
|
||||
?>
|
||||
<div id="mainMenu" class="clearfix">
|
||||
<?php if($this->config->global->mode == 'new'):?>
|
||||
<div id="sidebarHeader">
|
||||
<div class="title">
|
||||
<?php echo empty($program) ? $lang->program->project : $program->name;?>
|
||||
<?php if($programID) echo html::a(inLink('PRJBrowse', 'programID=0'), "<i class='icon icon-sm icon-close'></i>", '', 'class="text-muted"');?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<div class="btn-toolBar pull-left">
|
||||
<?php foreach($lang->program->featureBar as $key => $label):?>
|
||||
<?php $active = $browseType == $key ? 'btn-active-text' : '';?>
|
||||
@@ -33,10 +35,15 @@ js::set('browseType', $browseType);
|
||||
<?php echo html::checkbox('PRJMine', array('1' => $lang->program->mine), '', $this->cookie->PRJMine ? 'checked=checked' : '');?>
|
||||
</div>
|
||||
<div class="btn-toolbar pull-right">
|
||||
<?php if($this->config->global->mode == 'new'):?>
|
||||
<?php common::printLink('program', 'createGuide', "programID=$programID", '<i class="icon icon-plus"></i>' . $lang->program->PRJCreate, '', 'class="btn btn-primary" data-toggle="modal" data-target="#guideDialog"');?>
|
||||
<?php else:?>
|
||||
<?php common::printLink('project', 'create', '', '<i class="icon icon-plus"></i>' . $lang->program->PRJCreate, '', 'class="btn btn-primary"');?>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
</div>
|
||||
<div id='mainContent' class="main-row fade">
|
||||
<?php if($this->config->global->mode == 'new'):?>
|
||||
<div id="sidebar" class="side-col">
|
||||
<div class="sidebar-toggle"><i class="icon icon-angle-left"></i></div>
|
||||
<div class="cell">
|
||||
@@ -46,12 +53,17 @@ js::set('browseType', $browseType);
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<div class="main-col">
|
||||
<?php if(empty($projectStats)):?>
|
||||
<div class="table-empty-tip">
|
||||
<p>
|
||||
<span class="text-muted"><?php echo $lang->program->noPRJ;?></span>
|
||||
<?php if($this->config->global->mode == 'new'):?>
|
||||
<?php common::printLink('program', 'createGuide', "programID=$programID", '<i class="icon icon-plus"></i>' . $lang->program->PRJCreate, '', 'class="btn btn-info btn-wide " data-toggle="modal" data-target="#guideDialog"');?>
|
||||
<?php else:?>
|
||||
<?php common::printLink('project', 'create', '', '<i class="icon icon-plus"></i>' . $lang->program->PRJCreate, '', 'class="btn btn-info btn-wide"');?>
|
||||
<?php endif;?>
|
||||
</p>
|
||||
</div>
|
||||
<?php else:?>
|
||||
@@ -64,7 +76,7 @@ js::set('browseType', $browseType);
|
||||
$setting = $this->datatable->getSetting('program');
|
||||
?>
|
||||
<table class='table has-sort-head'>
|
||||
<?php $canBatchEdit = common::hasPriv('program', 'PRJBatchEdit');?>
|
||||
<?php $canBatchEdit = $this->config->global->mode == 'new' ? common::hasPriv('program', 'PRJBatchEdit') : common::hasPriv('project', 'batchEdit');?>
|
||||
<thead>
|
||||
<tr>
|
||||
<?php
|
||||
@@ -93,7 +105,7 @@ js::set('browseType', $browseType);
|
||||
<?php
|
||||
if($canBatchEdit)
|
||||
{
|
||||
$actionLink = $this->createLink('program', 'PRJBatchEdit', 'from=prjbrowse');
|
||||
$actionLink = $this->config->global->mode == 'new' ? $this->createLink('program', 'PRJBatchEdit', 'from=prjbrowse') : $this->createLink('project', 'batchEdit');
|
||||
$misc = "data-form-action='$actionLink'";
|
||||
echo html::commonButton($lang->edit, $misc);
|
||||
}
|
||||
|
||||
+38
-19
@@ -113,9 +113,12 @@ class project extends control
|
||||
public function task($executionID = 0, $status = 'unclosed', $param = 0, $orderBy = '', $recTotal = 0, $recPerPage = 100, $pageID = 1)
|
||||
{
|
||||
/* Save last PRJ. */
|
||||
$projectID = $this->loadModel('program')->savePRJState($this->session->PRJ, $this->program->getPRJPairs());
|
||||
if(!$projectID) $this->locate($this->createLink('program', 'PRJbrowse'));
|
||||
setCookie("lastPRJ", $projectID, $this->config->cookieLife, $this->config->webRoot, '', false, true);
|
||||
if($this->config->global->mode == 'new')
|
||||
{
|
||||
$projectID = $this->loadModel('program')->savePRJState($this->session->PRJ, $this->program->getPRJPairs());
|
||||
if(!$projectID) $this->locate($this->createLink('program', 'PRJbrowse'));
|
||||
setCookie("lastPRJ", $projectID, $this->config->cookieLife, $this->config->webRoot, '', false, true);
|
||||
}
|
||||
|
||||
$this->loadModel('tree');
|
||||
$this->loadModel('search');
|
||||
@@ -1191,14 +1194,24 @@ class project extends control
|
||||
$this->view->isSprint = false;
|
||||
$project = $this->project->getById($this->session->PRJ);
|
||||
|
||||
if($project->model == 'scrum' && isset($this->config->custom->sprintConcept) and $this->config->custom->sprintConcept == 1)
|
||||
if($this->config->global->mode == 'new')
|
||||
{
|
||||
$this->view->isSprint = true;
|
||||
if($project->model == 'scrum' && isset($this->config->custom->sprintConcept) and $this->config->custom->sprintConcept == 1)
|
||||
{
|
||||
$this->view->isSprint = true;
|
||||
|
||||
unset($this->lang->project->endList[62]);
|
||||
unset($this->lang->project->endList[93]);
|
||||
unset($this->lang->project->endList[186]);
|
||||
unset($this->lang->project->endList[365]);
|
||||
unset($this->lang->project->endList[62]);
|
||||
unset($this->lang->project->endList[93]);
|
||||
unset($this->lang->project->endList[186]);
|
||||
unset($this->lang->project->endList[365]);
|
||||
}
|
||||
|
||||
$this->view->isStage = $project->model == 'waterfall' ? true : false;
|
||||
$this->view->iconObject = $project->model == 'waterfall' ? 'stage' : 'sprint';
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->view->isStage = false;
|
||||
}
|
||||
|
||||
$projectID = key($this->projects);
|
||||
@@ -1223,8 +1236,6 @@ class project extends control
|
||||
$this->view->copyProjectID = $copyProjectID;
|
||||
$this->view->branchGroups = $this->loadModel('branch')->getByProducts(array_keys($products));
|
||||
$this->view->users = $this->loadModel('user')->getPairs('nodeleted|noclosed');
|
||||
$this->view->isStage = $project->model == 'waterfall' ? true : false;
|
||||
$this->view->iconObject = $project->model == 'waterfall' ? 'stage' : 'sprint';
|
||||
$this->display();
|
||||
}
|
||||
|
||||
@@ -1320,15 +1331,24 @@ class project extends control
|
||||
}
|
||||
|
||||
$this->view->isSprint = false;
|
||||
$PRJData = $this->project->getById($this->session->PRJ);
|
||||
if($PRJData->model == 'scrum' && isset($this->config->custom->sprintConcept) && $this->config->custom->sprintConcept == 1)
|
||||
if($this->config->global->mode == 'new')
|
||||
{
|
||||
$this->view->isSprint = true;
|
||||
$PRJData = $this->project->getById($this->session->PRJ);
|
||||
if($PRJData->model == 'scrum' && isset($this->config->custom->sprintConcept) && $this->config->custom->sprintConcept == 1)
|
||||
{
|
||||
$this->view->isSprint = true;
|
||||
|
||||
unset($this->lang->project->endList[62]);
|
||||
unset($this->lang->project->endList[93]);
|
||||
unset($this->lang->project->endList[186]);
|
||||
unset($this->lang->project->endList[365]);
|
||||
unset($this->lang->project->endList[62]);
|
||||
unset($this->lang->project->endList[93]);
|
||||
unset($this->lang->project->endList[186]);
|
||||
unset($this->lang->project->endList[365]);
|
||||
}
|
||||
|
||||
$this->view->isStage = $PRJData->model == 'waterfall' ? true : false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->view->isStage = false;
|
||||
}
|
||||
|
||||
$this->loadModel('user');
|
||||
@@ -1359,7 +1379,6 @@ class project extends control
|
||||
$this->view->notRemoveProducts = $notRemoveProducts;
|
||||
$this->view->productPlans = $productPlans;
|
||||
$this->view->branchGroups = $this->loadModel('branch')->getByProducts(array_keys($linkedProducts), '', $linkedBranches);
|
||||
$this->view->isStage = $PRJData->model == 'waterfall' ? true : false;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
|
||||
+28
-16
@@ -129,7 +129,7 @@ class projectModel extends model
|
||||
if($methodName == 'create' and $moduleName == 'project') $label = $this->lang->project->create;
|
||||
|
||||
$projectIndex = $this->select($projects, $projectID, null, $moduleName, $methodName, $extra);
|
||||
$this->lang->modulePageNav = $projectIndex;
|
||||
if($this->config->global->mode == 'new') $this->lang->modulePageNav = $projectIndex;
|
||||
|
||||
foreach($this->lang->project->menu as $key => $menu)
|
||||
{
|
||||
@@ -185,21 +185,33 @@ class projectModel extends model
|
||||
setCookie("lastProject", $projectID, $this->config->cookieLife, $this->config->webRoot, '', false, true);
|
||||
$currentProject = $this->getById($projectID);
|
||||
|
||||
if(isset($currentProject->type) and $currentProject->type == 'program') return;
|
||||
|
||||
if(isset($currentProject->project)) $project = $this->loadModel('program')->getPRJByID($currentProject->project);
|
||||
|
||||
if(isset($project) and $project->model == 'waterfall')
|
||||
if($this->config->global->mode == 'new')
|
||||
{
|
||||
$productID = $this->loadModel('product')->getProductIDByProject($currentProject->id);
|
||||
$productName = $this->dao->findByID($productID)->from(TABLE_PRODUCT)->fetch('name');
|
||||
$currentProject->name = $productName . '/' . $currentProject->name;
|
||||
if(isset($currentProject->type) and $currentProject->type == 'program') return;
|
||||
|
||||
if(isset($currentProject->project)) $project = $this->loadModel('program')->getPRJByID($currentProject->project);
|
||||
|
||||
if(isset($project) and $project->model == 'waterfall')
|
||||
{
|
||||
$productID = $this->loadModel('product')->getProductIDByProject($currentProject->id);
|
||||
$productName = $this->dao->findByID($productID)->from(TABLE_PRODUCT)->fetch('name');
|
||||
$currentProject->name = $productName . '/' . $currentProject->name;
|
||||
}
|
||||
}
|
||||
|
||||
$dropMenuLink = helper::createLink('project', 'ajaxGetDropMenu', "objectID=$projectID&module=$currentModule&method=$currentMethod&extra=$extra");
|
||||
|
||||
$currentProjectName = '';
|
||||
if(isset($currentProject->name)) $currentProjectName = $currentProject->name;
|
||||
|
||||
if($this->config->global->mode == 'old')
|
||||
{
|
||||
$output = "<div class='btn-group header-angle-btn' id='swapper'><button data-toggle='dropdown' type='button' class='btn' id='currentItem' title='{$currentProjectName}'><span class='text'><i class='icon icon-sprint'></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>";
|
||||
|
||||
$this->lang->project->switcherMenu = $output;
|
||||
}
|
||||
|
||||
$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>";
|
||||
@@ -314,7 +326,7 @@ class projectModel extends model
|
||||
|
||||
/* Determine whether to add a sprint or a stage according to the model of the project. */
|
||||
$project = $this->getByID($this->session->PRJ);
|
||||
$sprintType = zget($this->config->project->modelList, $project->model, '');
|
||||
$sprintType = $this->config->global->mode == 'new' ? zget($this->config->project->modelList, $project->model, '') : 'sprint';
|
||||
|
||||
/* If the project model is a stage, determine whether the product is linked. */
|
||||
if($sprintType == 'stage' and empty($this->post->products[0]))
|
||||
@@ -325,13 +337,13 @@ class projectModel extends model
|
||||
|
||||
/* Get the data from the post. */
|
||||
$sprint = fixer::input('post')
|
||||
->setDefault('project', $this->session->PRJ)
|
||||
->setDefault('status', 'wait')
|
||||
->setDefault('parent', $this->session->PRJ)
|
||||
->setDefault('openedBy', $this->app->user->account)
|
||||
->setDefault('openedDate', helper::now())
|
||||
->setDefault('openedVersion', $this->config->version)
|
||||
->setDefault('team', substr($this->post->name,0, 30))
|
||||
->setIF($this->config->global->mode == 'new', 'project', $this->session->PRJ)
|
||||
->setIF($this->config->global->mode == 'new', 'parent', $this->session->PRJ)
|
||||
->setIF($this->post->acl == 'open', 'whitelist', '')
|
||||
->join('whitelist', ',')
|
||||
->add('type', $sprintType)
|
||||
@@ -861,9 +873,9 @@ class projectModel extends model
|
||||
/* Order by status's content whether or not done */
|
||||
$executions = $this->dao->select('*, IF(INSTR(" done,closed", status) < 2, 0, 1) AS isDone, INSTR("doing,wait,suspended,closed", status) AS sortStatus')->from(TABLE_EXECUTION)
|
||||
->where('deleted')->eq(0)
|
||||
->beginIF(!$projectID && $type == 'all')->andWhere('type')->in('stage,sprint')->fi()
|
||||
->beginIF($projectID)->andWhere('project')->eq($projectID)->fi()
|
||||
->beginIF($type != 'all')->andWhere('type')->eq($type)->fi()
|
||||
->beginIF(!$projectID && $type == 'all' && $this->config->global->mode == 'new')->andWhere('type')->in('stage,sprint')->fi()
|
||||
->beginIF($projectID && $this->config->global->mode == 'new')->andWhere('project')->eq($projectID)->fi()
|
||||
->beginIF($type != 'all' && $this->config->global->mode == 'new')->andWhere('type')->eq($type)->fi()
|
||||
->beginIF(strpos($mode, 'withdelete') === false)->andWhere('deleted')->eq(0)->fi()
|
||||
->beginIF(!$this->app->user->admin and strpos($mode, 'all') === false)->andWhere('id')->in($this->app->user->view->sprints)->fi()
|
||||
->orderBy($orderBy)
|
||||
|
||||
@@ -49,7 +49,7 @@ foreach($projects as $project)
|
||||
?>
|
||||
</div>
|
||||
<div class="col-footer">
|
||||
<?php echo html::a(helper::createLink('project', 'all'), '<i class="icon icon-cards-view muted"></i> ' . $lang->project->all, '', 'class="not-list-item"'); ?>
|
||||
<?php echo html::a(helper::createLink('program', 'prjbrowse'), '<i class="icon icon-cards-view muted"></i> ' . $lang->project->all, '', 'class="not-list-item"'); ?>
|
||||
<a class='pull-right toggle-right-col not-list-item'><?php echo $lang->project->doneProjects?><i class='icon icon-angle-right'></i></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
<?php endforeach;?>
|
||||
</div>
|
||||
</div>
|
||||
<?php if($project->grade == 1):?>
|
||||
<?php if($this->config->global->mode == 'old' or $project->grade == 1):?>
|
||||
<div class='detail'>
|
||||
<div class='detail-title'><?php echo $lang->project->unlinkedProducts;?></div>
|
||||
<div class='detail-content row'>
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
<?php
|
||||
$config->qa->menuList = array('caselib', 'testreport', 'testsuite', 'testtask', 'testcase', 'bug', 'qa');
|
||||
|
||||
+22
-1
@@ -11,6 +11,27 @@
|
||||
*/
|
||||
class qa extends control
|
||||
{
|
||||
public $projectID;
|
||||
|
||||
/**
|
||||
* Construct.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
/* Set report menu group. */
|
||||
$this->projectID = isset($_GET['PRJ']) ? $_GET['PRJ'] : 0;
|
||||
if(!$this->projectID)
|
||||
{
|
||||
foreach($this->config->qa->menuList as $module) $this->lang->navGroup->$module = 'qa';
|
||||
$this->lang->noMenuModule[] = $this->app->rawModule;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* The index of qa, go to bug's browse page.
|
||||
*
|
||||
@@ -19,7 +40,7 @@ class qa extends control
|
||||
*/
|
||||
public function index($locate = 'auto', $productID = 0)
|
||||
{
|
||||
$this->products = $this->loadModel('product')->getProductPairsByProject($this->session->PRJ);
|
||||
$this->products = $this->loadModel('product')->getProductPairsByProject($this->projectID, 'noclosed');
|
||||
if(empty($this->products)) die($this->locate($this->createLink('product', 'showErrorNone', "fromModule=qa")));
|
||||
if($locate == 'yes') $this->locate($this->createLink('bug', 'browse'));
|
||||
|
||||
|
||||
@@ -206,7 +206,7 @@ class task extends control
|
||||
$this->view->title = $title;
|
||||
$this->view->position = $position;
|
||||
$this->view->project = $project;
|
||||
$this->view->projects = $this->loadModel('project')->getExecutionsByProject($this->session->PRJ, 'all', 0, true);
|
||||
$this->view->projects = $this->config->global->mode == 'old' ? $projects : $this->loadModel('project')->getExecutionsByProject($this->session->PRJ, 'all', 0, true);
|
||||
$this->view->task = $task;
|
||||
$this->view->users = $users;
|
||||
$this->view->stories = $stories;
|
||||
@@ -237,8 +237,11 @@ class task extends control
|
||||
die(js::locate($this->createLink('project', 'task', "projectID=$projectID")));
|
||||
}
|
||||
|
||||
$program = $this->loadModel('project')->getByID($this->session->PRJ);
|
||||
if($program->model == 'waterfall') $this->config->task->create->requiredFields .= ',estStarted,deadline';
|
||||
if($this->config->global->mode == 'new')
|
||||
{
|
||||
$program = $this->loadModel('project')->getByID($this->session->PRJ);
|
||||
if($program->model == 'waterfall') $this->config->task->create->requiredFields .= ',estStarted,deadline';
|
||||
}
|
||||
|
||||
$project = $this->project->getById($projectID);
|
||||
$taskLink = $this->createLink('project', 'browse', "projectID=$projectID&tab=task");
|
||||
@@ -389,7 +392,7 @@ class task extends control
|
||||
$this->view->users = $this->loadModel('user')->getPairs('nodeleted', "{$this->view->task->openedBy},{$this->view->task->canceledBy},{$this->view->task->closedBy}");
|
||||
$this->view->showAllModule = isset($this->config->project->task->allModule) ? $this->config->project->task->allModule : '';
|
||||
$this->view->modules = $this->tree->getTaskOptionMenu($this->view->task->project, 0, 0, $this->view->showAllModule ? 'allModule' : '');
|
||||
$this->view->projects = $this->loadModel('project')->getExecutionsByProject($this->session->PRJ, 'all', 0, true);
|
||||
$this->view->projects = $this->config->global->mode == 'old' ? $this->project->getExecutionPairs() : $this->loadModel('project')->getExecutionsByProject($this->session->PRJ, 'all', 0, true);
|
||||
$this->display();
|
||||
}
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ class taskModel extends model
|
||||
->setDefault('project', $projectID)
|
||||
->setDefault('estimate,left,story', 0)
|
||||
->setDefault('status', 'wait')
|
||||
->setDefault('PRJ', $this->session->PRJ)
|
||||
->setIF($this->config->global->mode == 'new', 'PRJ', $this->session->PRJ)
|
||||
->setIF($this->post->estimate != false, 'left', $this->post->estimate)
|
||||
->setIF($this->post->story != false, 'storyVersion', $this->loadModel('story')->getVersion($this->post->story))
|
||||
->setDefault('estStarted', '0000-00-00')
|
||||
@@ -303,7 +303,7 @@ class taskModel extends model
|
||||
$data[$i]->pri = $tasks->pri[$i];
|
||||
$data[$i]->estimate = $tasks->estimate[$i];
|
||||
$data[$i]->left = $tasks->estimate[$i];
|
||||
$data[$i]->PRJ = $this->session->PRJ;
|
||||
$data[$i]->PRJ = $this->config->global->mode == 'new' ? $this->session->PRJ : 0;
|
||||
$data[$i]->project = $projectID;
|
||||
$data[$i]->estStarted = empty($tasks->estStarted[$i]) ? '0000-00-00' : $tasks->estStarted[$i];
|
||||
$data[$i]->deadline = empty($tasks->deadline[$i]) ? '0000-00-00' : $tasks->deadline[$i];
|
||||
|
||||
@@ -11,7 +11,8 @@
|
||||
*/
|
||||
class testcase extends control
|
||||
{
|
||||
public $products = array();
|
||||
public $products = array();
|
||||
public $projectID = 0;
|
||||
|
||||
/**
|
||||
* Construct function, load product, tree, user auto.
|
||||
@@ -25,7 +26,17 @@ class testcase extends control
|
||||
$this->loadModel('product');
|
||||
$this->loadModel('tree');
|
||||
$this->loadModel('user');
|
||||
$this->view->products = $this->products = $this->product->getProductPairsByProject($this->session->PRJ);
|
||||
|
||||
/* Set test case menu group. */
|
||||
$this->projectID = isset($_GET['PRJ']) ? $_GET['PRJ'] : 0;
|
||||
if(!$this->projectID)
|
||||
{
|
||||
$this->app->loadConfig('qa');
|
||||
foreach($this->config->qa->menuList as $module) $this->lang->navGroup->$module = 'qa';
|
||||
$this->lang->noMenuModule[] = $this->app->rawModule;
|
||||
}
|
||||
|
||||
$this->view->products = $this->products = $this->product->getProductPairsByProject($this->projectID);
|
||||
if(empty($this->products)) die($this->locate($this->createLink('product', 'showErrorNone', "fromModule=testcase")));
|
||||
}
|
||||
|
||||
|
||||
@@ -48,6 +48,8 @@ class testcaseModel extends model
|
||||
$replace = $productID;
|
||||
common::setMenuVars($this->lang->testcase->menu, $key, $replace);
|
||||
}
|
||||
|
||||
if($this->lang->navGroup->testcase == 'qa') $this->lang->qa->menu = $this->lang->testcase->menu;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -65,9 +67,9 @@ class testcaseModel extends model
|
||||
->add('status', $status)
|
||||
->add('version', 1)
|
||||
->add('fromBug', $bugID)
|
||||
->add('PRJ', $this->session->PRJ)
|
||||
->setDefault('openedBy', $this->app->user->account)
|
||||
->setDefault('openedDate', $now)
|
||||
->setIF($this->config->global->mode == 'new', 'PRJ', $this->session->PRJ)
|
||||
->setIF($this->post->story != false, 'storyVersion', $this->loadModel('story')->getVersion((int)$this->post->story))
|
||||
->remove('steps,expects,files,labels,stepType,forceNotReview')
|
||||
->setDefault('story', 0)
|
||||
@@ -159,7 +161,7 @@ class testcaseModel extends model
|
||||
|
||||
$data[$i] = new stdclass();
|
||||
$data[$i]->product = $productID;
|
||||
$data[$i]->PRJ = $this->session->PRJ;
|
||||
if($this->config->global->mode == 'new') $data[$i]->PRJ = $this->session->PRJ;
|
||||
$data[$i]->branch = $cases->branch[$i];
|
||||
$data[$i]->module = $cases->module[$i];
|
||||
$data[$i]->type = $cases->type[$i];
|
||||
@@ -1118,7 +1120,7 @@ class testcaseModel extends model
|
||||
}
|
||||
else
|
||||
{
|
||||
$caseData->PRJ = $this->session->PRJ;
|
||||
if($this->config->global->mode == 'new') $caseData->PRJ = $this->session->PRJ;
|
||||
$caseData->version = 1;
|
||||
$caseData->openedBy = $this->app->user->account;
|
||||
$caseData->openedDate = $now;
|
||||
|
||||
@@ -11,6 +11,8 @@
|
||||
*/
|
||||
class testreport extends control
|
||||
{
|
||||
public $projectID = 0;
|
||||
|
||||
/**
|
||||
* Construct
|
||||
*
|
||||
@@ -32,6 +34,15 @@ class testreport extends control
|
||||
$this->loadModel('testtask');
|
||||
$this->loadModel('user');
|
||||
$this->app->loadLang('report');
|
||||
|
||||
/* Set testreport menu group. */
|
||||
$this->projectID = isset($_GET['PRJ']) ? $_GET['PRJ'] : 0;
|
||||
if(!$this->projectID)
|
||||
{
|
||||
$this->app->loadConfig('qa');
|
||||
foreach($this->config->qa->menuList as $module) $this->lang->navGroup->$module = 'qa';
|
||||
$this->lang->noMenuModule[] = $this->app->rawModule;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -39,6 +39,8 @@ class testreportModel extends model
|
||||
$replace = $productID;
|
||||
common::setMenuVars($this->lang->testreport->menu, $key, $replace);
|
||||
}
|
||||
|
||||
if($this->lang->navGroup->testreport == 'qa') $this->lang->qa->menu = $this->lang->testreport->menu;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -13,6 +13,20 @@ class testsuite extends control
|
||||
{
|
||||
public $products = array();
|
||||
|
||||
public function __construct($moduleName = '', $methodName = '')
|
||||
{
|
||||
parent::__construct($moduleName, $methodName);
|
||||
|
||||
/* Set testtask menu group. */
|
||||
$this->projectID = isset($_GET['PRJ']) ? $_GET['PRJ'] : 0;
|
||||
if(!$this->projectID)
|
||||
{
|
||||
$this->app->loadConfig('qa');
|
||||
foreach($this->config->qa->menuList as $module) $this->lang->navGroup->$module = 'qa';
|
||||
$this->lang->noMenuModule[] = $this->app->rawModule;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Index page, header to browse.
|
||||
*
|
||||
|
||||
@@ -45,6 +45,8 @@ class testsuiteModel extends model
|
||||
$replace = $productID;
|
||||
common::setMenuVars($this->lang->testsuite->menu, $key, $replace);
|
||||
}
|
||||
|
||||
if($this->lang->navGroup->testsuite == 'qa') $this->lang->qa->menu = $this->lang->testsuite->menu;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -11,7 +11,8 @@
|
||||
*/
|
||||
class testtask extends control
|
||||
{
|
||||
public $products = array();
|
||||
public $products = array();
|
||||
public $projectID = 0;
|
||||
|
||||
/**
|
||||
* Construct function, load product module, assign products to view auto.
|
||||
@@ -22,8 +23,18 @@ class testtask extends control
|
||||
public function __construct($moduleName = '', $methodName = '')
|
||||
{
|
||||
parent::__construct($moduleName, $methodName);
|
||||
|
||||
/* Set testtask menu group. */
|
||||
$this->projectID = isset($_GET['PRJ']) ? $_GET['PRJ'] : 0;
|
||||
if(!$this->projectID)
|
||||
{
|
||||
$this->app->loadConfig('qa');
|
||||
foreach($this->config->qa->menuList as $module) $this->lang->navGroup->$module = 'qa';
|
||||
$this->lang->noMenuModule[] = $this->app->rawModule;
|
||||
}
|
||||
|
||||
$this->loadModel('product');
|
||||
$this->view->products = $this->products = $this->product->getProductPairsByProject($this->session->PRJ);
|
||||
$this->view->products = $this->products = $this->product->getProductPairsByProject($this->projectID);
|
||||
if(empty($this->products)) die($this->locate($this->createLink('product', 'showErrorNone', "fromModule=testtask")));
|
||||
}
|
||||
|
||||
|
||||
@@ -66,6 +66,8 @@ class testtaskModel extends model
|
||||
$replace = ($key == 'product') ? $selectHtml : $productID;
|
||||
common::setMenuVars($this->lang->testtask->menu, $key, $replace);
|
||||
}
|
||||
|
||||
if($this->lang->navGroup->testtask == 'qa') $this->lang->qa->menu = $this->lang->testtask->menu;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -129,6 +131,9 @@ class testtaskModel extends model
|
||||
$replace = ($key == 'product') ? $selectHtml : $productID;
|
||||
common::setMenuVars($this->lang->testtask->menu, $key, $replace);
|
||||
}
|
||||
|
||||
$this->lang->testtask->menu->testcase['subModule'] = 'testtask';
|
||||
if($this->lang->navGroup->testtask == 'qa') $this->lang->qa->menu = $this->lang->testtask->menu;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -142,7 +147,7 @@ class testtaskModel extends model
|
||||
{
|
||||
$task = fixer::input('post')
|
||||
->setDefault('build', '')
|
||||
->setDefault('PRJ', $this->session->PRJ)
|
||||
->setIF($this->config->global->mode == 'new', 'PRJ', $this->session->PRJ)
|
||||
->stripTags($this->config->testtask->editor->create['id'], $this->config->allowedTags)
|
||||
->join('mailto', ',')
|
||||
->remove('uid,contactListMenu')
|
||||
|
||||
@@ -89,12 +89,6 @@
|
||||
$(function()
|
||||
{
|
||||
$('#<?php echo $browseType?>Tab').addClass('btn-active-text').append(" <span class='label label-light label-badge'><?php echo ($browseType == 'newest' and $pager->recTotal >= $pager->recPerPage) ? $pager->recPerPage : $pager->recTotal;?></span>");
|
||||
<?php if($this->config->global->flow == 'full'):?>
|
||||
$('#subNavbar [data-id=testcase]').addClass('active');
|
||||
<?php else:?>
|
||||
$('#navbar li.active').removeClass('active');
|
||||
$('#navbar li[data-id=unit]').addClass('active');
|
||||
<?php endif;?>
|
||||
})
|
||||
</script>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr class='PGMParams'>
|
||||
<th><?php echo $lang->program->PRJCommon . $lang->program->PRJStatus;?></th>
|
||||
<th><?php echo $lang->program->PRJStatus;?></th>
|
||||
<td><?php echo html::select('PRJStatus', $lang->program->statusList, '', "class='form-control chosen'");?></td>
|
||||
</tr>
|
||||
<tr class='PGMParams'>
|
||||
|
||||
@@ -40,13 +40,16 @@
|
||||
$active = $methodName == 'execution' ? ' btn-active-text' : '';
|
||||
common::printLink('user', 'execution', "userID={$user->id}", $label, '', "class='btn btn-link $active'");
|
||||
|
||||
$label = "<span class='text'>{$lang->user->issue}</span>";
|
||||
$active = ($methodName == 'issue' or $methodName == 'issue')? ' btn-active-text' : '';
|
||||
common::printLink('user', 'issue', "userID={$user->id}", $label, '', "class='btn btn-link $active'");
|
||||
if($this->config->global->mode == 'new')
|
||||
{
|
||||
$label = "<span class='text'>{$lang->user->issue}</span>";
|
||||
$active = ($methodName == 'issue' or $methodName == 'issue')? ' btn-active-text' : '';
|
||||
common::printLink('user', 'issue', "userID={$user->id}", $label, '', "class='btn btn-link $active'");
|
||||
|
||||
$label = "<span class='text'>{$lang->user->risk}</span>";
|
||||
$active = ($methodName == 'risk' or $methodName == 'risk')? ' btn-active-text' : '';
|
||||
common::printLink('user', 'risk', "userID={$user->id}", $label, '', "class='btn btn-link $active'");
|
||||
$label = "<span class='text'>{$lang->user->risk}</span>";
|
||||
$active = ($methodName == 'risk' or $methodName == 'risk')? ' btn-active-text' : '';
|
||||
common::printLink('user', 'risk', "userID={$user->id}", $label, '', "class='btn btn-link $active'");
|
||||
}
|
||||
|
||||
$label = "<span class='text'>{$lang->user->dynamic}</span>";
|
||||
$active = $methodName == 'dynamic' ? ' btn-active-text' : '';
|
||||
|
||||
Reference in New Issue
Block a user