Merge branch '15.0.beta3' of https://gitlab.zcorp.cc/easycorp/zentaopms into 15.0.beta3
This commit is contained in:
+8
-3
@@ -331,12 +331,17 @@ REPLACE INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
|
||||
(11, 'program', 'browse'),
|
||||
(11, 'user', 'cropAvatar');
|
||||
|
||||
INSERT INTO `zt_lang` (`lang`, `module`, `section`, `key`, `value`, `system`) VALUES
|
||||
REPLACE INTO `zt_lang` (`lang`, `module`, `section`, `key`, `value`, `system`) VALUES
|
||||
('zh-cn', 'custom', 'URSRList', '1', '{\"SRName\":\"\\u8f6f\\u4ef6\\u9700\\u6c42\",\"URName\":\"\\u7528\\u6237\\u9700\\u6c42\"}', '1'),
|
||||
('zh-cn', 'custom', 'URSRList', '2', '{\"SRName\":\"\\u7814\\u53d1\\u9700\\u6c42\",\"URName\":\"\\u7528\\u6237\\u9700\\u6c42\"}', '1'),
|
||||
('zh-cn', 'custom', 'URSRList', '3', '{\"SRName\":\"\\u8f6f\\u9700\",\"URName\":\"\\u7528\\u9700\"}', '1'),
|
||||
('zh-cn', 'custom', 'URSRList', '4', '{\"SRName\":\"\\u6545\\u4e8b\",\"URName\":\"\\u53f2\\u8bd7\"}', '1'),
|
||||
('zh-cn', 'custom', 'URSRList', '5', '{\"SRName\":\"\\u9700\\u6c42\",\"URName\":\"\\u7528\\u6237\\u9700\\u6c42\"}', '1');
|
||||
|
||||
INSERT INTO `zt_config` (`owner`, `module`, `section`, `key`, `value`) VALUES ('system', 'common', '', 'CRProduct', '1');
|
||||
INSERT INTO `zt_config` (`owner`, `module`, `section`, `key`, `value`) VALUES ('system', 'common', '', 'CRExecution', '1');
|
||||
REPLACE INTO `zt_config` (`owner`, `module`, `section`, `key`, `value`) VALUES ('system', 'common', '', 'CRProduct', '1');
|
||||
REPLACE INTO `zt_config` (`owner`, `module`, `section`, `key`, `value`) VALUES ('system', 'common', '', 'CRExecution', '1');
|
||||
|
||||
update zt_block set source='execution' where block='statistic' and source='project';
|
||||
update zt_block set source='project' where block='statistic' and source='program';
|
||||
update zt_config set `value`='project-browse' where `key`='projectLink';
|
||||
update zt_config set `value`='program-browse' where `key`='programLink';
|
||||
|
||||
@@ -1550,7 +1550,6 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
|
||||
(1,'program','whitelist'),
|
||||
(1,'program','unbindWhielist'),
|
||||
(1,'program','unlinkStakeholder'),
|
||||
(1,'program','view'),
|
||||
(1,'project','activate'),
|
||||
(1,'project','all'),
|
||||
(1,'project','batchedit'),
|
||||
@@ -2358,7 +2357,6 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES
|
||||
(4,'program','whitelist'),
|
||||
(4,'program','unbindWhielist'),
|
||||
(4,'program','unlinkStakeholder'),
|
||||
(4,'program','view'),
|
||||
(4,'project','activate'),
|
||||
(4,'project','all'),
|
||||
(4,'project','batchedit'),
|
||||
@@ -4147,5 +4145,3 @@ INSERT INTO `zt_config` (`owner`, `module`, `section`, `key`, `value`) VALUES ('
|
||||
INSERT INTO `zt_config` (`owner`, `module`, `section`, `key`, `value`) VALUES ('system', 'custom', '', 'URSR', '6');
|
||||
INSERT INTO `zt_config` (`owner`, `module`, `section`, `key`, `value`) VALUES ('system', 'project', '', 'unitList', 'CNY,USD');
|
||||
INSERT INTO `zt_config` (`owner`, `module`, `section`, `key`, `value`) VALUES ('system', 'project', '', 'defaultCurrency', 'CNY');
|
||||
INSERT INTO `zt_config` (`owner`, `module`, `section`, `key`, `value`) VALUES ('system', 'common', '', 'CRProduct', '1');
|
||||
INSERT INTO `zt_config` (`owner`, `module`, `section`, `key`, `value`) VALUES ('system', 'common', '', 'CRExecution', '1');
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
*/
|
||||
|
||||
helper::import(dirname(dirname(__FILE__)) . '/base/front/front.class.php');
|
||||
|
||||
/**
|
||||
* html类,生成html标签。
|
||||
* The html class, to build html tags.
|
||||
|
||||
+31
-27
@@ -155,9 +155,9 @@ $lang->dividerMenu = ',qa,report,admin,';
|
||||
|
||||
/* Program set menu. */
|
||||
$lang->program = new stdclass();
|
||||
$lang->program->menu = new stdclass();
|
||||
//$lang->program->menu->index = 'Dashboard|program|index|';
|
||||
$lang->program->menu->browse = array('link' => 'Program|program|browse|');
|
||||
$lang->program->homeMenu = new stdclass();
|
||||
//$lang->program->homeMenu->index = 'Dashboard|program|index|';
|
||||
$lang->program->homeMenu->browse = array('link' => 'Program|program|browse|');
|
||||
|
||||
$lang->project = new stdclass();
|
||||
$lang->project->menu = new stdclass();
|
||||
@@ -172,36 +172,36 @@ else
|
||||
|
||||
$lang->project->dividerMenu = ',execution,programplan,doc,other,';
|
||||
|
||||
$lang->program->viewMenu = new stdclass();
|
||||
$lang->program->viewMenu->product = array('link' => 'Product|program|product|program=%s', 'alias' => 'view');
|
||||
$lang->program->viewMenu->project = array('link' => "Project|program|project|program=%s");
|
||||
$lang->program->viewMenu->personnel = array('link' => "Member|personnel|invest|program=%s");
|
||||
$lang->program->viewMenu->stakeholder = array('link' => "Stakeholder|program|stakeholder|program=%s", 'alias' => 'createstakeholder');
|
||||
$lang->program->menu = new stdclass();
|
||||
$lang->program->menu->product = array('link' => 'Product|program|product|programID=%s', 'alias' => 'view');
|
||||
$lang->program->menu->project = array('link' => "Project|program|project|programID=%s");
|
||||
$lang->program->menu->personnel = array('link' => "Member|personnel|invest|programID=%s");
|
||||
$lang->program->menu->stakeholder = array('link' => "Stakeholder|program|stakeholder|programID=%s", 'alias' => 'createstakeholder');
|
||||
|
||||
$lang->personnel = new stdClass();
|
||||
$lang->personnel->menu = new stdClass();
|
||||
$lang->personnel->menu->invest = array('link' => "Investment|personnel|invest|program=%s");
|
||||
$lang->personnel->menu->accessible = array('link' => "Accessible|personnel|accessible|program=%s");
|
||||
$lang->personnel->menu->whitelist = array('link' => "Whitelist|personnel|whitelist|program=%s", 'alias' => 'addwhitelist');
|
||||
$lang->personnel->menu->invest = array('link' => "Investment|personnel|invest|programID=%s");
|
||||
$lang->personnel->menu->accessible = array('link' => "Accessible|personnel|accessible|programID=%s");
|
||||
$lang->personnel->menu->whitelist = array('link' => "Whitelist|personnel|whitelist|program=ID%s", 'alias' => 'addwhitelist');
|
||||
|
||||
/* Scrum menu. */
|
||||
$lang->product = new stdclass();
|
||||
$lang->product->menu = new stdclass();
|
||||
$lang->product->menu->home = 'Dashboard|product|index|';
|
||||
$lang->product->menu->list = array('link' => $lang->productCommon . '|product|all|', 'alias' => 'create,batchedit');
|
||||
$lang->product->homeMenu = new stdclass();
|
||||
$lang->product->homeMenu->home = 'Dashboard|product|index|';
|
||||
$lang->product->homeMenu->list = array('link' => $lang->productCommon . '|product|all|', 'alias' => 'create,batchedit');
|
||||
|
||||
$lang->product->viewMenu = new stdclass();
|
||||
$lang->product->viewMenu->dashboard = array('link' => 'Dashboard|product|dashboard|productID=%s');
|
||||
$lang->product->menu = new stdclass();
|
||||
$lang->product->menu->dashboard = array('link' => 'Dashboard|product|dashboard|productID=%s');
|
||||
if($config->URAndSR) $lang->product->viewMenu->requirement = array('link' => "$lang->URCommon|product|browse|productID=%s&branch=&browseType=unclosed¶m=0&storyType=requirement", 'alias' => 'batchedit', 'subModule' => 'story');
|
||||
$lang->product->viewMenu->story = array('link' => "$lang->SRCommon|product|browse|productID=%s", 'alias' => 'batchedit', 'subModule' => 'story');
|
||||
$lang->product->viewMenu->plan = array('link' => "Plan|productplan|browse|productID=%s", 'subModule' => 'productplan');
|
||||
$lang->product->viewMenu->release = array('link' => "Release|release|browse|productID=%s", 'subModule' => 'release');
|
||||
$lang->product->viewMenu->roadmap = 'Roadmap|product|roadmap|productID=%s';
|
||||
$lang->product->viewMenu->project = "Project|product|project|status=all&productID=%s";
|
||||
$lang->product->viewMenu->track = array('link' => "Track|story|track|productID=%s");
|
||||
$lang->product->viewMenu->doc = array('link' => 'Doc|doc|objectLibs|type=product&objectID=%s&from=product', 'subModule' => 'doc');
|
||||
$lang->product->viewMenu->dynamic = 'Dynamic|product|dynamic|productID=%s';
|
||||
$lang->product->viewMenu->set = array('link' => 'Setting|product|view|productID=%s', 'subModule' => 'tree,branch', 'alias' => 'edit');
|
||||
$lang->product->menu->story = array('link' => "$lang->SRCommon|product|browse|productID=%s", 'alias' => 'batchedit', 'subModule' => 'story');
|
||||
$lang->product->menu->plan = array('link' => "Plan|productplan|browse|productID=%s", 'subModule' => 'productplan');
|
||||
$lang->product->menu->release = array('link' => "Release|release|browse|productID=%s", 'subModule' => 'release');
|
||||
$lang->product->menu->roadmap = 'Roadmap|product|roadmap|productID=%s';
|
||||
$lang->product->menu->project = "Project|product|project|status=all&productID=%s";
|
||||
$lang->product->menu->track = array('link' => "Track|story|track|productID=%s");
|
||||
$lang->product->menu->doc = array('link' => 'Doc|doc|objectLibs|type=product&objectID=%s&from=product', 'subModule' => 'doc');
|
||||
$lang->product->menu->dynamic = 'Dynamic|product|dynamic|productID=%s';
|
||||
$lang->product->menu->set = array('link' => 'Setting|product|view|productID=%s', 'subModule' => 'tree,branch', 'alias' => 'edit');
|
||||
|
||||
$lang->product->setMenu = new stdclass();
|
||||
$lang->product->setMenu->view = array('link' => 'View|product|view|productID={PRODUCT}', 'alias' => 'edit');
|
||||
@@ -333,8 +333,11 @@ $lang->story->menu = $lang->product->menu;
|
||||
|
||||
/* Project menu settings. */
|
||||
$lang->execution = new stdclass();
|
||||
$lang->execution->menu = new stdclass();
|
||||
$lang->execution->homeMenu = new stdclass();
|
||||
$lang->execution->homeMenu->index = 'Index|execution|index|';
|
||||
$lang->execution->homeMenu->list = array('link' => 'Execution|execution|all|', 'alias' => 'batchedit');
|
||||
|
||||
$lang->execution->menu = new stdclass();
|
||||
$lang->execution->menu->task = array('link' => 'Task|execution|task|executionID=%s', 'subModule' => 'task,tree', 'alias' => 'importtask,importbug');
|
||||
$lang->execution->menu->kanban = array('link' => 'Kanban|execution|kanban|executionID=%s');
|
||||
$lang->execution->menu->burn = array('link' => 'Burndown|execution|burn|executionID=%s');
|
||||
@@ -632,7 +635,6 @@ $lang->navGroup->tree = 'product';
|
||||
$lang->navGroup->project = 'project';
|
||||
$lang->navGroup->qa = 'project';
|
||||
$lang->navGroup->bug = 'project';
|
||||
$lang->navGroup->doc = 'project';
|
||||
$lang->navGroup->testcase = 'project';
|
||||
$lang->navGroup->testtask = 'project';
|
||||
$lang->navGroup->testreport = 'project';
|
||||
@@ -663,6 +665,8 @@ $lang->navGroup->execution = 'execution';
|
||||
$lang->navGroup->task = 'execution';
|
||||
$lang->navGroup->build = 'execution';
|
||||
|
||||
$lang->navGroup->doc = 'doc';
|
||||
|
||||
$lang->navGroup->sqlbuilder = 'system';
|
||||
$lang->navGroup->auditcl = 'system';
|
||||
$lang->navGroup->cmcl = 'system';
|
||||
|
||||
@@ -155,9 +155,9 @@ $lang->dividerMenu = ',qa,report,admin,';
|
||||
|
||||
/* Program set menu. */
|
||||
$lang->program = new stdclass();
|
||||
$lang->program->menu = new stdclass();
|
||||
//$lang->program->menu->index = '仪表盘|program|index|';
|
||||
$lang->program->menu->browse = array('link' => '项目集|program|browse|');
|
||||
$lang->program->homeMenu = new stdclass();
|
||||
//$lang->program->homeMenu->index = '仪表盘|program|index|';
|
||||
$lang->program->homeMenu->browse = array('link' => '项目集|program|browse|');
|
||||
|
||||
$lang->project = new stdclass();
|
||||
$lang->project->menu = new stdclass();
|
||||
@@ -172,36 +172,36 @@ else
|
||||
|
||||
$lang->project->dividerMenu = ',execution,programplan,doc,dynamic,';
|
||||
|
||||
$lang->program->viewMenu = new stdclass();
|
||||
$lang->program->viewMenu->product = array('link' => '产品|program|product|program=%s', 'alias' => 'view');
|
||||
$lang->program->viewMenu->project = array('link' => "项目|program|project|program=%s");
|
||||
$lang->program->viewMenu->personnel = array('link' => "人员|personnel|invest|program=%s");
|
||||
$lang->program->viewMenu->stakeholder = array('link' => "干系人|program|stakeholder|program=%s", 'alias' => 'createstakeholder');
|
||||
$lang->program->menu = new stdclass();
|
||||
$lang->program->menu->product = array('link' => '产品|program|product|programID=%s', 'alias' => 'view');
|
||||
$lang->program->menu->project = array('link' => "项目|program|project|programID=%s");
|
||||
$lang->program->menu->personnel = array('link' => "人员|personnel|invest|programID=%s");
|
||||
$lang->program->menu->stakeholder = array('link' => "干系人|program|stakeholder|programID=%s", 'alias' => 'createstakeholder');
|
||||
|
||||
$lang->personnel = new stdClass();
|
||||
$lang->personnel->menu = new stdClass();
|
||||
$lang->personnel->menu->invest = array('link' => "投入人员|personnel|invest|program=%s");
|
||||
$lang->personnel->menu->accessible = array('link' => "可访问人员|personnel|accessible|program=%s");
|
||||
$lang->personnel->menu->whitelist = array('link' => "白名单|personnel|whitelist|program=%s", 'alias' => 'addwhitelist');
|
||||
$lang->personnel->menu->invest = array('link' => "投入人员|personnel|invest|programID=%s");
|
||||
$lang->personnel->menu->accessible = array('link' => "可访问人员|personnel|accessible|programID=%s");
|
||||
$lang->personnel->menu->whitelist = array('link' => "白名单|personnel|whitelist|objectID=%s", 'alias' => 'addwhitelist');
|
||||
|
||||
/* Scrum menu. */
|
||||
$lang->product = new stdclass();
|
||||
$lang->product->menu = new stdclass();
|
||||
$lang->product->menu->home = '仪表盘|product|index|';
|
||||
$lang->product->menu->list = array('link' => $lang->productCommon . '|product|all|', 'alias' => 'create,batchedit,manageline');
|
||||
$lang->product->homeMenu = new stdclass();
|
||||
$lang->product->homeMenu->home = '仪表盘|product|index|';
|
||||
$lang->product->homeMenu->list = array('link' => $lang->productCommon . '|product|all|', 'alias' => 'create,batchedit,manageline');
|
||||
|
||||
$lang->product->viewMenu = new stdclass();
|
||||
$lang->product->viewMenu->dashboard = array('link' => '仪表盘|product|dashboard|productID=%s');
|
||||
if($config->URAndSR) $lang->product->viewMenu->requirement = array('link' => "$lang->URCommon|product|browse|productID=%s&branch=&browseType=unclosed¶m=0&storyType=requirement", 'alias' => 'batchedit', 'subModule' => 'story');
|
||||
$lang->product->viewMenu->story = array('link' => "$lang->SRCommon|product|browse|productID=%s", 'alias' => 'batchedit', 'subModule' => 'story');
|
||||
$lang->product->viewMenu->plan = array('link' => "计划|productplan|browse|productID=%s", 'subModule' => 'productplan');
|
||||
$lang->product->viewMenu->release = array('link' => '发布|release|browse|productID=%s', 'subModule' => 'release');
|
||||
$lang->product->viewMenu->roadmap = '路线图|product|roadmap|productID=%s';
|
||||
$lang->product->viewMenu->project = "项目|product|project|status=all&productID=%s";
|
||||
$lang->product->viewMenu->track = array('link' => "矩阵|story|track|productID=%s");
|
||||
$lang->product->viewMenu->doc = array('link' => '文档|doc|objectLibs|type=product&objectID=%s&from=product', 'subModule' => 'doc');
|
||||
$lang->product->viewMenu->dynamic = '动态|product|dynamic|productID=%s';
|
||||
$lang->product->viewMenu->set = array('link' => '设置|product|view|productID=%s', 'subModule' => 'tree,branch', 'alias' => 'edit');
|
||||
$lang->product->menu = new stdclass();
|
||||
$lang->product->menu->dashboard = array('link' => '仪表盘|product|dashboard|productID=%s');
|
||||
if($config->URAndSR) $lang->product->menu->requirement = array('link' => "$lang->URCommon|product|browse|productID=%s&branch=&browseType=unclosed¶m=0&storyType=requirement", 'alias' => 'batchedit', 'subModule' => 'story');
|
||||
$lang->product->menu->story = array('link' => "$lang->SRCommon|product|browse|productID=%s", 'alias' => 'batchedit', 'subModule' => 'story');
|
||||
$lang->product->menu->plan = array('link' => "计划|productplan|browse|productID=%s", 'subModule' => 'productplan');
|
||||
$lang->product->menu->release = array('link' => '发布|release|browse|productID=%s', 'subModule' => 'release');
|
||||
$lang->product->menu->roadmap = '路线图|product|roadmap|productID=%s';
|
||||
$lang->product->menu->project = "项目|product|project|status=all&productID=%s";
|
||||
$lang->product->menu->track = array('link' => "矩阵|story|track|productID=%s");
|
||||
$lang->product->menu->doc = array('link' => '文档|doc|objectLibs|type=product&objectID=%s', 'subModule' => 'doc');
|
||||
$lang->product->menu->dynamic = '动态|product|dynamic|productID=%s';
|
||||
$lang->product->menu->set = array('link' => '设置|product|view|productID=%s', 'subModule' => 'tree,branch', 'alias' => 'edit');
|
||||
|
||||
$lang->product->setMenu = new stdclass();
|
||||
$lang->product->setMenu->view = array('link' => '概况|product|view|productID={PRODUCT}', 'alias' => 'edit');
|
||||
@@ -213,7 +213,7 @@ $lang->release = new stdclass();
|
||||
$lang->branch = new stdclass();
|
||||
$lang->productplan = new stdclass();
|
||||
|
||||
$lang->release->menu = $lang->product->viewMenu;
|
||||
$lang->release->menu = $lang->product->menu;
|
||||
$lang->branch->menu = $lang->product->menu;
|
||||
$lang->productplan->menu = $lang->product->menu;
|
||||
|
||||
@@ -584,41 +584,6 @@ $lang->webhook = new stdclass();
|
||||
$lang->message = new stdclass();
|
||||
$lang->search = new stdclass();
|
||||
|
||||
/* 菜单分组。*/
|
||||
$lang->menugroup = new stdclass();
|
||||
$lang->menugroup->release = 'product';
|
||||
$lang->menugroup->story = 'product';
|
||||
$lang->menugroup->branch = 'product';
|
||||
$lang->menugroup->productplan = 'product';
|
||||
$lang->menugroup->task = 'project';
|
||||
$lang->menugroup->build = 'project';
|
||||
$lang->menugroup->convert = 'admin';
|
||||
$lang->menugroup->upgrade = 'admin';
|
||||
$lang->menugroup->user = 'company';
|
||||
$lang->menugroup->group = 'company';
|
||||
$lang->menugroup->bug = 'qa';
|
||||
$lang->menugroup->case = 'qa';
|
||||
$lang->menugroup->testreport = 'qa';
|
||||
$lang->menugroup->people = 'admin';
|
||||
$lang->menugroup->dept = 'company';
|
||||
$lang->menugroup->todo = 'my';
|
||||
$lang->menugroup->score = 'my';
|
||||
$lang->menugroup->action = 'admin';
|
||||
$lang->menugroup->backup = 'admin';
|
||||
$lang->menugroup->cron = 'admin';
|
||||
$lang->menugroup->extension = 'admin';
|
||||
$lang->menugroup->custom = 'admin';
|
||||
$lang->menugroup->mail = 'admin';
|
||||
$lang->menugroup->dev = 'admin';
|
||||
$lang->menugroup->entry = 'admin';
|
||||
$lang->menugroup->webhook = 'admin';
|
||||
$lang->menugroup->message = 'admin';
|
||||
|
||||
$lang->menugroup->repo = 'ci';
|
||||
$lang->menugroup->jenkins = 'ci';
|
||||
$lang->menugroup->compile = 'ci';
|
||||
$lang->menugroup->job = 'ci';
|
||||
|
||||
/* Nav group.*/
|
||||
$lang->navGroup = new stdclass();
|
||||
$lang->navGroup->my = 'my';
|
||||
@@ -638,7 +603,6 @@ $lang->navGroup->tree = 'product';
|
||||
$lang->navGroup->project = 'project';
|
||||
$lang->navGroup->qa = 'project';
|
||||
$lang->navGroup->bug = 'project';
|
||||
$lang->navGroup->doc = 'project';
|
||||
$lang->navGroup->testcase = 'project';
|
||||
$lang->navGroup->testtask = 'project';
|
||||
$lang->navGroup->testreport = 'project';
|
||||
@@ -669,6 +633,8 @@ $lang->navGroup->execution = 'execution';
|
||||
$lang->navGroup->task = 'execution';
|
||||
$lang->navGroup->build = 'execution';
|
||||
|
||||
$lang->navGroup->doc = 'doc';
|
||||
|
||||
$lang->navGroup->company = 'system';
|
||||
$lang->navGroup->sqlbuilder = 'system';
|
||||
$lang->navGroup->auditcl = 'system';
|
||||
@@ -901,7 +867,7 @@ $lang->menu->scrum = new stdclass();
|
||||
$lang->menu->scrum->index = '仪表盘|project|index|project={PROJECT}';
|
||||
$lang->menu->scrum->execution = "$lang->executionCommon|execution|all|status=all&projectID={PROJECT}&from=project";
|
||||
$lang->menu->scrum->projectstory = array('link' => $lang->SRCommon . '|projectstory|story', 'alias' => 'story,track');
|
||||
$lang->menu->scrum->doc = '文档|doc|index|';
|
||||
$lang->menu->scrum->doc = array('link' => '文档|doc|objectLibs|type=project&objectID={PROJECT}', 'subModule' => 'doc');
|
||||
$lang->menu->scrum->qa = array('link' => '测试|qa|index', 'subModule' => 'testcase,testtask');
|
||||
$lang->menu->scrum->ci = '代码|repo|browse';
|
||||
$lang->menu->scrum->projectbuild = array('link' => '版本|projectbuild|browse|project={PROJECT}');
|
||||
|
||||
+72
-96
@@ -625,53 +625,46 @@ class commonModel extends model
|
||||
/**
|
||||
* Print the main menu.
|
||||
*
|
||||
* @param string $moduleName
|
||||
* @param string $methodName
|
||||
* @param string $currentModule
|
||||
* @param string $currentMethod
|
||||
*
|
||||
* @static
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public static function printMainmenu($moduleName, $methodName = '')
|
||||
public static function printMainMenu($currentModule, $currentMethod)
|
||||
{
|
||||
global $app, $lang, $config;
|
||||
|
||||
if($moduleName == 'product' and $methodName == 'create') return;
|
||||
|
||||
/* Set the main main menu. */
|
||||
$mainMenu = $moduleName;
|
||||
$currentModule = $app->rawModule;
|
||||
$currentMethod = $app->rawMethod;
|
||||
|
||||
/* Set main menu by group. */
|
||||
$group = isset($lang->navGroup->$moduleName) ? $lang->navGroup->$moduleName : $moduleName;
|
||||
self::setMainMenuByGroup($group, $moduleName, $methodName);
|
||||
/* Set main menu by openApp and module. */
|
||||
$openApp = $app->openApp ? $app->openApp : $lang->navGroup->$currentModule;
|
||||
self::setMainMenuByOpenApp($openApp, $currentModule, $currentMethod);
|
||||
|
||||
/* Print all main menus. */
|
||||
$menu = customModel::getMainMenu();
|
||||
$activeName = 'active';
|
||||
$lastMenu = end($menu);
|
||||
if(isset($lang->menugroup->$moduleName)) $mainMenu = $lang->menugroup->$moduleName;
|
||||
|
||||
echo "<ul class='nav nav-default'>\n";
|
||||
foreach($menu as $menuItem)
|
||||
{
|
||||
if(isset($menuItem->hidden) && $menuItem->hidden) continue;
|
||||
if(empty($menuItem->link)) continue;
|
||||
if(isset($lang->$group->dividerMenu) and strpos($lang->$group->dividerMenu, ",{$menuItem->name},") !== false) echo "<li class='divider'></li>";
|
||||
if(isset($lang->$openApp->dividerMenu) and strpos($lang->$openApp->dividerMenu, ",{$menuItem->name},") !== false) echo "<li class='divider'></li>";
|
||||
|
||||
/* Init the these vars. */
|
||||
$alias = isset($menuItem->alias) ? $menuItem->alias : '';
|
||||
$subModule = isset($menuItem->subModule) ? explode(',', $menuItem->subModule) : array();
|
||||
$class = isset($menuItem->class) ? $menuItem->class : '';
|
||||
$active = $menuItem->name == $mainMenu ? "active" : '';
|
||||
if($subModule and in_array($currentModule, $subModule)) $active = 'active';
|
||||
$active = $menuItem->name == $currentModule ? "active" : '';
|
||||
if($subModule) $active = in_array($currentModule, $subModule) ? 'active' : '';
|
||||
|
||||
if($menuItem->link)
|
||||
{
|
||||
$target = '';
|
||||
$module = '';
|
||||
$method = '';
|
||||
$link = commonModel::createMenuLink($menuItem, $group);
|
||||
$link = commonModel::createMenuLink($menuItem, $openApp);
|
||||
if(is_array($menuItem->link))
|
||||
{
|
||||
if(isset($menuItem->link['target'])) $target = $menuItem->link['target'];
|
||||
@@ -716,7 +709,8 @@ class commonModel extends model
|
||||
if($currentModule == 'product' and $currentMethod == 'browse') $active = '';
|
||||
if($currentModule == 'story') $active = '';
|
||||
|
||||
$menuItemHtml = "<li class='$class $active' data-id='$menuItem->name'>" . html::a($link, $label, $target) . $subMenu . "</li>\n";
|
||||
$misc = $openApp != $lang->navGroup->$module ? "data-app='$openApp'" : '';
|
||||
$menuItemHtml = "<li class='$class $active' data-id='$menuItem->name'>" . html::a($link, $label, $target, $misc) . $subMenu . "</li>\n";
|
||||
|
||||
echo $menuItemHtml;
|
||||
}
|
||||
@@ -766,27 +760,25 @@ class commonModel extends model
|
||||
global $config, $lang, $app;
|
||||
$moduleName = $app->rawModule;
|
||||
$methodName = $app->rawMethod;
|
||||
$mainMenu = $moduleName;
|
||||
if(isset($lang->menugroup->$moduleName)) $mainMenu = $lang->menugroup->$moduleName;
|
||||
|
||||
/* Set main menu by group. */
|
||||
$group = isset($lang->navGroup->$moduleName) ? $lang->navGroup->$moduleName : '';
|
||||
if($moduleName == 'admin') return;
|
||||
if($group == 'repo' || $group == 'ops' || $group == 'feedback') return;
|
||||
if($group == 'my') self::getMyModuleMenu($moduleName, $methodName);
|
||||
if($group == 'project') self::getProjectModuleMenu($moduleName, $methodName);
|
||||
if($group == 'product')
|
||||
/* Set main menu by openApp. */
|
||||
$openApp = $app->openApp ? $app->openApp : $lang->navGroup->$moduleName;
|
||||
if(in_array($openApp, array('admin', 'repo', 'ops', 'feedback'))) return;
|
||||
|
||||
if($openApp == 'my') self::getMyModuleMenu($moduleName, $methodName);
|
||||
if($openApp == 'project') self::getProjectModuleMenu($moduleName, $methodName);
|
||||
if($openApp == 'product')
|
||||
{
|
||||
$lang->product->menu = $lang->product->setMenu;
|
||||
self::processMenuVars($lang->product->menu);
|
||||
}
|
||||
if($group == 'execution')
|
||||
if($openApp == 'execution')
|
||||
{
|
||||
if(in_array($methodName, array('grouptask', 'tree'))) $lang->execution->menu = $lang->execution->viewMenu;
|
||||
if(in_array($methodName, array('qa', 'bug', 'testtask', 'testcase', 'testreport'))) $lang->execution->menu = $lang->execution->qaMenu;
|
||||
if(in_array($methodName, array('view', 'manageproducts', 'team', 'whitelist', 'edit', 'managemembers', 'addwhitelist'))) $lang->execution->menu = self::processMenuVars($lang->execution->settingMenu);
|
||||
}
|
||||
if(strpos('qa|bug|testcase|testreport|testtask', $moduleName) !== false and $group == 'project')
|
||||
if(strpos('qa|bug|testcase|testreport|testtask', $moduleName) !== false and $openApp == 'project')
|
||||
{
|
||||
unset($lang->$moduleName->menu->testsuite);
|
||||
unset($lang->$moduleName->menu->caselib);
|
||||
@@ -842,7 +834,7 @@ class commonModel extends model
|
||||
$target = '';
|
||||
$module = '';
|
||||
$method = '';
|
||||
$link = commonModel::createMenuLink($menuItem, $group);
|
||||
$link = commonModel::createMenuLink($menuItem, $openApp);
|
||||
if(is_array($menuItem->link))
|
||||
{
|
||||
if(isset($menuItem->link['target'])) $target = $menuItem->link['target'];
|
||||
@@ -2300,80 +2292,20 @@ EOD;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set main menu by nav group.
|
||||
* Set main menu by openApp.
|
||||
*
|
||||
* @param string $group
|
||||
* @param string $openApp
|
||||
* @param string $moduleName
|
||||
* @param string $methodName
|
||||
* @static
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public static function setMainMenuByGroup($group, $moduleName, $methodName)
|
||||
public static function setMainMenuByOpenApp($openApp, $moduleName, $methodName)
|
||||
{
|
||||
global $lang, $config;
|
||||
if($group == 'my')
|
||||
{
|
||||
$lang->menu = $lang->my->menu;
|
||||
$lang->menuOrder = $lang->my->menuOrder;
|
||||
}
|
||||
if($group == 'system')
|
||||
{
|
||||
$lang->menu = $lang->system->menu;
|
||||
$lang->menuOrder = $lang->system->menuOrder;
|
||||
$lang->report->menu = $lang->measurement->menu;
|
||||
}
|
||||
if($group == 'doclib') return;
|
||||
if($group == 'report')
|
||||
{
|
||||
$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;
|
||||
$lang->menuOrder = $lang->attend->menuOrder;
|
||||
}
|
||||
if($group == 'admin')
|
||||
{
|
||||
$lang->menu = $lang->admin->menu;
|
||||
$lang->menuOrder = $lang->admin->menuOrder;
|
||||
}
|
||||
if($group == 'program')
|
||||
{
|
||||
$lang->menu = $lang->program->menu;
|
||||
}
|
||||
if($group == 'product')
|
||||
{
|
||||
$lang->menu = $lang->product->menu;
|
||||
$lang->menuOrder = $lang->product->menuOrder;
|
||||
}
|
||||
if($group == 'repo')
|
||||
{
|
||||
$lang->menu = $lang->repo->menu;
|
||||
$lang->menuOrder = $lang->repo->menuOrder;
|
||||
}
|
||||
if($group == 'ops')
|
||||
{
|
||||
$lang->menu = $lang->ops->menu;
|
||||
$lang->menuOrder = $lang->ops->menuOrder;
|
||||
}
|
||||
if($group == 'feedback')
|
||||
{
|
||||
$lang->menu = $lang->feedback->menu;
|
||||
$lang->menuOrder = $lang->feedback->menuOrder;
|
||||
}
|
||||
if($group == 'execution')
|
||||
{
|
||||
$lang->menu = $lang->execution->menu;
|
||||
$lang->menuOrder = $lang->execution->menuOrder;
|
||||
}
|
||||
if($group == 'project')
|
||||
|
||||
if($openApp == 'project')
|
||||
{
|
||||
if($config->systemMode == 'classic' or ($moduleName == 'project' and $methodName == 'browse'))
|
||||
{
|
||||
@@ -2383,7 +2315,30 @@ EOD;
|
||||
{
|
||||
$lang->menu = self::getProjectMainMenu($moduleName);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if(!isset($lang->$openApp->homeMenu))
|
||||
{
|
||||
$lang->menu = $lang->$openApp->menu;
|
||||
$lang->menuOrder = $lang->$openApp->menuOrder;
|
||||
return;
|
||||
}
|
||||
|
||||
foreach($lang->$openApp->homeMenu as $menu)
|
||||
{
|
||||
$link = is_array($menu) ? $menu['link'] : $menu;
|
||||
$method = explode('|', $link)[2];
|
||||
|
||||
if($method == $methodName)
|
||||
{
|
||||
$lang->menu = $lang->$openApp->homeMenu;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
$lang->menu = $lang->$openApp->menu;
|
||||
$lang->menuOrder = $lang->$openApp->menuOrder;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2519,6 +2474,27 @@ EOD;
|
||||
->fetchAll();
|
||||
}
|
||||
|
||||
/**
|
||||
* Set objectID in current App.
|
||||
*
|
||||
* @param string $openApp
|
||||
* @param int $objectID
|
||||
*
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function setAppObjectID($openApp, $objectID)
|
||||
{
|
||||
global $lang;
|
||||
|
||||
foreach($lang->$openApp->menu as $label => $menu)
|
||||
{
|
||||
$lang->$openApp->menu->{$label}['link'] = is_array($menu) ? sprintf($menu['link'], $objectID) : sprintf($menu, $objectID);
|
||||
}
|
||||
|
||||
/* If objectID is set, cannot use homeMenu. */
|
||||
unset($lang->$openApp->homeMenu);
|
||||
}
|
||||
}
|
||||
|
||||
class common extends commonModel
|
||||
|
||||
@@ -8,13 +8,12 @@ include 'chosen.html.php';
|
||||
<?php $this->app->loadConfig('sso');?>
|
||||
<?php if(!empty($config->sso->redirect)) js::set('ssoRedirect', $config->sso->redirect);?>
|
||||
<?php
|
||||
$rawModule = zget($lang->navGroup, $app->rawModule);
|
||||
$isProgram = $rawModule == 'program';
|
||||
$isProduct = $rawModule == 'product';
|
||||
$isProject = $rawModule == 'project';
|
||||
$isExecution = $rawModule == 'execution';
|
||||
$isReport = $rawModule == 'report';
|
||||
$isQa = $rawModule == 'qa';
|
||||
$isProgram = $app->openApp == 'program';
|
||||
$isProduct = $app->openApp == 'product';
|
||||
$isProject = $app->openApp == 'project';
|
||||
$isExecution = $app->openApp == 'execution';
|
||||
$isReport = $app->openApp == 'report';
|
||||
$isQa = $app->openApp == 'qa';
|
||||
?>
|
||||
<header id='header'>
|
||||
<div id='mainHeader'>
|
||||
@@ -31,14 +30,6 @@ $isQa = $rawModule == 'qa';
|
||||
<?php endif;?>
|
||||
</div>
|
||||
<nav id='navbar'><?php commonModel::printMainmenu($app->rawModule, $app->rawMethod);?></nav>
|
||||
<div id='toolbar'>
|
||||
<?php if($isProgram) echo isset($lang->program->mainMenuAction) ? $lang->program->mainMenuAction : '';?>
|
||||
<?php if($isProject) echo $this->loadModel('project')->getMainAction($app->rawModule, $app->rawMethod);?>
|
||||
<?php if($isExecution) echo $this->execution->getMainAction($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 if($isQa) echo isset($lang->qa->mainMenuAction) ? $lang->qa->mainMenuAction : '';?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php if(!in_array($app->rawModule, $lang->noMenuModule)):?>
|
||||
|
||||
+15
-27
@@ -30,7 +30,6 @@ class doc extends control
|
||||
$this->productID = $this->cookie->product ? $this->cookie->product : '0';
|
||||
$this->projectID = isset($_GET['project']) ? $_GET['project'] : 0;
|
||||
if($this->from == 'doc') $this->session->set('project', '');
|
||||
if(!$this->projectID) $this->lang->navGroup->doc = 'doc';
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -114,17 +113,14 @@ class doc extends control
|
||||
/* According the from, set menus. */
|
||||
if($from == 'product')
|
||||
{
|
||||
$this->lang->navGroup->doc = 'product';
|
||||
$this->lang->doc->menuOrder = $this->lang->product->menuOrder;
|
||||
$this->product->setMenu($this->product->getPairs(), $productID);
|
||||
$this->lang->product->switcherMenu = $this->product->getSwitcher($productID);
|
||||
$this->lang->product->mainMenuAction = $this->product->getProductMainAction();
|
||||
$this->lang->product->switcherMenu = $this->product->getSwitcher($productID);
|
||||
$this->lang->noMenuModule[] = 'doc';
|
||||
$this->lang->set('menugroup.doc', 'product');
|
||||
}
|
||||
elseif($from == 'project')
|
||||
{
|
||||
$this->lang->navGroup->doc = 'project';
|
||||
$this->lang->doc->menu = $this->lang->project->menu;
|
||||
$this->lang->doc->menuOrder = $this->lang->project->menuOrder;
|
||||
if($this->config->systemMode == 'classic') $this->lang->noMenuModule[] = 'doc';
|
||||
@@ -149,7 +145,7 @@ class doc extends control
|
||||
$sort = $this->loadModel('common')->appendOrder($orderBy);
|
||||
|
||||
/* Build the search form. */
|
||||
$actionURL = $this->createLink('doc', 'browse', "lib=$libID&browseType=bySearch&queryID=myQueryID&orderBy=$orderBy&from=$from");
|
||||
$actionURL = $this->createLink('doc', 'browse', "lib=$libID&browseType=bySearch&queryID=myQueryID&orderBy=$orderBy");
|
||||
$this->doc->buildSearchForm($libID, $this->libs, $queryID, $actionURL, $type);
|
||||
|
||||
$title = '';
|
||||
@@ -199,7 +195,7 @@ class doc extends control
|
||||
$this->view->browseType = $browseType;
|
||||
$this->view->param = $param;
|
||||
$this->view->type = $type;
|
||||
$this->view->from = $this->lang->navGroup->doc == 'project' ? 'project' : $from;
|
||||
$this->view->from = $from;
|
||||
$this->view->pager = $pager;
|
||||
$this->view->libs = $libs;
|
||||
$this->view->currentLib = $libID ? $lib : '';
|
||||
@@ -351,8 +347,7 @@ class doc extends control
|
||||
$this->lang->doc->menu = $this->lang->product->menu;
|
||||
$this->lang->doc->menuOrder = $this->lang->product->menuOrder;
|
||||
$this->product->setMenu($this->product->getPairs(), $lib->product);
|
||||
$this->lang->product->switcherMenu = $this->product->getSwitcher($lib->product);
|
||||
$this->lang->product->mainMenuAction = $this->product->getProductMainAction();
|
||||
$this->lang->product->switcherMenu = $this->product->getSwitcher($lib->product);
|
||||
$this->lang->noMenuModule[] = 'doc';
|
||||
$this->lang->set('menugroup.doc', 'product');
|
||||
|
||||
@@ -439,8 +434,7 @@ class doc extends control
|
||||
$this->lang->navGroup->doc = 'product';
|
||||
$this->lang->doc->menuOrder = $this->lang->product->menuOrder;
|
||||
$this->product->setMenu($this->product->getPairs(), $objectID);
|
||||
$this->lang->product->switcherMenu = $this->product->getSwitcher($objectID);
|
||||
$this->lang->product->mainMenuAction = $this->product->getProductMainAction();
|
||||
$this->lang->product->switcherMenu = $this->product->getSwitcher($objectID);
|
||||
$this->lang->noMenuModule[] = 'doc';
|
||||
$this->lang->set('menugroup.doc', 'product');
|
||||
}
|
||||
@@ -505,8 +499,7 @@ class doc extends control
|
||||
$this->lang->navGroup->doc = 'product';
|
||||
$this->lang->doc->menuOrder = $this->lang->product->menuOrder;
|
||||
$this->product->setMenu($this->product->getPairs(), $objectID);
|
||||
$this->lang->product->switcherMenu = $this->product->getSwitcher($objectID);
|
||||
$this->lang->product->mainMenuAction = $this->product->getProductMainAction();
|
||||
$this->lang->product->switcherMenu = $this->product->getSwitcher($objectID);
|
||||
$this->lang->noMenuModule[] = 'doc';
|
||||
$this->lang->set('menugroup.doc', 'product');
|
||||
}
|
||||
@@ -836,8 +829,7 @@ class doc extends control
|
||||
$this->lang->navGroup->doc = 'product';
|
||||
$this->lang->doc->menuOrder = $this->lang->product->menuOrder;
|
||||
$this->product->setMenu($this->product->getPairs(), $objectID);
|
||||
$this->lang->product->switcherMenu = $this->product->getSwitcher($objectID);
|
||||
$this->lang->product->mainMenuAction = $this->product->getProductMainAction();
|
||||
$this->lang->product->switcherMenu = $this->product->getSwitcher($objectID);
|
||||
$this->lang->noMenuModule[] = 'doc';
|
||||
$this->lang->set('menugroup.doc', 'product');
|
||||
}
|
||||
@@ -917,13 +909,12 @@ class doc extends control
|
||||
*
|
||||
* @param string $type
|
||||
* @param int $objectID
|
||||
* @param string $from
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function objectLibs($type, $objectID, $from = 'doc')
|
||||
public function objectLibs($type, $objectID)
|
||||
{
|
||||
$this->from = $from;
|
||||
$from = $this->app->openApp;
|
||||
setcookie('from', $from, $this->config->cookieLife, $this->config->webRoot, '', false, true);
|
||||
$this->session->set('docList', $this->app->getURI(true));
|
||||
|
||||
@@ -933,23 +924,20 @@ class doc extends control
|
||||
|
||||
if($from == 'product')
|
||||
{
|
||||
$this->lang->navGroup->doc = 'product';
|
||||
$this->lang->doc->menuOrder = $this->lang->product->menuOrder;
|
||||
$this->product->setMenu($this->product->getPairs(), $objectID);
|
||||
$this->lang->product->switcherMenu = $this->product->getSwitcher($objectID);
|
||||
$this->lang->product->mainMenuAction = $this->product->getProductMainAction();
|
||||
$this->lang->product->switcherMenu = $this->product->getSwitcher($objectID);
|
||||
$this->lang->noMenuModule[] = 'doc';
|
||||
$this->lang->set('menugroup.doc', 'product');
|
||||
}
|
||||
elseif($from == 'project')
|
||||
{
|
||||
$this->lang->navGroup->doc = 'project';
|
||||
$this->lang->doc->menu = $this->lang->project->menu;
|
||||
$this->lang->doc->menuOrder = $this->lang->project->menuOrder;
|
||||
if($this->config->systemMode == 'classic') $this->lang->noMenuModule[] = 'doc';
|
||||
$this->project->setMenu($this->project->getPairs($this->session->PRJ, 'all', 0, true), $objectID);
|
||||
$this->lang->set('menugroup.doc', 'project');
|
||||
}
|
||||
elseif($from == 'execution')
|
||||
{
|
||||
$this->lang->set('menugroup.doc', 'execution');
|
||||
}
|
||||
else
|
||||
{
|
||||
$crumb = html::a(inlink('allLibs', "type=$type"), $type == 'product' ? $this->lang->productCommon : $this->lang->executionCommon) . $this->lang->doc->separator;
|
||||
@@ -974,7 +962,7 @@ class doc extends control
|
||||
|
||||
$this->view->type = $type;
|
||||
$this->view->object = $object;
|
||||
$this->view->from = $this->lang->navGroup->doc == 'project' ? 'project' : $from;
|
||||
$this->view->from = $$from;
|
||||
$this->view->libs = $this->doc->getLibsByObject($type, $objectID);
|
||||
$this->view->canBeChanged = common::canModify($type, $object); // Determines whether an object is editable.
|
||||
$this->display();
|
||||
|
||||
@@ -190,7 +190,6 @@ $lang->execution->batchUnlinkStory = 'Mehere Storys entfernen';
|
||||
$lang->execution->importTask = 'Importiere Aufgaben';
|
||||
$lang->execution->importPlanStories = 'Verknüpfe Story aus Plan';
|
||||
$lang->execution->importBug = 'Importiere Bugs';
|
||||
$lang->execution->updateOrder = 'Sortierung';
|
||||
$lang->execution->tree = 'Baum';
|
||||
$lang->execution->treeTask = 'Aufgabe anzeigen';
|
||||
$lang->execution->treeStory = 'Story anzeigen';
|
||||
|
||||
@@ -195,8 +195,6 @@ $lang->execution->batchUnlinkStory = 'Batch Unlink Stories';
|
||||
$lang->execution->importTask = 'Transfer Task';
|
||||
$lang->execution->importPlanStories = 'Link Stories By Plan';
|
||||
$lang->execution->importBug = 'Import Bug';
|
||||
$lang->execution->updateOrder = "Rank {$lang->executionCommon}";
|
||||
$lang->execution->execUpdateOrder = "Rank execution";
|
||||
$lang->execution->tree = 'Tree';
|
||||
$lang->execution->treeTask = 'Show Task Only';
|
||||
$lang->execution->treeStory = 'Show Story Only';
|
||||
|
||||
@@ -189,7 +189,6 @@ $lang->execution->batchUnlinkStory = 'Dissocier Stories par lot';
|
||||
$lang->execution->importTask = 'Transfert Tâche';
|
||||
$lang->execution->importPlanStories = 'Lier Stories Par Plan';
|
||||
$lang->execution->importBug = 'Importer Bug';
|
||||
$lang->execution->updateOrder = "Rang {$lang->executionCommon}";
|
||||
$lang->execution->tree = 'Arboressence';
|
||||
$lang->execution->treeTask = 'Seulement les Tâches';
|
||||
$lang->execution->treeStory = 'Seulement les Stories';
|
||||
|
||||
@@ -190,7 +190,6 @@ $lang->execution->batchUnlinkStory = 'Hủy liên kết câu chuyện hàng lo
|
||||
$lang->execution->importTask = 'Chuyển thành nhiệm vụ';
|
||||
$lang->execution->importPlanStories = 'Liên kết câu chuyện theo kế hoạch';
|
||||
$lang->execution->importBug = 'Nhập Bug';
|
||||
$lang->execution->updateOrder = "Đánh giá {$lang->executionCommon}";
|
||||
$lang->execution->tree = 'Cây';
|
||||
$lang->execution->treeTask = 'Chỉ hiện nhiệm vụ';
|
||||
$lang->execution->treeStory = 'Chỉ hiện câu chuyện';
|
||||
|
||||
@@ -200,8 +200,6 @@ $lang->execution->batchUnlinkStory = "批量移除{$lang->SRCommon}";
|
||||
$lang->execution->importTask = '转入任务';
|
||||
$lang->execution->importPlanStories = "按计划关联{$lang->SRCommon}";
|
||||
$lang->execution->importBug = '导入Bug';
|
||||
$lang->execution->updateOrder = "{$lang->executionCommon}排序";
|
||||
$lang->execution->execUpdateOrder = "执行排序";
|
||||
$lang->execution->tree = '树状图';
|
||||
$lang->execution->treeTask = '只看任务';
|
||||
$lang->execution->treeStory = "只看{$lang->SRCommon}";
|
||||
|
||||
@@ -179,7 +179,6 @@ $lang->project->batchUnlinkStory = "批量移除{$lang->SRCommon}";
|
||||
$lang->project->importTask = '轉入任務';
|
||||
$lang->project->importPlanStories = "按計劃關聯{$lang->SRCommon}";
|
||||
$lang->project->importBug = '導入Bug';
|
||||
$lang->project->updateOrder = "{$lang->executionCommon}排序";
|
||||
$lang->project->tree = '樹狀圖';
|
||||
$lang->project->treeTask = '只看任務';
|
||||
$lang->project->treeStory = "只看{$lang->SRCommon}";
|
||||
|
||||
@@ -2213,14 +2213,10 @@ class executionModel extends model
|
||||
{
|
||||
if(defined('TUTORIAL')) return $this->loadModel('tutorial')->getTeamMembers();
|
||||
|
||||
$execution = $this->getByID($executionID);
|
||||
$type = $this->config->systemMode == 'new' ? $execution->type : 'execution';
|
||||
if(empty($execution)) return array();
|
||||
|
||||
return $this->dao->select("t1.*, t1.hours * t1.days AS totalHours, t2.id as userID, if(t2.deleted='0', t2.realname, t1.account) as realname")->from(TABLE_TEAM)->alias('t1')
|
||||
->leftJoin(TABLE_USER)->alias('t2')->on('t1.account = t2.account')
|
||||
->where('t1.root')->eq((int)$executionID)
|
||||
->andWhere('t1.type')->eq($type)
|
||||
->andWhere('t1.type')->eq('execution')
|
||||
->andWhere('t2.deleted')->eq('0')
|
||||
->fetchAll('account');
|
||||
}
|
||||
@@ -2239,14 +2235,11 @@ class executionModel extends model
|
||||
if(defined('TUTORIAL')) return $this->loadModel('tutorial')->getTeamMembersPairs();
|
||||
$this->app->loadConfig('user');
|
||||
|
||||
$execution = $this->getByID($executionID);
|
||||
if(empty($execution)) return array();
|
||||
|
||||
$keyField = strpos($params, 'useid') !== false ? 'id' : 'account';
|
||||
$users = $this->dao->select("t2.id, t2.account, t2.realname")->from(TABLE_TEAM)->alias('t1')
|
||||
->leftJoin(TABLE_USER)->alias('t2')->on('t1.account = t2.account')
|
||||
->where('t1.root')->eq((int)$executionID)
|
||||
->andWhere('t1.type')->eq($execution->type)
|
||||
->andWhere('t1.type')->eq('execution')
|
||||
->beginIF($params == 'nodeleted' or empty($this->config->user->showDeleted))
|
||||
->andWhere('t2.deleted')->eq(0)
|
||||
->fi()
|
||||
@@ -2344,7 +2337,7 @@ class executionModel extends model
|
||||
$data = (array)fixer::input('post')->get();
|
||||
|
||||
extract($data);
|
||||
$executionType = $execution->type;
|
||||
$executionType = strpos('sprint|stage', $execution->type) !== false ? 'execution' : $execution->type;
|
||||
$accounts = array_unique($accounts);
|
||||
$limited = array_values($limited);
|
||||
$oldJoin = $this->dao->select('`account`, `join`')->from(TABLE_TEAM)->where('root')->eq((int)$executionID)->andWhere('type')->eq($executionType)->fetchPairs();
|
||||
|
||||
@@ -56,7 +56,6 @@
|
||||
</div>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<?php $canOrder = (common::hasPriv('execution', 'updateOrder') and strpos($orderBy, 'order') !== false)?>
|
||||
<?php $canBatchEdit = common::hasPriv('execution', 'batchEdit'); ?>
|
||||
<form class='main-table' id='executionsForm' method='post' action='<?php echo inLink('batchEdit');?>' data-ride='table'>
|
||||
<table class='table has-sort-head table-fixed' id='executionList'>
|
||||
@@ -80,9 +79,6 @@
|
||||
<th class='w-40px'><?php echo $lang->execution->totalLeft;?></th>
|
||||
<th class='w-60px'><?php echo $lang->execution->progress;?></th>
|
||||
<th class='w-100px'><?php echo $lang->execution->burn;?></th>
|
||||
<?php if($canOrder):?>
|
||||
<th class='w-60px sort-default'><?php common::printOrderLink('order', $orderBy, $vars, $lang->execution->orderAB);?></th>
|
||||
<?php endif;?>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody class='sortable' id='executionTableList'>
|
||||
@@ -100,7 +96,7 @@
|
||||
<td class='text-left <?php if(!empty($execution->children)) echo 'has-child';?>' title='<?php echo $execution->name?>'>
|
||||
<?php
|
||||
if(isset($execution->delay)) echo "<span class='label label-danger label-badge'>{$lang->execution->delayed}</span> ";
|
||||
echo !empty($execution->children) ? $execution->name : html::a($this->createLink('execution', 'view', 'execution=' . $execution->id), $execution->name);
|
||||
echo !empty($execution->children) ? $execution->name : html::a($this->createLink('execution', 'task', 'execution=' . $execution->id), $execution->name);
|
||||
?>
|
||||
<?php if(!empty($execution->children)):?>
|
||||
<a class="plan-toggle" data-id="<?php echo $execution->id;?>"><i class="icon icon-angle-double-right"></i></a>
|
||||
@@ -121,9 +117,6 @@
|
||||
</div>
|
||||
</td>
|
||||
<td id='spark-<?php echo $execution->id?>' class='sparkline text-left no-padding' values='<?php echo join(',', $execution->burns);?>'></td>
|
||||
<?php if($canOrder):?>
|
||||
<td class='sort-handler'><i class="icon icon-move"></i></td>
|
||||
<?php endif;?>
|
||||
</tr>
|
||||
<?php if(!empty($execution->children)):?>
|
||||
<?php $i = 0;?>
|
||||
@@ -144,7 +137,7 @@
|
||||
<?php
|
||||
if(isset($child->delay)) echo "<span class='label label-danger label-badge'>{$lang->execution->delayed}</span> ";
|
||||
echo "<span class='label label-badge label-light' title='{$lang->programplan->children}'>{$lang->programplan->childrenAB}</span>";
|
||||
echo html::a($this->createLink('execution', 'view', 'execution=' . $child->id), $child->name);
|
||||
echo html::a($this->createLink('execution', 'task', 'execution=' . $child->id), $child->name);
|
||||
?>
|
||||
</td>
|
||||
<td><?php echo zget($users, $child->PM);?></td>
|
||||
@@ -162,9 +155,6 @@
|
||||
</div>
|
||||
</td>
|
||||
<td id='spark-<?php echo $child->id?>' class='sparkline text-left no-padding' values='<?php echo join(',', $child->burns);?>'></td>
|
||||
<?php if($canOrder):?>
|
||||
<td class='sort-handler'><i class="icon icon-move"></i></td>
|
||||
<?php endif;?>
|
||||
</tr>
|
||||
<?php $i ++;?>
|
||||
<?php endforeach;?>
|
||||
@@ -178,7 +168,6 @@
|
||||
<div class="checkbox-primary check-all"><label><?php echo $lang->selectAll?></label></div>
|
||||
<div class="table-actions btn-toolbar"><?php echo html::submitButton($lang->execution->batchEdit, '', 'btn');?></div>
|
||||
<?php endif;?>
|
||||
<?php if(!$canOrder and common::hasPriv('execution', 'updateOrder')) echo html::a(inlink('all', "status=$status&projectID=$projectID&from=$from&order=order_desc&productID=$productID&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}"), $from == 'execution' ? $lang->execution->execUpdateOrder : $lang->execution->updateOrder, '', "class='btn'");?>
|
||||
<?php $pager->show('right', 'pagerjs');?>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<?php echo html::a(inlink('testcase', "executionID=$executionID&type=$type&orderBy=$orderBy"), "<span class='text'>{$lang->execution->all}</span>", '', "class='btn btn-link btn-active-text'");?>
|
||||
</div>
|
||||
<div class="btn-toolbar pull-right">
|
||||
<?php if(common::canModify('execution', $execution)) echo html::a(helper::createLink('testcase', 'create', "productID=$productID&branch=0&extra=executionID=$execution->id", '', '', '', true), "<i class='icon icon-plus'></i> " . $lang->testcase->create, '', "class='btn btn-primary'");?>
|
||||
<?php if(common::canModify('execution', $execution)) echo html::a(helper::createLink('testcase', 'create', "productID=$productID&branch=0&moduleID=0&from=execution¶m=$execution->id", '', '', '', true), "<i class='icon icon-plus'></i> " . $lang->testcase->create, '', "class='btn btn-primary'");?>
|
||||
</div>
|
||||
</div>
|
||||
<div id="mainContent">
|
||||
@@ -13,7 +13,7 @@
|
||||
<p>
|
||||
<span class="text-muted"><?php echo $lang->testcase->noCase;?></span>
|
||||
<?php if(common::canModify('execution', $execution) and common::hasPriv('testcase', 'create')):?>
|
||||
<?php echo html::a(helper::createLink('testcase', 'create', "productID=$productID&branch=0&extra=executionID=$execution->id", '', '', '', true), "<i class='icon icon-plus'></i> " . $lang->testcase->create, '', "class='btn btn-info'");?>
|
||||
<?php echo html::a(helper::createLink('testcase', 'create', "productID=$productID&branch=0&moduleID=0&from=execution¶m=$execution->id", '', '', '', true), "<i class='icon icon-plus'></i> " . $lang->testcase->create, '', "class='btn btn-info'");?>
|
||||
<?php endif;?>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
@@ -563,7 +563,7 @@ $lang->resource->execution->unlinkMember = 'unlinkMember';
|
||||
$lang->resource->execution->linkStory = 'linkStory';
|
||||
$lang->resource->execution->unlinkStory = 'unlinkStory';
|
||||
$lang->resource->execution->batchUnlinkStory = 'batchUnlinkStory';
|
||||
$lang->resource->execution->updateOrder = 'updateOrder';
|
||||
//$lang->resource->execution->updateOrder = 'updateOrder';
|
||||
$lang->resource->execution->kanban = 'kanbanAction';
|
||||
$lang->resource->execution->printKanban = 'printKanbanAction';
|
||||
$lang->resource->execution->tree = 'treeAction';
|
||||
|
||||
@@ -8,12 +8,8 @@ $lang->index->app->open = 'Open';
|
||||
$lang->index->app->reload = 'Reload';
|
||||
$lang->index->app->close = 'Close';
|
||||
|
||||
$lang->index->upgradeVersion = 'New version of Zen Tao';
|
||||
$lang->index->currentVersion = 'Current Version';
|
||||
$lang->index->versionName = 'Version Name';
|
||||
$lang->index->releaseDate = 'Release Date';
|
||||
$lang->index->explain = 'Release Notes';
|
||||
$lang->index->actions = 'Operating';
|
||||
$lang->index->upgradeVersion = 'Upgradable version';
|
||||
$lang->index->upgradeNow = 'Upgrade now';
|
||||
$lang->index->upgrade = 'Upgrade';
|
||||
$lang->index->log = 'Log';
|
||||
$lang->index->detailed = 'Details';
|
||||
|
||||
@@ -8,12 +8,8 @@ $lang->index->app->open = 'Open';
|
||||
$lang->index->app->reload = 'Reload';
|
||||
$lang->index->app->close = 'Close';
|
||||
|
||||
$lang->index->upgradeVersion = 'New version of Zen Tao';
|
||||
$lang->index->currentVersion = 'Current Version';
|
||||
$lang->index->versionName = 'Version Name';
|
||||
$lang->index->releaseDate = 'Release Date';
|
||||
$lang->index->explain = 'Release Notes';
|
||||
$lang->index->actions = 'Operating';
|
||||
$lang->index->upgradeVersion = 'Upgradable version';
|
||||
$lang->index->upgradeNow = 'Upgrade now';
|
||||
$lang->index->upgrade = 'Upgrade';
|
||||
$lang->index->log = 'Log';
|
||||
$lang->index->detailed = 'Details';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
$lang->index->common = 'Accueil';
|
||||
$lang->index->index = 'Accueil';
|
||||
$lang->index->common = 'Home';
|
||||
$lang->index->index = 'Home';
|
||||
$lang->index->search = 'Please input';
|
||||
|
||||
$lang->index->app = new stdClass();
|
||||
@@ -8,12 +8,8 @@ $lang->index->app->open = 'Open';
|
||||
$lang->index->app->reload = 'Reload';
|
||||
$lang->index->app->close = 'Close';
|
||||
|
||||
$lang->index->upgradeVersion = 'New version of Zen Tao';
|
||||
$lang->index->currentVersion = 'Current Version';
|
||||
$lang->index->versionName = 'Version Name';
|
||||
$lang->index->releaseDate = 'Release Date';
|
||||
$lang->index->explain = 'Release Notes';
|
||||
$lang->index->actions = 'Operating';
|
||||
$lang->index->upgradeVersion = 'Upgradable version';
|
||||
$lang->index->upgradeNow = 'Upgrade now';
|
||||
$lang->index->upgrade = 'Upgrade';
|
||||
$lang->index->log = 'Log';
|
||||
$lang->index->detailed = 'Details';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
$lang->index->common = 'Trang chủ';
|
||||
$lang->index->index = 'Trang chủ';
|
||||
$lang->index->common = 'Home';
|
||||
$lang->index->index = 'Home';
|
||||
$lang->index->search = 'Please input';
|
||||
|
||||
$lang->index->app = new stdClass();
|
||||
@@ -8,12 +8,8 @@ $lang->index->app->open = 'Open';
|
||||
$lang->index->app->reload = 'Reload';
|
||||
$lang->index->app->close = 'Close';
|
||||
|
||||
$lang->index->upgradeVersion = 'New version of Zen Tao';
|
||||
$lang->index->currentVersion = 'Current Version';
|
||||
$lang->index->versionName = 'Version Name';
|
||||
$lang->index->releaseDate = 'Release Date';
|
||||
$lang->index->explain = 'Release Notes';
|
||||
$lang->index->actions = 'Operating';
|
||||
$lang->index->upgradeVersion = 'Upgradable version';
|
||||
$lang->index->upgradeNow = 'Upgrade now';
|
||||
$lang->index->upgrade = 'Upgrade';
|
||||
$lang->index->log = 'Log';
|
||||
$lang->index->detailed = 'Details';
|
||||
|
||||
@@ -9,7 +9,8 @@ $lang->index->app->reload = '刷新';
|
||||
$lang->index->app->close = '关闭';
|
||||
|
||||
$lang->index->upgradeVersion = '可升级版本';
|
||||
$lang->index->upgrade = '现在升级';
|
||||
$lang->index->upgradeNow = '现在升级';
|
||||
$lang->index->upgrade = '升级';
|
||||
$lang->index->log = '查看版本更新日志 >';
|
||||
$lang->index->detailed = '详情';
|
||||
$lang->index->website = '请访问官网';
|
||||
|
||||
@@ -8,13 +8,9 @@ $lang->index->app->open = '打開';
|
||||
$lang->index->app->reload = '刷新';
|
||||
$lang->index->app->close = '關閉';
|
||||
|
||||
$lang->index->upgradeVersion = '禪道新版本';
|
||||
$lang->index->currentVersion = '當前版本';
|
||||
$lang->index->versionName = '版本名稱';
|
||||
$lang->index->releaseDate = '發佈日期';
|
||||
$lang->index->explain = '更新說明';
|
||||
$lang->index->actions = '操作';
|
||||
$lang->index->upgradeVersion = '可升級版本';
|
||||
$lang->index->upgradeNow = '現在升級';
|
||||
$lang->index->upgrade = '升級';
|
||||
$lang->index->log = '日誌';
|
||||
$lang->index->log = '查看版本更新日誌 >';
|
||||
$lang->index->detailed = '詳情';
|
||||
$lang->index->website = '請訪問官網';
|
||||
|
||||
@@ -96,7 +96,8 @@ js::set('defaultOpen', $open);
|
||||
</div>
|
||||
<?php else:?>
|
||||
<div class='version-content'>
|
||||
<?php foreach($latestVersionList as $version):?>
|
||||
<?php $lastVersion = end($latestVersionList);?>
|
||||
<?php foreach($latestVersionList as $versionNumber => $version):?>
|
||||
<div class="version-list">
|
||||
<div>
|
||||
<i class='version-upgrade icon-version'></i>
|
||||
@@ -104,11 +105,13 @@ js::set('defaultOpen', $open);
|
||||
</div>
|
||||
<div class="version-detail"><?php echo $version->explain;?></div>
|
||||
<div class="version-footer">
|
||||
<a href="<?php echo inLink('changeLog', 'version=' . $version->name);?>" class="btn btn-link iframe" data-width="800"><?php echo $lang->index->log;?></strong></a>
|
||||
<a href='<?php echo $version->link?>' class='btn btn-primary upgrade-now' style='color: white;' target='_blank'><?php echo $lang->index->upgrade;?></a>
|
||||
<a href="<?php echo inLink('changeLog', 'version=' . $versionNumber);?>" class="btn btn-link iframe" data-width="800"><?php echo $lang->index->log;?></strong></a>
|
||||
<a href='<?php echo $version->link?>' class='btn btn-primary upgrade-now' style='color: white;' target='_blank'><?php echo $lang->index->upgradeNow;?></a>
|
||||
</div>
|
||||
</div>
|
||||
<?php if($version->name != $lastVersion->name):?>
|
||||
<hr class='version-hr'>
|
||||
<?php endif;?>
|
||||
<?php endforeach;?>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
|
||||
@@ -35,10 +35,11 @@
|
||||
<?php else:?>
|
||||
<form id='myBugForm' class="main-table table-bug" data-ride="table" method="post" action='<?php echo $this->createLink('bug', 'batchEdit', "productID=0");?>'>
|
||||
<?php
|
||||
$canBatchEdit = (common::hasPriv('bug', 'batchEdit') and $type == 'assignedTo');
|
||||
$canBatchConfirm = common::hasPriv('bug', 'batchConfirm');
|
||||
$canBatchClose = (common::hasPriv('bug', 'batchClose') and strtolower($type) != 'closedby');
|
||||
$canBatchAssignTo = common::hasPriv('bug', 'batchAssignTo');
|
||||
$canBatchAction = ($canBatchConfirm or $canBatchClose or $canBatchAssignTo);
|
||||
$canBatchAction = ($canBatchEdit or $canBatchConfirm or $canBatchClose or $canBatchAssignTo);
|
||||
?>
|
||||
<table class="table has-sort-head table-fixed" id='bugList'>
|
||||
<?php $vars = "mode=$mode&type=$type&orderBy=%s&recTotal=$recTotal&recPerPage=$recPerPage&pageID=$pageID"; ?>
|
||||
@@ -138,6 +139,12 @@
|
||||
<?php endif;?>
|
||||
<div class="table-actions btn-toolbar">
|
||||
<?php
|
||||
if($canBatchEdit)
|
||||
{
|
||||
$actionLink = $this->createLink('bug', 'batchEdit');
|
||||
$misc = "data-form-action='$actionLink'";
|
||||
echo html::commonButton($lang->edit, $misc);
|
||||
}
|
||||
if($canBatchConfirm)
|
||||
{
|
||||
$actionLink = $this->createLink('bug', 'batchConfirm', '', '', '', $bug->project);
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
</div>
|
||||
<?php else:?>
|
||||
<form id='myTaskForm' class="main-table table-task" method="post">
|
||||
<?php $canBatchEdit = common::hasPriv('task', 'batchEdit');?>
|
||||
<?php $canBatchEdit = (common::hasPriv('task', 'batchEdit') and $type == 'assignedTo');?>
|
||||
<?php $canBatchClose = (common::hasPriv('task', 'batchClose') and $type != 'closedBy');?>
|
||||
<table class="table has-sort-head table-fixed" id='taskTable'>
|
||||
<?php $vars = "mode=$mode&type=$type&orderBy=%s&recTotal=$recTotal&recPerPage=$recPerPage&pageID=$pageID"; ?>
|
||||
@@ -199,11 +199,18 @@
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="table-footer">
|
||||
<?php if($canBatchClose):?>
|
||||
<?php if($canBatchClose or $canBatchEdit):?>
|
||||
<div class="checkbox-primary check-all"><label><?php echo $lang->selectAll?></label></div>
|
||||
<?php endif;?>
|
||||
<div class="table-actions btn-toolbar">
|
||||
<?php
|
||||
if($canBatchEdit)
|
||||
{
|
||||
$actionLink = $this->createLink('task', 'batchEdit');
|
||||
$misc = "data-form-action='$actionLink'";
|
||||
echo html::commonButton($lang->edit, $misc);
|
||||
}
|
||||
|
||||
if($canBatchClose)
|
||||
{
|
||||
$actionLink = $this->createLink('task', 'batchClose', null, '', '', $task->project);
|
||||
|
||||
@@ -224,9 +224,8 @@ class personnel extends control
|
||||
public function setProgramMenu($programID = 0)
|
||||
{
|
||||
$this->loadModel('program');
|
||||
$this->lang->navGroup->program = 'program';
|
||||
$this->lang->program->switcherMenu = $this->program->getSwitcher($programID, true);
|
||||
$this->lang->program->mainMenuAction = $this->program->getMainAction();
|
||||
$this->program->setViewMenu($programID);
|
||||
commonModel::setAppObjectID('program', $programID);
|
||||
}
|
||||
}
|
||||
|
||||
+14
-38
@@ -49,8 +49,7 @@ class product extends control
|
||||
*/
|
||||
public function index($locate = 'auto', $productID = 0, $status = 'noclosed', $orderBy = 'order_desc', $recTotal = 0, $recPerPage = 10, $pageID = 1)
|
||||
{
|
||||
$this->lang->product->switcherMenu = $this->product->getSwitcher();
|
||||
$this->lang->product->mainMenuAction = $this->product->getProductMainAction();
|
||||
$this->lang->product->switcherMenu = $this->product->getSwitcher();
|
||||
|
||||
if($locate == 'yes') $this->locate($this->createLink($this->moduleName, 'browse'));
|
||||
|
||||
@@ -79,8 +78,7 @@ class product extends control
|
||||
public function project($status = 'all', $productID = 0, $branch = 0, $involved = 0)
|
||||
{
|
||||
$this->product->setMenu($this->products, $productID, $branch);
|
||||
$this->lang->product->switcherMenu = $this->product->getSwitcher($productID);
|
||||
$this->lang->product->mainMenuAction = $this->product->getProductMainAction();
|
||||
$this->lang->product->switcherMenu = $this->product->getSwitcher($productID);
|
||||
|
||||
$this->app->loadLang('my');
|
||||
$this->app->loadLang('execution');
|
||||
@@ -162,9 +160,7 @@ class product extends control
|
||||
$this->session->set('storyList', $this->app->getURI(true));
|
||||
$this->session->set('productList', $this->app->getURI(true));
|
||||
|
||||
$this->lang->product->menu = $this->lang->product->viewMenu;
|
||||
$this->lang->product->switcherMenu = $this->product->getSwitcher($productID, "storyType=$storyType", $branch);
|
||||
$this->lang->product->mainMenuAction = $this->product->getProductMainAction();
|
||||
$this->lang->product->switcherMenu = $this->product->getSwitcher($productID, "storyType=$storyType", $branch);
|
||||
$this->product->setMenu($this->products, $productID, $branch);
|
||||
}
|
||||
|
||||
@@ -309,8 +305,7 @@ class product extends control
|
||||
*/
|
||||
public function create($programID = 0)
|
||||
{
|
||||
$this->lang->product->switcherMenu = $this->product->getSwitcher();
|
||||
$this->lang->product->mainMenuAction = $this->product->getProductMainAction();
|
||||
$this->lang->product->switcherMenu = $this->product->getSwitcher();
|
||||
|
||||
if(!empty($_POST))
|
||||
{
|
||||
@@ -329,12 +324,8 @@ class product extends control
|
||||
|
||||
if($programID)
|
||||
{
|
||||
$this->app->rawModule = 'program';
|
||||
$this->app->rawMethod = 'product';
|
||||
$this->lang->navGroup->program = 'program';
|
||||
$this->loadModel('program')->setViewMenu($programID);
|
||||
$this->lang->program->switcherMenu = $this->program->getSwitcher($programID, true);
|
||||
$this->lang->program->mainMenuAction = $this->program->getMainAction();
|
||||
$this->lang->program->switcherMenu = $this->program->getSwitcher($programID, true);
|
||||
}
|
||||
|
||||
$this->loadModel('user');
|
||||
@@ -376,9 +367,7 @@ class product extends control
|
||||
{
|
||||
/* Set menu. */
|
||||
$this->app->loadLang('custom');
|
||||
$this->lang->product->menu = $this->lang->product->viewMenu;
|
||||
$this->lang->product->switcherMenu = $this->product->getSwitcher($productID);
|
||||
$this->lang->product->mainMenuAction = $this->product->getProductMainAction();
|
||||
$this->lang->product->switcherMenu = $this->product->getSwitcher($productID);
|
||||
|
||||
/* Init vars. */
|
||||
$product = $this->product->getById($productID);
|
||||
@@ -477,8 +466,7 @@ class product extends control
|
||||
$this->app->rawMethod = 'product';
|
||||
$this->lang->navGroup->program = 'program';
|
||||
$this->loadModel('program')->setViewMenu($programID);
|
||||
$this->lang->program->switcherMenu = $this->program->getSwitcher($programID, true);
|
||||
$this->lang->program->mainMenuAction = $this->program->getMainAction();
|
||||
$this->lang->program->switcherMenu = $this->program->getSwitcher($programID, true);
|
||||
}
|
||||
|
||||
/* Get the relevant person in charge. */
|
||||
@@ -569,8 +557,7 @@ class product extends control
|
||||
$this->app->rawMethod = 'product';
|
||||
$this->lang->navGroup->program = 'program';
|
||||
$this->loadModel('program')->setViewMenu($programID);
|
||||
$this->lang->program->switcherMenu = $this->program->getSwitcher($programID, true);
|
||||
$this->lang->program->mainMenuAction = $this->program->getMainAction();
|
||||
$this->lang->program->switcherMenu = $this->program->getSwitcher($programID, true);
|
||||
|
||||
$this->loadModel('user');
|
||||
$poUsers = $this->user->getPairs('nodeleted|pofirst', $appendPoUsers);
|
||||
@@ -647,9 +634,7 @@ class product extends control
|
||||
|
||||
$moduleIndex = array_search('product', $this->lang->noMenuModule);
|
||||
if($moduleIndex !== false) unset($this->lang->noMenuModule[$moduleIndex]);
|
||||
$this->lang->product->menu = $this->lang->product->viewMenu;
|
||||
$this->lang->product->switcherMenu = $this->product->getSwitcher($productID);
|
||||
$this->lang->product->mainMenuAction = $this->product->getProductMainAction();
|
||||
$this->lang->product->switcherMenu = $this->product->getSwitcher($productID);
|
||||
|
||||
$product->desc = $this->loadModel('file')->setImgSize($product->desc);
|
||||
$this->product->setMenu($this->products, $productID);
|
||||
@@ -706,9 +691,7 @@ class product extends control
|
||||
*/
|
||||
public function roadmap($productID, $branch = 0)
|
||||
{
|
||||
$this->lang->product->menu = $this->lang->product->viewMenu;
|
||||
$this->lang->product->switcherMenu = $this->product->getSwitcher($productID, '', $branch);
|
||||
$this->lang->product->mainMenuAction = $this->product->getProductMainAction();
|
||||
$this->lang->product->switcherMenu = $this->product->getSwitcher($productID, '', $branch);
|
||||
$this->product->setMenu($this->products, $productID, $branch);
|
||||
|
||||
$this->session->set('releaseList', $this->app->getURI(true));
|
||||
@@ -780,8 +763,7 @@ class product extends control
|
||||
$this->view->position[] = html::a($this->createLink($this->moduleName, 'browse'), $this->products[$productID]);
|
||||
$this->view->position[] = $this->lang->product->dynamic;
|
||||
|
||||
$this->lang->product->switcherMenu = $this->product->getSwitcher($productID, $type);
|
||||
$this->lang->product->mainMenuAction = $this->product->getProductMainAction();
|
||||
$this->lang->product->switcherMenu = $this->product->getSwitcher($productID, $type);
|
||||
|
||||
$this->view->userIdPairs = $this->loadModel('user')->getPairs('noletter|nodeleted|noclosed|useid');
|
||||
$this->view->accountPairs = $this->user->getPairs('noletter|nodeleted|noclosed');
|
||||
@@ -812,9 +794,7 @@ class product extends control
|
||||
$product = $this->product->getStatByID($productID);
|
||||
if(!$product) die(js::locate('product', 'all'));
|
||||
|
||||
$this->lang->product->menu = $this->lang->product->viewMenu;
|
||||
$this->lang->product->switcherMenu = $this->product->getSwitcher($productID);
|
||||
$this->lang->product->mainMenuAction = $this->product->getProductMainAction();
|
||||
$this->lang->product->switcherMenu = $this->product->getSwitcher($productID);
|
||||
|
||||
$product->desc = $this->loadModel('file')->setImgSize($product->desc);
|
||||
$this->product->setMenu($this->products, $productID);
|
||||
@@ -1115,9 +1095,7 @@ class product extends control
|
||||
*/
|
||||
public function whitelist($productID = 0, $module = 'product', $objectType = 'product', $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
|
||||
{
|
||||
$this->lang->product->menu = $this->lang->product->viewMenu;
|
||||
$this->lang->product->switcherMenu = $this->product->getSwitcher($productID, '', 0);
|
||||
$this->lang->product->mainMenuAction = $this->product->getProductMainAction();
|
||||
$this->lang->product->switcherMenu = $this->product->getSwitcher($productID, '', 0);
|
||||
$this->product->setMenu($this->products, $productID, 0);
|
||||
$this->lang->modulePageNav = '';
|
||||
|
||||
@@ -1135,9 +1113,7 @@ class product extends control
|
||||
*/
|
||||
public function addWhitelist($productID = 0, $deptID = 0, $branch = '')
|
||||
{
|
||||
$this->lang->product->menu = $this->lang->product->viewMenu;
|
||||
$this->lang->product->switcherMenu = $this->product->getSwitcher($productID, '', $branch);
|
||||
$this->lang->product->mainMenuAction = $this->product->getProductMainAction();
|
||||
$this->lang->product->switcherMenu = $this->product->getSwitcher($productID, '', $branch);
|
||||
$this->product->setMenu($this->products, $productID, $branch);
|
||||
$moduleIndex = array_search('product', $this->lang->noMenuModule);
|
||||
if($moduleIndex !== false) unset($this->lang->noMenuModule[$moduleIndex]);
|
||||
|
||||
@@ -29,7 +29,6 @@ class productModel extends model
|
||||
*/
|
||||
public function setMenu($products, $productID, $branch = 0, $module = 0, $moduleType = '', $extra = '')
|
||||
{
|
||||
$this->lang->product->menu = $this->lang->product->viewMenu;
|
||||
$product = $this->getByID($productID);
|
||||
if($product)
|
||||
{
|
||||
@@ -472,7 +471,8 @@ class productModel extends model
|
||||
$fromModule = $this->lang->navGroup->qa == 'qa' ? 'qa' : '';
|
||||
$dropMenuLink = helper::createLink('product', 'ajaxGetDropMenu', "objectID=$productID&module=$currentModule&method=$currentMethod&extra=$extra&from=$fromModule");
|
||||
|
||||
$output = "<div class='btn-group header-angle-btn' id='swapper'><button data-toggle='dropdown' type='button' class='btn' id='currentItem' title='{$currentProductName}'><span class='text'><i class='icon icon-product'></i> {$currentProductName}</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'>" . html::a(helper::createLink('product', 'all'), "<i class='icon icon-product'></i> {$this->lang->productCommon}", '', "class='btn btn-link'") . '</div>';
|
||||
$output .= "<div class='btn-group header-angle-btn' id='swapper'><button data-toggle='dropdown' type='button' class='btn' id='currentItem' title='{$currentProductName}'><i class='icon icon-chevron-right'></i><span class='text'>{$currentProductName}</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="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>";
|
||||
|
||||
@@ -491,19 +491,6 @@ class productModel extends model
|
||||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get product main action.
|
||||
*
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function getProductMainAction()
|
||||
{
|
||||
$link = html::a(helper::createLink('product', 'all'), "<i class='icon icon-list'></i>", '', "style='border: none;'");
|
||||
$html = "<p style='padding-top:5px;'>" . $link . "</p>";
|
||||
return common::hasPriv('product', 'all') ? $html : '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a product.
|
||||
*
|
||||
|
||||
@@ -23,8 +23,7 @@ class productplan extends control
|
||||
public function commonAction($productID, $branch = 0)
|
||||
{
|
||||
$this->lang->product->menu = $this->lang->product->viewMenu;
|
||||
$this->lang->product->switcherMenu = $this->loadModel('product')->getSwitcher($productID, '', $branch);
|
||||
$this->lang->product->mainMenuAction = $this->product->getProductMainAction();
|
||||
$this->lang->product->switcherMenu = $this->loadModel('product')->getSwitcher($productID, '', $branch);
|
||||
|
||||
$this->loadModel('product');
|
||||
$this->app->loadConfig('execution');
|
||||
|
||||
@@ -101,9 +101,7 @@ class program extends control
|
||||
$program = $this->program->getByID($programID);
|
||||
if(empty($program) || $program->type != 'program') die(js::error($this->lang->notFound) . js::locate('back'));
|
||||
|
||||
$this->lang->program->switcherMenu = $this->program->getSwitcher($programID, true);
|
||||
$this->lang->program->mainMenuAction = $this->program->getMainAction();
|
||||
$this->program->setViewMenu($programID);
|
||||
$this->lang->program->switcherMenu = $this->program->getSwitcher($programID, true);
|
||||
|
||||
/* Load pager and get tasks. */
|
||||
$this->app->loadClass('pager', $static = true);
|
||||
@@ -396,9 +394,7 @@ class program extends control
|
||||
$this->app->session->set('programProject', $this->app->getURI(true));
|
||||
$this->app->session->set('projectList', $this->app->getURI(true));
|
||||
|
||||
$this->lang->program->switcherMenu = $this->program->getSwitcher($programID, true);
|
||||
$this->lang->program->mainMenuAction = $this->program->getMainAction();
|
||||
$this->program->setViewMenu($programID);
|
||||
$this->lang->program->switcherMenu = $this->program->getSwitcher($programID, true);
|
||||
|
||||
$this->loadModel('datatable');
|
||||
|
||||
@@ -438,9 +434,7 @@ class program extends control
|
||||
*/
|
||||
public function stakeholder($programID = 0, $orderBy = 't1.id_desc', $recTotal = 0, $recPerPage = 15, $pageID = 1)
|
||||
{
|
||||
$this->lang->program->switcherMenu = $this->program->getSwitcher($programID, true);
|
||||
$this->lang->program->mainMenuAction = $this->program->getMainAction();
|
||||
$this->program->setViewMenu($programID);
|
||||
$this->lang->program->switcherMenu = $this->program->getSwitcher($programID, true);
|
||||
|
||||
/* Load pager and get tasks. */
|
||||
$this->app->loadClass('pager', $static = true);
|
||||
@@ -475,9 +469,7 @@ class program extends control
|
||||
}
|
||||
|
||||
$this->loadModel('user');
|
||||
$this->lang->program->switcherMenu = $this->program->getSwitcher($programID, true);
|
||||
$this->lang->program->mainMenuAction = $this->program->getMainAction();
|
||||
$this->program->setViewMenu($programID);
|
||||
$this->lang->program->switcherMenu = $this->program->getSwitcher($programID, true);
|
||||
|
||||
$this->loadModel('dept');
|
||||
$deptUsers = $dept === '' ? array() : $this->dept->getDeptUserPairs($dept);
|
||||
|
||||
@@ -23,19 +23,6 @@ class programModel extends model
|
||||
return $this->session->program;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get program main menu action.
|
||||
*
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function getMainAction()
|
||||
{
|
||||
$link = html::a(helper::createLink('program', 'browse'), "<i class='icon icon-list'></i>", '', "style='border: none;'");
|
||||
$html = "<p style='padding-top:5px;'>" . $link . "</p>";
|
||||
return common::hasPriv('program', 'browse') ? $html : '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get program pairs.
|
||||
*
|
||||
@@ -212,29 +199,6 @@ class programModel extends model
|
||||
->fetchAll();
|
||||
}
|
||||
|
||||
/**
|
||||
* Set view menu.
|
||||
*
|
||||
* @param int $programID
|
||||
* @access private
|
||||
* @return void
|
||||
*/
|
||||
public function setViewMenu($programID = 0)
|
||||
{
|
||||
foreach($this->lang->program->viewMenu as $label => $menu)
|
||||
{
|
||||
$this->lang->program->viewMenu->{$label}['link'] = is_array($menu) ? sprintf($menu['link'], $programID) : sprintf($menu, $programID);
|
||||
}
|
||||
|
||||
foreach($this->lang->personnel->menu as $label => $menu)
|
||||
{
|
||||
$menu['link'] = is_array($menu) ? sprintf($menu['link'], $programID) : sprintf($menu, $programID);
|
||||
$this->lang->personnel->menu->$label = $menu;
|
||||
}
|
||||
|
||||
$this->lang->program->menu = $this->lang->program->viewMenu;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a program.
|
||||
*
|
||||
@@ -429,7 +393,8 @@ class programModel extends model
|
||||
}
|
||||
|
||||
$dropMenuLink = helper::createLink('program', 'ajaxGetDropMenu', "objectID=$programID&module=$currentModule&method=$currentMethod");
|
||||
$output = "<div class='btn-group header-angle-btn' id='swapper'><button data-toggle='dropdown' type='button' class='btn' id='currentItem' title='{$currentProgramName}'><span class='text'><i class='icon icon-program'></i> {$currentProgramName}</span> <span class='caret'></span></button><div id='dropMenu' class='dropdown-menu search-list' data-ride='searchList' data-url='$dropMenuLink'>";
|
||||
$output = "<div class='btn-group'>" . html::a(helper::createLink('program', 'browse'), "<i class='icon icon-program'></i> {$this->lang->program->common}", '', "class='btn btn-link'") . '</div>';
|
||||
$output .= "<div class='btn-group header-angle-btn' id='swapper'><button data-toggle='dropdown' type='button' class='btn' id='currentItem' title='{$currentProgramName}'><i class='icon icon-chevron-right'></i><span class='text'>{$currentProgramName}</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>";
|
||||
|
||||
return $output;
|
||||
|
||||
@@ -121,8 +121,8 @@
|
||||
#programTableList > tr.drop-not-allowed {opacity: 0.1!important}
|
||||
#programList .c-actions {overflow: visible;}
|
||||
#programTableList > tr:last-child .c-actions .dropdown-menu {top: auto; bottom: 100%; margin-bottom: -5px;}
|
||||
#programTableList .icon-project:before, #programTableList .no-nest .icon-program:before, #programTableList .is-nest-child .icon-program:before {content: '\e99c'; width: 22px; height: 22px; background: none; color: #16a8f8; top: 0; line-height: 22px; margin-right: 2px; font-size: 14px}
|
||||
#programTableList .no-nest .icon-program:before, #programTableList .is-nest-child .icon-program:before {content: '\e944'; color: #ffe066; font-size: 16px;}
|
||||
#programTableList .icon-project:before {content: '\e99c'; width: 22px; height: 22px; background: none; color: #16a8f8; top: 0; line-height: 22px; margin-right: 2px; font-size: 14px}
|
||||
#programTableList .no-nest .icon-program:before, #programTableList .is-nest-child .icon-program:before {width: 10px; min-width: 10px; height: 10px; top: 1px}
|
||||
</style>
|
||||
<?php js::set('originOrders', $originOrders);?>
|
||||
<script>
|
||||
|
||||
@@ -1158,7 +1158,6 @@ class project extends control
|
||||
$this->app->rawMethod = 'programproject';
|
||||
$this->lang->navGroup->project = 'project';
|
||||
$this->lang->project->switcherMenu = $this->loadModel('program')->getSwitcher($programID, true);
|
||||
$this->program->setViewMenu($programID);
|
||||
}
|
||||
|
||||
echo $this->fetch('personnel', 'whitelist', "objectID=$projectID&module=$module&browseType=$objectType&orderBy=$orderBy&recTotal=$recTotal&recPerPage=$recPerPage&pageID=$pageID&projectID=$projectID&from=$from");
|
||||
|
||||
@@ -152,7 +152,8 @@ class projectModel extends model
|
||||
}
|
||||
|
||||
$dropMenuLink = helper::createLink('project', 'ajaxGetDropMenu', "objectID=$projectID&module=$currentModule&method=$currentMethod");
|
||||
$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-project'></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='btn-group'>" . html::a(helper::createLink('project', 'browse'), "<i class='icon icon-project'></i> {$this->lang->project->common}", '', "class='btn btn-link'") . '</div>';
|
||||
$output .= "<div class='btn-group header-angle-btn' id='swapper'><button data-toggle='dropdown' type='button' class='btn' id='currentItem' title='{$currentProjectName}'><i class='icon icon-chevron-right'></i><span class='text'>{$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>";
|
||||
|
||||
|
||||
@@ -22,8 +22,7 @@ class release extends control
|
||||
public function commonAction($productID, $branch = 0)
|
||||
{
|
||||
$this->lang->product->menu = $this->lang->product->viewMenu;
|
||||
$this->lang->product->switcherMenu = $this->loadModel('product')->getSwitcher($productID, '', $branch);
|
||||
$this->lang->product->mainMenuAction = $this->product->getProductMainAction();
|
||||
$this->lang->product->switcherMenu = $this->loadModel('product')->getSwitcher($productID, '', $branch);
|
||||
|
||||
$this->loadModel('product');
|
||||
$product = $this->product->getById($productID);
|
||||
|
||||
@@ -72,7 +72,6 @@ class stakeholder extends control
|
||||
$this->app->rawMethod = 'stakeholder';
|
||||
$this->lang->navGroup->program = 'program';
|
||||
$this->lang->program->switcherMenu = $this->program->getSwitcher($programID, true);
|
||||
$this->program->setViewMenu($programID);
|
||||
|
||||
$this->view->members = $this->loadModel('project')->getTeamMemberPairs($programID);
|
||||
}
|
||||
|
||||
@@ -50,8 +50,7 @@ class story extends control
|
||||
{
|
||||
$this->story->replaceURLang($type);
|
||||
$this->lang->product->menu = $this->lang->product->viewMenu;
|
||||
$this->lang->product->switcherMenu = $this->product->getSwitcher($productID);
|
||||
$this->lang->product->mainMenuAction = $this->product->getProductMainAction();
|
||||
$this->lang->product->switcherMenu = $this->product->getSwitcher($productID);
|
||||
|
||||
if($executionID)
|
||||
{
|
||||
@@ -338,8 +337,7 @@ class story extends control
|
||||
public function batchCreate($productID = 0, $branch = 0, $moduleID = 0, $storyID = 0, $executionID = 0, $plan = 0, $type = 'story')
|
||||
{
|
||||
$this->lang->product->menu = $this->lang->product->viewMenu;
|
||||
$this->lang->product->switcherMenu = $this->product->getSwitcher($productID);
|
||||
$this->lang->product->mainMenuAction = $this->product->getProductMainAction();
|
||||
$this->lang->product->switcherMenu = $this->product->getSwitcher($productID);
|
||||
|
||||
if($executionID)
|
||||
{
|
||||
@@ -521,8 +519,7 @@ class story extends control
|
||||
|
||||
/* Set menu. */
|
||||
$this->lang->product->menu = $this->lang->product->viewMenu;
|
||||
$this->lang->product->switcherMenu = $this->product->getSwitcher($product->id);
|
||||
$this->lang->product->mainMenuAction = $this->product->getProductMainAction();
|
||||
$this->lang->product->switcherMenu = $this->product->getSwitcher($product->id);
|
||||
$this->product->setMenu($products, $product->id, $story->branch);
|
||||
|
||||
$this->story->replaceURLang($story->type);
|
||||
@@ -601,8 +598,7 @@ class story extends control
|
||||
public function batchEdit($productID = 0, $executionID = 0, $branch = 0, $storyType = 'story')
|
||||
{
|
||||
$this->lang->product->menu = $this->lang->product->viewMenu;
|
||||
$this->lang->product->switcherMenu = $this->product->getSwitcher($productID);
|
||||
$this->lang->product->mainMenuAction = $this->product->getProductMainAction();
|
||||
$this->lang->product->switcherMenu = $this->product->getSwitcher($productID);
|
||||
$this->story->replaceURLang($storyType);
|
||||
|
||||
/* Load model. */
|
||||
@@ -865,10 +861,8 @@ class story extends control
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->lang->product->menu = $this->lang->product->viewMenu;
|
||||
$this->product->setMenu($this->product->getPairs(), $product->id, $story->branch);
|
||||
$this->lang->product->switcherMenu = $this->product->getSwitcher($product->id);
|
||||
$this->lang->product->mainMenuAction = $this->product->getProductMainAction();
|
||||
$this->lang->product->switcherMenu = $this->product->getSwitcher($product->id);
|
||||
|
||||
if($this->app->rawModule == 'projectstory')
|
||||
{
|
||||
@@ -952,9 +946,8 @@ class story extends control
|
||||
public function review($storyID, $from = 'product')
|
||||
{
|
||||
$this->product;
|
||||
$this->lang->product->menu = $this->lang->product->viewMenu;
|
||||
$this->lang->product->switcherMenu = $this->product->getSwitcher($this->session->product);
|
||||
$this->lang->product->mainMenuAction = $this->product->getProductMainAction();
|
||||
$this->lang->product->menu = $this->lang->product->viewMenu;
|
||||
$this->lang->product->switcherMenu = $this->product->getSwitcher($this->session->product);
|
||||
|
||||
if(!empty($_POST))
|
||||
{
|
||||
@@ -1393,11 +1386,9 @@ class story extends control
|
||||
/* Set menu. The projectstory module does not execute. */
|
||||
if($this->app->rawModule == 'story')
|
||||
{
|
||||
$this->lang->product->menu = $this->lang->product->viewMenu;
|
||||
$products = $this->product->getPairs();
|
||||
$productID = $this->product->saveState($productID, $products);
|
||||
$this->lang->product->switcherMenu = $this->product->getSwitcher($productID, '', $branch);
|
||||
$this->lang->product->mainMenuAction = $this->product->getProductMainAction();
|
||||
$this->lang->product->switcherMenu = $this->product->getSwitcher($productID, '', $branch);
|
||||
$this->product->setMenu($products, $productID, $branch);
|
||||
}
|
||||
|
||||
@@ -1788,8 +1779,7 @@ class story extends control
|
||||
|
||||
$this->story->replaceURLang($storyType);
|
||||
$this->products = $this->product->getPairs();
|
||||
$this->lang->product->switcherMenu = $this->product->getSwitcher($productID, $storyType, $branchID);
|
||||
$this->lang->product->mainMenuAction = $this->product->getProductMainAction();
|
||||
$this->lang->product->switcherMenu = $this->product->getSwitcher($productID, $storyType, $branchID);
|
||||
$this->product->setMenu($this->products, $productID, $branchID);
|
||||
|
||||
$this->view->title = $this->products[$productID] . $this->lang->colon . $this->lang->story->reportChart;
|
||||
|
||||
@@ -460,9 +460,10 @@ class task extends control
|
||||
/* The tasks of my. */
|
||||
else
|
||||
{
|
||||
$this->lang->task->menu = $this->lang->my->menu;
|
||||
$this->lang->set('menugroup.task', 'my');
|
||||
$this->lang->navGroup->task = 'my';
|
||||
$this->lang->task->menu = $this->lang->my->menu;
|
||||
$this->lang->task->menuOrder = $this->lang->my->menuOrder;
|
||||
$this->lang->set('menugroup.task', 'my');
|
||||
$this->loadModel('my')->setMenu();
|
||||
$this->view->position[] = html::a($this->createLink('my', 'task'), $this->lang->my->task);
|
||||
$this->view->title = $this->lang->task->batchEdit;
|
||||
@@ -476,7 +477,7 @@ class task extends control
|
||||
/* Get execution teams. */
|
||||
$executionIDList = array();
|
||||
foreach($tasks as $task) if(!in_array($task->execution, $executionIDList)) $executionIDList[] = $task->execution;
|
||||
$executionTeams = $this->dao->select('*')->from(TABLE_TEAM)->where('root')->in($executionIDList)->andWhere('type')->in('sprint,stage')->fetchGroup('root', 'account');
|
||||
$executionTeams = $this->dao->select('*')->from(TABLE_TEAM)->where('root')->in($executionIDList)->andWhere('type')->eq('execution')->fetchGroup('root', 'account');
|
||||
|
||||
/* Judge whether the editedTasks is too large and set session. */
|
||||
$countInputVars = count($tasks) * (count(explode(',', $this->config->task->custom->batchEditFields)) + 3);
|
||||
|
||||
+26
-27
@@ -1198,6 +1198,9 @@ class testcaseModel extends model
|
||||
$oldCase->steps = $this->joinStep($oldStep);
|
||||
$caseData->steps = $this->joinStep($steps);
|
||||
$changes = common::createChanges($oldCase, $caseData);
|
||||
|
||||
$this->updateCase2Project($oldCase, $caseData, $caseID);
|
||||
|
||||
$actionID = $this->action->create('case', $caseID, 'Edited');
|
||||
$this->action->logHistory($actionID, $changes);
|
||||
}
|
||||
@@ -1235,6 +1238,9 @@ class testcaseModel extends model
|
||||
if($stepData->type == 'step') $parentStepID = 0;
|
||||
}
|
||||
}
|
||||
|
||||
$this->syncCase2Project($caseData, $caseID);
|
||||
|
||||
$this->action->create('case', $caseID, 'Opened');
|
||||
}
|
||||
}
|
||||
@@ -1706,37 +1712,30 @@ class testcaseModel extends model
|
||||
/* The related story is changed. */
|
||||
if($storyChanged)
|
||||
{
|
||||
$projectStory = $this->dao->select('*')->from(TABLE_PROJECTSTORY)
|
||||
->where('project')->eq($oldCase->project)
|
||||
->andWhere('story')->eq($case->story)
|
||||
->fetchAll();
|
||||
/* If the new related story isn't linked the project, unlink the case. */
|
||||
$projects = $this->dao->select('project')->from(TABLE_PROJECTSTORY)->where('story')->eq($oldCase->story)->fetchAll('project');
|
||||
$this->dao->delete()->from(TABLE_PROJECTCASE)
|
||||
->where('project')->in(array_keys($projects))
|
||||
->andWhere('`case`')->eq($oldCase->id)
|
||||
->exec();
|
||||
|
||||
if(!$projectStory)
|
||||
/* If the new related story is not null, make the case link the project which link the new related story. */
|
||||
if(!empty($case->story))
|
||||
{
|
||||
/* If the new related story isn't linked the project, unlink the case. */
|
||||
$this->dao->delete()->from(TABLE_PROJECTCASE)
|
||||
->where('project')->eq($oldCase->project)
|
||||
->andWhere('`case`')->eq($oldCase->id)
|
||||
->exec();
|
||||
|
||||
/* If the new related story is not null, make the case link the project which link the new related story. */
|
||||
if(!empty($case->story))
|
||||
$projects = $this->dao->select('*')->from(TABLE_PROJECTSTORY)->where('story')->eq($case->story)->fetchAll('project');
|
||||
if($projects)
|
||||
{
|
||||
$projects = $this->dao->select('*')->from(TABLE_PROJECTSTORY)->where('story')->eq($case->story)->fetchAll('project');
|
||||
if($projects)
|
||||
$projects = array_keys($projects);
|
||||
foreach($projects as $projectID)
|
||||
{
|
||||
$projects = array_keys($projects);
|
||||
foreach($projects as $projectID)
|
||||
{
|
||||
$lastOrder = (int)$this->dao->select('*')->from(TABLE_PROJECTCASE)->where('project')->eq($projectID)->orderBy('order_desc')->limit(1)->fetch('order');
|
||||
$data = new stdclass();
|
||||
$data->project = $projectID;
|
||||
$data->product = $case->product;
|
||||
$data->case = $caseID;
|
||||
$data->version = $oldCase->version;
|
||||
$data->order = ++ $lastOrder;
|
||||
$this->dao->replace(TABLE_PROJECTCASE)->data($data)->exec();
|
||||
}
|
||||
$lastOrder = (int)$this->dao->select('*')->from(TABLE_PROJECTCASE)->where('project')->eq($projectID)->orderBy('order_desc')->limit(1)->fetch('order');
|
||||
$data = new stdclass();
|
||||
$data->project = $projectID;
|
||||
$data->product = $case->product;
|
||||
$data->case = $caseID;
|
||||
$data->version = $oldCase->version;
|
||||
$data->order = ++ $lastOrder;
|
||||
$this->dao->replace(TABLE_PROJECTCASE)->data($data)->exec();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -330,7 +330,6 @@ class testsuiteModel extends model
|
||||
{
|
||||
$importedCases = $this->dao->select('fromCaseID')->from(TABLE_CASE)
|
||||
->where('product')->eq($productID)
|
||||
->beginIF($this->config->systemMode == 'new' and $this->lang->navGroup->testsuite != 'qa')->andWhere('project')->eq($this->session->PRJ)->fi()
|
||||
->andWhere('lib')->eq($libID)
|
||||
->andWhere('fromCaseID')->ne('')
|
||||
->andWhere('deleted')->eq(0)
|
||||
@@ -364,7 +363,6 @@ class testsuiteModel extends model
|
||||
return $this->dao->select('*')->from(TABLE_CASE)->where('deleted')->eq(0)
|
||||
->beginIF($browseType != 'bysearch')->andWhere('lib')->eq($libID)->fi()
|
||||
->beginIF($browseType == 'bysearch')->andWhere($query)->fi()
|
||||
->beginIF($this->config->systemMode == 'new' and $this->lang->navGroup->testsuite != 'qa')->andWhere('project')->eq($this->session->PRJ)->fi()
|
||||
->andWhere('product')->eq(0)
|
||||
->andWhere('id')->notIN($importedCases)
|
||||
->orderBy($orderBy)
|
||||
|
||||
@@ -143,7 +143,11 @@ class testtaskModel extends model
|
||||
common::setMenuVars($this->lang->testtask->menu, $key, $replace);
|
||||
}
|
||||
|
||||
$this->lang->testtask->menu->testcase['subModule'] = 'testtask';
|
||||
if($this->lang->navGroup->testcase == 'project' && $this->app->rawMethod == 'browseunits')
|
||||
{
|
||||
$lang->projectQa->menu->testcase['subModule'] = 'testtask';
|
||||
}
|
||||
|
||||
if($this->lang->navGroup->testtask == 'qa')
|
||||
{
|
||||
foreach($this->lang->qa->subMenu->testcase as $key => $menu)
|
||||
|
||||
@@ -70,8 +70,7 @@ class tree extends control
|
||||
$moduleIndex = array_search('tree', $this->lang->noMenuModule);
|
||||
if($moduleIndex !== false) unset($this->lang->noMenuModule[$moduleIndex]);
|
||||
$this->lang->product->menu = $this->lang->product->viewMenu;
|
||||
$this->lang->product->switcherMenu = $this->loadModel('product')->getSwitcher($rootID, 'story');
|
||||
$this->lang->product->mainMenuAction = $this->product->getProductMainAction();
|
||||
$this->lang->product->switcherMenu = $this->loadModel('product')->getSwitcher($rootID, 'story');
|
||||
|
||||
$products = $this->product->getPairs();
|
||||
|
||||
@@ -196,8 +195,7 @@ class tree extends control
|
||||
unset($this->lang->product->viewMenu->set['subModule']);
|
||||
$this->lang->navGroup->tree = 'product';
|
||||
$this->lang->product->menu = $this->lang->product->viewMenu;
|
||||
$this->lang->product->switcherMenu = $this->loadModel('product')->getSwitcher($productID, 'story');
|
||||
$this->lang->product->mainMenuAction = $this->product->getProductMainAction();
|
||||
$this->lang->product->switcherMenu = $this->loadModel('product')->getSwitcher($productID, 'story');
|
||||
|
||||
$products = $this->product->getPairs();
|
||||
$this->product->saveState($productID, $products);
|
||||
|
||||
@@ -3965,6 +3965,42 @@ class upgradeModel extends model
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adjust priv 15.0.
|
||||
*
|
||||
* @access public
|
||||
* @return true
|
||||
*/
|
||||
public function adjustPriv15_0()
|
||||
{
|
||||
$this->dao->update(TABLE_GROUPPRIV)->set('module')->eq('execution')->where('module')->eq('project')->exec();
|
||||
|
||||
$stmt = $this->dao->select('*')->from(TABLE_GROUPPRIV)->where('module')->eq('program')->andWhere('method')->like('PGM%')->query();
|
||||
while($grouppriv = $stmt->fetch())
|
||||
{
|
||||
$this->dao->delete()->from(TABLE_GROUPPRIV)->where('module')->eq($grouppriv->module)->andWhere('method')->eq($grouppriv->method)->exec();
|
||||
$grouppriv->method = strtolower(str_ireplace('PGM', '', $grouppriv->method));
|
||||
$this->dao->replace(TABLE_GROUPPRIV)->data($grouppriv)->exec();
|
||||
|
||||
$grouppriv->method = 'index';
|
||||
$this->dao->replace(TABLE_GROUPPRIV)->data($grouppriv)->exec();
|
||||
}
|
||||
|
||||
$stmt = $this->dao->select('*')->from(TABLE_GROUPPRIV)->where('module')->eq('program')->andWhere('method')->like('PRJ%')->query();
|
||||
while($grouppriv = $stmt->fetch())
|
||||
{
|
||||
$this->dao->delete()->from(TABLE_GROUPPRIV)->where('module')->eq($grouppriv->module)->andWhere('method')->eq($grouppriv->method)->exec();
|
||||
$grouppriv->module = 'project';
|
||||
$grouppriv->method = strtolower(str_ireplace('PRJ', '', $grouppriv->method));
|
||||
$this->dao->replace(TABLE_GROUPPRIV)->data($grouppriv)->exec();
|
||||
|
||||
$grouppriv->method = 'index';
|
||||
$this->dao->replace(TABLE_GROUPPRIV)->data($grouppriv)->exec();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Save Logs.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user