Merge branch 'master' of https://github.com/easysoft/zentaopms
This commit is contained in:
@@ -214,6 +214,7 @@ $config->objectTables['productplan'] = TABLE_PRODUCTPLAN;
|
||||
$config->objectTables['release'] = TABLE_RELEASE;
|
||||
$config->objectTables['program'] = TABLE_PROJECT;
|
||||
$config->objectTables['project'] = TABLE_PROJECT;
|
||||
$config->objectTables['execution'] = TABLE_PROJECT;
|
||||
$config->objectTables['task'] = TABLE_TASK;
|
||||
$config->objectTables['build'] = TABLE_BUILD;
|
||||
$config->objectTables['bug'] = TABLE_BUG;
|
||||
|
||||
@@ -207,7 +207,6 @@ class router extends baseRouter
|
||||
$lang->productURCommon = zget($URList, $storyConcept->storyConcept, $config->URCommonList[$this->clientLang]);
|
||||
$lang->productSRCommon = zget($SRList, $storyConcept->storyConcept, $config->SRCommonList[$this->clientLang]);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
parent::loadLang($moduleName, $appName);
|
||||
|
||||
@@ -5,6 +5,7 @@ $config->action->objectNameFields['productplan'] = 'title';
|
||||
$config->action->objectNameFields['release'] = 'name';
|
||||
$config->action->objectNameFields['program'] = 'name';
|
||||
$config->action->objectNameFields['project'] = 'name';
|
||||
$config->action->objectNameFields['execution'] = 'name';
|
||||
$config->action->objectNameFields['task'] = 'name';
|
||||
$config->action->objectNameFields['build'] = 'name';
|
||||
$config->action->objectNameFields['bug'] = 'title';
|
||||
|
||||
@@ -65,11 +65,12 @@ $lang->action->periods['thismonth'] = $lang->action->dynamic->thisMonth;
|
||||
$lang->action->periods['lastmonth'] = $lang->action->dynamic->lastMonth;
|
||||
|
||||
$lang->action->objectTypes['product'] = $lang->productCommon;
|
||||
$lang->action->objectTypes['story'] = 'Story';
|
||||
$lang->action->objectTypes['productplan'] = 'Plan';
|
||||
$lang->action->objectTypes['story'] = $lang->productSRCommon;
|
||||
$lang->action->objectTypes['productplan'] = $lang->planCommon;
|
||||
$lang->action->objectTypes['release'] = 'Release';
|
||||
$lang->action->objectTypes['program'] = 'Program';
|
||||
$lang->action->objectTypes['project'] = $lang->projectCommon;
|
||||
$lang->action->objectTypes['project'] = 'Project';
|
||||
$lang->action->objectTypes['execution'] = 'Execution';
|
||||
$lang->action->objectTypes['task'] = 'Aufgabe';
|
||||
$lang->action->objectTypes['build'] = 'Build';
|
||||
$lang->action->objectTypes['bug'] = 'Bug';
|
||||
@@ -400,8 +401,9 @@ $lang->action->label->product = $lang->productCommon . '|product|view|produc
|
||||
$lang->action->label->productplan = 'Plan|productplan|view|productID=%s';
|
||||
$lang->action->label->release = 'Release|release|view|productID=%s';
|
||||
$lang->action->label->story = 'Story|story|view|storyID=%s';
|
||||
$lang->action->label->program = "Program|program|browse|";
|
||||
$lang->action->label->project = "{$lang->projectCommon}|project|view|projectID=%s";
|
||||
$lang->action->label->program = "Program|program|pgmproduct|programID=%s";
|
||||
$lang->action->label->project = "Project|program|index|projectID=%s";
|
||||
$lang->action->label->execution = "Execution|project|task|projectID=%s";
|
||||
$lang->action->label->task = 'Aufgaben|task|view|taskID=%s';
|
||||
$lang->action->label->build = 'Builds|build|view|buildID=%s';
|
||||
$lang->action->label->bug = 'Bugs|bug|view|bugID=%s';
|
||||
|
||||
@@ -65,11 +65,12 @@ $lang->action->periods['thismonth'] = $lang->action->dynamic->thisMonth;
|
||||
$lang->action->periods['lastmonth'] = $lang->action->dynamic->lastMonth;
|
||||
|
||||
$lang->action->objectTypes['product'] = $lang->productCommon;
|
||||
$lang->action->objectTypes['story'] = 'Story';
|
||||
$lang->action->objectTypes['productplan'] = 'Plan';
|
||||
$lang->action->objectTypes['story'] = $lang->productSRCommon;
|
||||
$lang->action->objectTypes['productplan'] = $lang->planCommon;
|
||||
$lang->action->objectTypes['release'] = 'Release';
|
||||
$lang->action->objectTypes['program'] = 'Program';
|
||||
$lang->action->objectTypes['project'] = $lang->projectCommon;
|
||||
$lang->action->objectTypes['project'] = 'Project';
|
||||
$lang->action->objectTypes['execution'] = 'Execution';
|
||||
$lang->action->objectTypes['task'] = 'Task';
|
||||
$lang->action->objectTypes['build'] = 'Build';
|
||||
$lang->action->objectTypes['bug'] = 'Bug';
|
||||
@@ -400,8 +401,9 @@ $lang->action->label->product = $lang->productCommon . '|product|view|produc
|
||||
$lang->action->label->productplan = 'Plan|productplan|view|productID=%s';
|
||||
$lang->action->label->release = 'Release|release|view|productID=%s';
|
||||
$lang->action->label->story = 'Story|story|view|storyID=%s';
|
||||
$lang->action->label->program = "Program|program|browse|";
|
||||
$lang->action->label->project = "{$lang->projectCommon}|project|view|projectID=%s";
|
||||
$lang->action->label->program = "Program|program|pgmproduct|programID=%s";
|
||||
$lang->action->label->project = "Project|program|index|projectID=%s";
|
||||
$lang->action->label->execution = "Execution|project|task|projectID=%s";
|
||||
$lang->action->label->task = 'Task|task|view|taskID=%s';
|
||||
$lang->action->label->build = 'Build|build|view|buildID=%s';
|
||||
$lang->action->label->bug = 'Bug|bug|view|bugID=%s';
|
||||
|
||||
@@ -65,11 +65,12 @@ $lang->action->periods['thismonth'] = $lang->action->dynamic->thisMonth;
|
||||
$lang->action->periods['lastmonth'] = $lang->action->dynamic->lastMonth;
|
||||
|
||||
$lang->action->objectTypes['product'] = $lang->productCommon;
|
||||
$lang->action->objectTypes['story'] = 'Story';
|
||||
$lang->action->objectTypes['productplan'] = 'Plan';
|
||||
$lang->action->objectTypes['story'] = $lang->productSRCommon;
|
||||
$lang->action->objectTypes['productplan'] = $lang->planCommon;
|
||||
$lang->action->objectTypes['release'] = 'Release';
|
||||
$lang->action->objectTypes['program'] = 'Program';
|
||||
$lang->action->objectTypes['project'] = 'Projet';
|
||||
$lang->action->objectTypes['project'] = 'Project';
|
||||
$lang->action->objectTypes['execution'] = 'Execution';
|
||||
$lang->action->objectTypes['task'] = 'Tâche';
|
||||
$lang->action->objectTypes['build'] = 'Build';
|
||||
$lang->action->objectTypes['bug'] = 'Bug';
|
||||
@@ -400,8 +401,9 @@ $lang->action->label->product = $lang->productCommon . '|product|view|produc
|
||||
$lang->action->label->productplan = 'Plan|productplan|view|productID=%s';
|
||||
$lang->action->label->release = 'Release|release|view|productID=%s';
|
||||
$lang->action->label->story = 'Story|story|view|storyID=%s';
|
||||
$lang->action->label->program = "Program|program|browse|";
|
||||
$lang->action->label->project = "{$lang->projectCommon}|project|view|projectID=%s";
|
||||
$lang->action->label->program = "Program|program|pgmproduct|programID=%s";
|
||||
$lang->action->label->project = "Project|program|index|projectID=%s";
|
||||
$lang->action->label->execution = "Execution|project|task|projectID=%s";
|
||||
$lang->action->label->task = 'Tâche|task|view|taskID=%s';
|
||||
$lang->action->label->build = 'Build|build|view|buildID=%s';
|
||||
$lang->action->label->bug = 'Bug|bug|view|bugID=%s';
|
||||
|
||||
@@ -65,11 +65,12 @@ $lang->action->periods['thismonth'] = $lang->action->dynamic->thisMonth;
|
||||
$lang->action->periods['lastmonth'] = $lang->action->dynamic->lastMonth;
|
||||
|
||||
$lang->action->objectTypes['product'] = $lang->productCommon;
|
||||
$lang->action->objectTypes['story'] = 'Câu chuyện';
|
||||
$lang->action->objectTypes['productplan'] = 'Kế hoạch';
|
||||
$lang->action->objectTypes['story'] = $lang->productSRCommon;
|
||||
$lang->action->objectTypes['productplan'] = $lang->planCommon;
|
||||
$lang->action->objectTypes['release'] = 'Phát hành';
|
||||
$lang->action->objectTypes['program'] = 'Program';
|
||||
$lang->action->objectTypes['project'] = $lang->projectCommon;
|
||||
$lang->action->objectTypes['project'] = 'Project';
|
||||
$lang->action->objectTypes['execution'] = 'Execution';
|
||||
$lang->action->objectTypes['task'] = 'Nhiệm vụ';
|
||||
$lang->action->objectTypes['build'] = 'Bản dựng';
|
||||
$lang->action->objectTypes['bug'] = 'Bug';
|
||||
@@ -400,8 +401,9 @@ $lang->action->label->product = $lang->productCommon . '|product|view|produc
|
||||
$lang->action->label->productplan = 'Kế hoạch|productplan|view|productID=%s';
|
||||
$lang->action->label->release = 'Phát hành|release|view|productID=%s';
|
||||
$lang->action->label->story = 'Câu chuyện|story|view|storyID=%s';
|
||||
$lang->action->label->program = "Program|program|browse|";
|
||||
$lang->action->label->project = "{$lang->projectCommon}|project|view|projectID=%s";
|
||||
$lang->action->label->program = "Program|program|pgmproduct|programID=%s";
|
||||
$lang->action->label->project = "Project|program|index|projectID=%s";
|
||||
$lang->action->label->execution = "Execution|project|task|projectID=%s";
|
||||
$lang->action->label->task = 'Nhiệm vụ|task|view|taskID=%s';
|
||||
$lang->action->label->build = 'Bản dựng|build|view|buildID=%s';
|
||||
$lang->action->label->bug = 'Bug|bug|view|bugID=%s';
|
||||
|
||||
@@ -68,8 +68,9 @@ $lang->action->objectTypes['product'] = $lang->productCommon;
|
||||
$lang->action->objectTypes['story'] = $lang->productSRCommon;
|
||||
$lang->action->objectTypes['productplan'] = $lang->planCommon;
|
||||
$lang->action->objectTypes['release'] = '发布';
|
||||
$lang->action->objectTypes['program'] = '项目';
|
||||
$lang->action->objectTypes['project'] = $lang->projectCommon;
|
||||
$lang->action->objectTypes['program'] = '项目集';
|
||||
$lang->action->objectTypes['project'] = '项目';
|
||||
$lang->action->objectTypes['execution'] = '执行';
|
||||
$lang->action->objectTypes['task'] = '任务';
|
||||
$lang->action->objectTypes['build'] = '版本';
|
||||
$lang->action->objectTypes['bug'] = 'Bug';
|
||||
@@ -400,8 +401,9 @@ $lang->action->label->product = $lang->productCommon . '|product|view|produc
|
||||
$lang->action->label->productplan = "{$lang->planCommon}|productplan|view|productID=%s";
|
||||
$lang->action->label->release = '发布|release|view|productID=%s';
|
||||
$lang->action->label->story = "{$lang->productSRCommon}|story|view|storyID=%s";
|
||||
$lang->action->label->program = "项目|program|browse|";
|
||||
$lang->action->label->project = "{$lang->projectCommon}|project|view|projectID=%s";
|
||||
$lang->action->label->program = "项目集|program|pgmproduct|programID=%s";
|
||||
$lang->action->label->project = "项目|program|index|projectID=%s";
|
||||
$lang->action->label->execution = "执行|project|task|projectID=%s";
|
||||
$lang->action->label->task = '任务|task|view|taskID=%s';
|
||||
$lang->action->label->build = '版本|build|view|buildID=%s';
|
||||
$lang->action->label->bug = 'Bug|bug|view|bugID=%s';
|
||||
|
||||
@@ -66,9 +66,11 @@ $lang->action->periods['lastmonth'] = $lang->action->dynamic->lastMonth;
|
||||
|
||||
$lang->action->objectTypes['product'] = $lang->productCommon;
|
||||
$lang->action->objectTypes['story'] = $lang->productSRCommon;
|
||||
$lang->action->objectTypes['productplan'] = '計劃';
|
||||
$lang->action->objectTypes['productplan'] = $lang->planCommon;
|
||||
$lang->action->objectTypes['release'] = '發佈';
|
||||
$lang->action->objectTypes['project'] = $lang->projectCommon;
|
||||
$lang->action->objectTypes['program'] = '項目集';
|
||||
$lang->action->objectTypes['project'] = '項目';
|
||||
$lang->action->objectTypes['execution'] = '執行';
|
||||
$lang->action->objectTypes['task'] = '任務';
|
||||
$lang->action->objectTypes['build'] = '版本';
|
||||
$lang->action->objectTypes['bug'] = 'Bug';
|
||||
@@ -387,7 +389,9 @@ $lang->action->label->product = $lang->productCommon . '|product|view|produc
|
||||
$lang->action->label->productplan = '計劃|productplan|view|productID=%s';
|
||||
$lang->action->label->release = '發佈|release|view|productID=%s';
|
||||
$lang->action->label->story = "{$lang->productSRCommon}|story|view|storyID=%s";
|
||||
$lang->action->label->project = "{$lang->projectCommon}|project|view|projectID=%s";
|
||||
$lang->action->label->program = "項目集|program|pgmproduct|programID=%s";
|
||||
$lang->action->label->project = "項目|program|index|projectID=%s";
|
||||
$lang->action->label->execution = "執行|project|task|projectID=%s";
|
||||
$lang->action->label->task = '任務|task|view|taskID=%s';
|
||||
$lang->action->label->build = '版本|build|view|buildID=%s';
|
||||
$lang->action->label->bug = 'Bug|bug|view|bugID=%s';
|
||||
|
||||
@@ -801,12 +801,13 @@ class actionModel extends model
|
||||
{
|
||||
if(!isset($this->config->objectTables[$objectType])) continue; // If no defination for this type, omit it.
|
||||
|
||||
$objectIds = array_unique($objectIds);
|
||||
$table = $this->config->objectTables[$objectType];
|
||||
$field = $this->config->action->objectNameFields[$objectType];
|
||||
$objectIds = array_unique($objectIds);
|
||||
$table = $this->config->objectTables[$objectType];
|
||||
$field = $this->config->action->objectNameFields[$objectType];
|
||||
if($table != TABLE_TODO)
|
||||
{
|
||||
if(strpos($table, 'task') !== false or strpos($table, 'bug') !== false or strpos($table, 'build') !== false or strpos($table, 'issue') !== false)
|
||||
$needGetPRJType = 'story,build,task,bug,case,testcase,caselib,testtask,testsuite,testreport,doc,issue,release,risk,design';
|
||||
if(strpos($needGetPRJType, $objectType) !== false)
|
||||
{
|
||||
$objectInfo = $this->dao->select("id, PRJ, $field AS name")->from($table)->where('id')->in($objectIds)->fetchAll();
|
||||
foreach($objectInfo as $object)
|
||||
@@ -815,13 +816,13 @@ class actionModel extends model
|
||||
$objectPRJ[$object->id] = $object->PRJ;
|
||||
}
|
||||
}
|
||||
elseif(strpos($table, 'project') !== false)
|
||||
elseif($objectType == 'program' or $objectType == 'project' or $objectType == 'execution')
|
||||
{
|
||||
$objectInfo = $this->dao->select("id, $field AS name")->from($table)->where('id')->in($objectIds)->fetchAll();
|
||||
$objectInfo = $this->dao->select("id, project, $field AS name")->from($table)->where('id')->in($objectIds)->fetchAll();
|
||||
foreach($objectInfo as $object)
|
||||
{
|
||||
$objectName[$object->id] = $object->name;
|
||||
$objectPRJ[$object->id] = $object->id;
|
||||
$objectPRJ[$object->id] = $object->project > 0 ? $object->project : $object->id;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -87,7 +87,7 @@ $lang->block->hidden = 'Verstecken';
|
||||
$lang->block->dynamicInfo = "<span class='timeline-tag'>%s</span> <span class='timeline-text'>%s <em>%s</em> %s <a href='%s'>%s</a></span>";
|
||||
|
||||
$lang->block->productName = $lang->productCommon . ' Name';
|
||||
$lang->block->totalStory = 'The Total ' . $lang->productSRCommon;
|
||||
$lang->block->totalStory = 'The Total ' . $lang->SRCommon;
|
||||
$lang->block->totalBug = 'The Total Bug';
|
||||
$lang->block->totalRelease = 'Release The Number';
|
||||
|
||||
|
||||
@@ -87,7 +87,7 @@ $lang->block->hidden = 'Hide';
|
||||
$lang->block->dynamicInfo = "<span class='timeline-tag'>%s</span> <span class='timeline-text'>%s <em>%s</em> %s <a href='%s' title='%s'>%s</a></span>";
|
||||
|
||||
$lang->block->productName = $lang->productCommon . ' Name';
|
||||
$lang->block->totalStory = 'The Total ' . $lang->productSRCommon;
|
||||
$lang->block->totalStory = 'The Total ' . $lang->SRCommon;
|
||||
$lang->block->totalBug = 'The Total Bug';
|
||||
$lang->block->totalRelease = 'Release The Number';
|
||||
|
||||
|
||||
@@ -87,7 +87,7 @@ $lang->block->hidden = 'Masquer';
|
||||
$lang->block->dynamicInfo = "<span class='timeline-tag'>%s</span> <span class='timeline-text'>%s <em>%s</em> %s <a href='%s' title='%s'>%s</a></span>";
|
||||
|
||||
$lang->block->productName = $lang->productCommon . ' Name';
|
||||
$lang->block->totalStory = 'The Total ' . $lang->productSRCommon;
|
||||
$lang->block->totalStory = 'The Total ' . $lang->SRCommon;
|
||||
$lang->block->totalBug = 'The Total Bug';
|
||||
$lang->block->totalRelease = 'Release The Number';
|
||||
|
||||
|
||||
@@ -87,7 +87,7 @@ $lang->block->hidden = 'Ẩn';
|
||||
$lang->block->dynamicInfo = "<span class='timeline-tag'>%s</span> <span class='timeline-text'>%s <em>%s</em> %s <a href='%s' title='%s'>%s</a></span>";
|
||||
|
||||
$lang->block->productName = $lang->productCommon . ' Name';
|
||||
$lang->block->totalStory = 'The Total ' . $lang->productSRCommon;
|
||||
$lang->block->totalStory = 'The Total ' . $lang->SRCommon;
|
||||
$lang->block->totalBug = 'The Total Bug';
|
||||
$lang->block->totalRelease = 'Release The Number';
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ $lang->block->contribute = '我的贡献';
|
||||
|
||||
$lang->block->leftToday = '今天剩余工作总计';
|
||||
$lang->block->myTask = '我的任务';
|
||||
$lang->block->myStory = "我的{$lang->productSRCommon}";
|
||||
$lang->block->myStory = "我的{$lang->SRCommon}";
|
||||
$lang->block->myBug = '我的BUG';
|
||||
$lang->block->myProject = '未关闭的' . $lang->projectCommon;
|
||||
$lang->block->myProduct = '未关闭的' . $lang->productCommon;
|
||||
@@ -88,7 +88,7 @@ $lang->block->hidden = '隐藏';
|
||||
$lang->block->dynamicInfo = "<span class='timeline-tag'>%s</span> <span class='timeline-text'>%s <em>%s</em> %s <a href='%s' title='%s'>%s</a></span>";
|
||||
|
||||
$lang->block->productName = $lang->productCommon . '名称';
|
||||
$lang->block->totalStory = '总' . $lang->productSRCommon;
|
||||
$lang->block->totalStory = '总' . $lang->SRCommon;
|
||||
$lang->block->totalBug = '总Bug';
|
||||
$lang->block->totalRelease = '发布次数';
|
||||
|
||||
@@ -182,7 +182,7 @@ $lang->block->default['product']['3']['grid'] = 8;
|
||||
$lang->block->default['product']['3']['params']['count'] = 15;
|
||||
$lang->block->default['product']['3']['params']['type'] = 'noclosed';
|
||||
|
||||
$lang->block->default['product']['4']['title'] = "指派给我的{$lang->productSRCommon}";
|
||||
$lang->block->default['product']['4']['title'] = "指派给我的{$lang->SRCommon}";
|
||||
$lang->block->default['product']['4']['block'] = 'story';
|
||||
$lang->block->default['product']['4']['grid'] = 4;
|
||||
|
||||
@@ -313,7 +313,7 @@ $lang->block->availableBlocks->todo = '我的待办';
|
||||
$lang->block->availableBlocks->task = '我的任务';
|
||||
$lang->block->availableBlocks->bug = '我的Bug';
|
||||
$lang->block->availableBlocks->case = '我的用例';
|
||||
$lang->block->availableBlocks->story = "我的{$lang->productSRCommon}";
|
||||
$lang->block->availableBlocks->story = "我的{$lang->SRCommon}";
|
||||
$lang->block->availableBlocks->product = $lang->productCommon . '列表';
|
||||
$lang->block->availableBlocks->project = $lang->projectCommon . '列表';
|
||||
$lang->block->availableBlocks->plan = "{$lang->planCommon}列表";
|
||||
@@ -359,7 +359,7 @@ $lang->block->modules['product']->availableBlocks = new stdclass();
|
||||
$lang->block->modules['product']->availableBlocks->statistic = $lang->productCommon . '统计';
|
||||
$lang->block->modules['product']->availableBlocks->overview = $lang->productCommon . '总览';
|
||||
$lang->block->modules['product']->availableBlocks->list = $lang->productCommon . '列表';
|
||||
$lang->block->modules['product']->availableBlocks->story = "{$lang->productSRCommon}列表";
|
||||
$lang->block->modules['product']->availableBlocks->story = "{$lang->SRCommon}列表";
|
||||
$lang->block->modules['product']->availableBlocks->plan = "{$lang->planCommon}列表";
|
||||
$lang->block->modules['product']->availableBlocks->release = '发布列表';
|
||||
|
||||
@@ -531,7 +531,7 @@ $lang->block->gridOptions[4] = '右侧';
|
||||
|
||||
$lang->block->flowchart = array();
|
||||
$lang->block->flowchart['admin'] = array('管理员', '维护公司', '添加用户', '维护权限');
|
||||
$lang->block->flowchart['product'] = array($lang->productCommon . '经理', '创建' . $lang->productCommon, '维护模块', "维护{$lang->planCommon}", "维护{$lang->productSRCommon}", '创建发布');
|
||||
$lang->block->flowchart['project'] = array($lang->projectCommon . '经理', '创建' . $lang->projectCommon, '维护团队', '关联' . $lang->productCommon, "关联{$lang->productSRCommon}", '分解任务');
|
||||
$lang->block->flowchart['product'] = array($lang->productCommon . '经理', '创建' . $lang->productCommon, '维护模块', "维护{$lang->planCommon}", "维护{$lang->SRCommon}", '创建发布');
|
||||
$lang->block->flowchart['project'] = array($lang->projectCommon . '经理', '创建' . $lang->projectCommon, '维护团队', '关联' . $lang->productCommon, "关联{$lang->SRCommon}", '分解任务');
|
||||
$lang->block->flowchart['dev'] = array('研发人员', '领取任务和Bug', '更新状态', '完成任务和Bug');
|
||||
$lang->block->flowchart['tester'] = array('测试人员', '撰写用例', '执行用例', '提交Bug', '验证Bug', '关闭Bug');
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
<th class="c-id"><?php echo $lang->idAB?></th>
|
||||
<?php endif;?>
|
||||
<th class="c-pri"><?php echo $lang->priAB?></th>
|
||||
<th class="c-name"><?php echo $lang->story->title;?></th>
|
||||
<th class="c-name"><?php echo $lang->SRCommon;?></th>
|
||||
<?php if($longBlock):?>
|
||||
<th class='c-estimate'><?php echo $lang->story->estimateAB;?></th>
|
||||
<?php endif;?>
|
||||
|
||||
@@ -66,6 +66,7 @@ class branch extends control
|
||||
{
|
||||
$this->view->link = $this->loadModel('product')->getProductLink($module, $method, $extra, true);
|
||||
$this->view->productID = $productID;
|
||||
$this->view->projectID = $this->session->PRJ;
|
||||
$this->view->module = $module;
|
||||
$this->view->method = $method;
|
||||
$this->view->extra = $extra;
|
||||
|
||||
@@ -205,4 +205,20 @@ class branchModel extends model
|
||||
->fetch();
|
||||
return empty($module) && empty($story) && empty($bug) && empty($case) && empty($release) && empty($build) && empty($plan) && empty($project);
|
||||
}
|
||||
|
||||
/**
|
||||
* Setting parameters for link.
|
||||
*
|
||||
* @param string $module
|
||||
* @param string $link
|
||||
* @param int $projectID
|
||||
* @param int $productID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function setParamsForLink($module, $link, $projectID, $productID, $branch)
|
||||
{
|
||||
$linkHtml = strpos('programplan', $module) !== false ? sprintf($link, $projectID, $productID, $branch) : sprintf($link, $productID, $branch);
|
||||
return $linkHtml;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,8 @@
|
||||
<?php
|
||||
foreach($branches as $branchID => $branch)
|
||||
{
|
||||
echo html::a(sprintf($link, $productID, $branchID), "<i class='icon-cube'></i> " . $branch, '', "data-key='{$branchesPinyin[$branch]}'");
|
||||
$linkHtml = $this->branch->setParamsForLink($module, $link, $projectID, $productID, $branchID);
|
||||
echo html::a($linkHtml, "<i class='icon-cube'></i> " . $branch, '', "data-key='{$branchesPinyin[$branch]}'");
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
||||
+17
-16
@@ -336,7 +336,7 @@ $lang->project->subMenu->qa->bug = 'Bug|project|bug|projectID=%s';
|
||||
$lang->project->subMenu->qa->build = array('link' => 'Build|project|build|projectID=%s', 'subModule' => 'build');
|
||||
$lang->project->subMenu->qa->testtask = array('link' => 'Test Aufgabe|project|testtask|projectID=%s', 'subModule' => 'testreport,testtask');
|
||||
|
||||
$lang->project->dividerMenu = ',story,team,product,';
|
||||
$lang->project->dividerMenu = ',projectstory,issue,story,team,product,';
|
||||
|
||||
$lang->task = new stdclass();
|
||||
$lang->build = new stdclass();
|
||||
@@ -853,20 +853,21 @@ $lang->icons['score'] = 'tint';
|
||||
/* Scrum menu. */
|
||||
$lang->menu = new stdclass();
|
||||
$lang->menu->scrum = new stdclass();
|
||||
$lang->menu->scrum->program = 'Index|program|index|';
|
||||
$lang->menu->scrum->product = $lang->productCommon . '|product|index|locate=no';
|
||||
$lang->menu->scrum->project = "$lang->projectCommon|project|index|locate=no";
|
||||
$lang->menu->scrum->doc = 'Doc|doc|index|';
|
||||
$lang->menu->scrum->qa = 'QA|qa|index';
|
||||
$lang->menu->scrum->stakeholder = 'Stakeholder|stakeholder|browse';
|
||||
$lang->menu->scrum->program = 'Index|program|index|';
|
||||
$lang->menu->scrum->product = $lang->productCommon . '|product|index|locate=no';
|
||||
$lang->menu->scrum->project = "$lang->projectCommon|project|index|locate=no";
|
||||
$lang->menu->scrum->doc = 'Doc|doc|index|';
|
||||
$lang->menu->scrum->qa = 'QA|qa|index';
|
||||
$lang->menu->scrum->projectrelease = array('link' => 'Release|projectrelease|browse|product={PRODUCT}');
|
||||
$lang->menu->scrum->stakeholder = 'Stakeholder|stakeholder|browse';
|
||||
|
||||
/* Waterfall menu. */
|
||||
$lang->menu->waterfall = new stdclass();
|
||||
$lang->menu->waterfall->programindex = array('link' => 'Index|program|index|program={PROGRAM}');
|
||||
$lang->menu->waterfall->programplan = array('link' => 'Plan|programplan|browse|program={PROGRAM}', 'subModule' => 'programplan');
|
||||
$lang->menu->waterfall->programindex = array('link' => 'Index|program|index|program={PROJECT}');
|
||||
$lang->menu->waterfall->programplan = array('link' => 'Plan|programplan|browse|program={PROJECT}', 'subModule' => 'programplan');
|
||||
$lang->menu->waterfall->project = array('link' => $lang->projectCommon . '|project|task|projectID={PROJECT}', 'subModule' => ',project,task,');
|
||||
$lang->menu->waterfall->weekly = array('link' => 'Weekly|weekly|index|program={PROGRAM}', 'subModule' => ',milestone,');
|
||||
$lang->menu->waterfall->doc = array('link' => 'Doc|doc|index|program={PROGRAM}');
|
||||
$lang->menu->waterfall->weekly = array('link' => 'Weekly|weekly|index|program={PROJECT}', 'subModule' => ',milestone,');
|
||||
$lang->menu->waterfall->doc = array('link' => 'Doc|doc|index|program={PROJECT}');
|
||||
$lang->menu->waterfall->product = array('link' => 'Story|product|browse|product={PRODUCT}', 'subModule' => ',story,');
|
||||
$lang->menu->waterfall->design = 'Design|design|browse|product={PRODUCT}';
|
||||
$lang->menu->waterfall->ci = 'Code|repo|browse|';
|
||||
@@ -874,7 +875,7 @@ $lang->menu->waterfall->qa = array('link' => 'QA|bug|browse|product=
|
||||
$lang->menu->waterfall->projectrelease = array('link' => 'Release|projectrelease|browse|product={PRODUCT}');
|
||||
$lang->menu->waterfall->issue = 'Issue|issue|browse|';
|
||||
$lang->menu->waterfall->risk = 'Risk|risk|browse|';
|
||||
$lang->menu->waterfall->list = array('link' => 'More|workestimation|index|program={PROGRAM}', 'class' => 'dropdown dropdown-hover waterfall-list', 'subModule' => 'stakeholder,workestimation,durationestimation,budget,pssp,stakeholder');
|
||||
$lang->menu->waterfall->list = array('link' => 'More|workestimation|index|program={PROJECT}', 'class' => 'dropdown dropdown-hover waterfall-list', 'subModule' => 'stakeholder,workestimation,durationestimation,budget,pssp,stakeholder');
|
||||
|
||||
$lang->waterfall = new stdclass();
|
||||
$lang->waterfall->subMenu = new stdclass();
|
||||
@@ -919,15 +920,15 @@ $lang->durationestimation->menu = new stdclass();
|
||||
$lang->stakeholder->menu->list = array('link' => 'Stakeholder List|stakeholder|browse|', 'alias' => 'create,edit,view,batchcreate');
|
||||
$lang->stakeholder->menu->issue = array('link' => 'Issue|stakeholder|issue|');
|
||||
|
||||
$lang->workestimation->menu->index = 'Workload|workestimation|index|program={PROGRAM}';
|
||||
$lang->workestimation->menu->duration = array('link' => 'Duration|durationestimation|index|program={PROGRAM}', 'subModule' => 'durationestimation');
|
||||
$lang->workestimation->menu->index = 'Workload|workestimation|index|program={PROJECT}';
|
||||
$lang->workestimation->menu->duration = array('link' => 'Duration|durationestimation|index|program={PROJECT}', 'subModule' => 'durationestimation');
|
||||
$lang->workestimation->menu->budget = array('link' => 'Budget|budget|summary|', 'subModule' => 'budget');
|
||||
|
||||
$lang->durationestimation->menu = $lang->workestimation->menu;
|
||||
$lang->budget->menu = $lang->workestimation->menu;
|
||||
|
||||
$lang->programplan->menu->gantt = array('link' => 'Gantt|programplan|browse|programID={PROGRAM}&productID={PRODUCT}&type=gantt');
|
||||
$lang->programplan->menu->lists = array('link' => 'Stage|programplan|browse|programID={PROGRAM}&productID={PRODUCT}&type=lists', 'alias' => 'create');
|
||||
$lang->programplan->menu->gantt = array('link' => 'Gantt|programplan|browse|programID={PROJECT}&productID={PRODUCT}&type=gantt');
|
||||
$lang->programplan->menu->lists = array('link' => 'Stage|programplan|browse|programID={PROJECT}&productID={PRODUCT}&type=lists', 'alias' => 'create');
|
||||
|
||||
$lang->waterfallproduct->menu->plan = array('link' => "{$lang->planCommon}|productplan|browse|productID={PRODUCT}", 'subModule' => 'productplan');
|
||||
$lang->waterfallproduct->menu->story = 'Story|product|browse|product={PRODUCT}';
|
||||
|
||||
+17
-16
@@ -336,7 +336,7 @@ $lang->project->subMenu->qa->bug = 'Bug|project|bug|projectID=%s';
|
||||
$lang->project->subMenu->qa->build = array('link' => 'Build|project|build|projectID=%s', 'subModule' => 'build');
|
||||
$lang->project->subMenu->qa->testtask = array('link' => 'Request|project|testtask|projectID=%s', 'subModule' => 'testreport,testtask');
|
||||
|
||||
$lang->project->dividerMenu = ',story,team,product,';
|
||||
$lang->project->dividerMenu = ',projectstory,issue,story,team,product,';
|
||||
|
||||
$lang->task = new stdclass();
|
||||
$lang->build = new stdclass();
|
||||
@@ -853,20 +853,21 @@ $lang->icons['score'] = 'tint';
|
||||
/* Scrum menu. */
|
||||
$lang->menu = new stdclass();
|
||||
$lang->menu->scrum = new stdclass();
|
||||
$lang->menu->scrum->program = 'Index|program|index|';
|
||||
$lang->menu->scrum->product = $lang->productCommon . '|product|index|locate=no';
|
||||
$lang->menu->scrum->project = "$lang->projectCommon|project|index|locate=no";
|
||||
$lang->menu->scrum->doc = 'Doc|doc|index|';
|
||||
$lang->menu->scrum->qa = 'QA|qa|index';
|
||||
$lang->menu->scrum->stakeholder = 'Stakeholder|stakeholder|browse';
|
||||
$lang->menu->scrum->program = 'Index|program|index|';
|
||||
$lang->menu->scrum->product = $lang->productCommon . '|product|index|locate=no';
|
||||
$lang->menu->scrum->project = "$lang->projectCommon|project|index|locate=no";
|
||||
$lang->menu->scrum->doc = 'Doc|doc|index|';
|
||||
$lang->menu->scrum->qa = 'QA|qa|index';
|
||||
$lang->menu->scrum->projectrelease = array('link' => 'Release|projectrelease|browse|product={PRODUCT}');
|
||||
$lang->menu->scrum->stakeholder = 'Stakeholder|stakeholder|browse';
|
||||
|
||||
/* Waterfall menu. */
|
||||
$lang->menu->waterfall = new stdclass();
|
||||
$lang->menu->waterfall->programindex = array('link' => 'Index|program|index|program={PROGRAM}');
|
||||
$lang->menu->waterfall->programplan = array('link' => 'Plan|programplan|browse|program={PROGRAM}', 'subModule' => 'programplan');
|
||||
$lang->menu->waterfall->programindex = array('link' => 'Index|program|index|program={PROJECT}');
|
||||
$lang->menu->waterfall->programplan = array('link' => 'Plan|programplan|browse|program={PROJECT}', 'subModule' => 'programplan');
|
||||
$lang->menu->waterfall->project = array('link' => $lang->projectCommon . '|project|task|projectID={PROJECT}', 'subModule' => ',project,task,');
|
||||
$lang->menu->waterfall->weekly = array('link' => 'Weekly|weekly|index|program={PROGRAM}', 'subModule' => ',milestone,');
|
||||
$lang->menu->waterfall->doc = array('link' => 'Doc|doc|index|program={PROGRAM}');
|
||||
$lang->menu->waterfall->weekly = array('link' => 'Weekly|weekly|index|program={PROJECT}', 'subModule' => ',milestone,');
|
||||
$lang->menu->waterfall->doc = array('link' => 'Doc|doc|index|program={PROJECT}');
|
||||
$lang->menu->waterfall->product = array('link' => 'Story|product|browse|product={PRODUCT}', 'subModule' => ',story,');
|
||||
$lang->menu->waterfall->design = 'Design|design|browse|product={PRODUCT}';
|
||||
$lang->menu->waterfall->ci = 'Code|repo|browse|';
|
||||
@@ -874,7 +875,7 @@ $lang->menu->waterfall->qa = array('link' => 'QA|bug|browse|product=
|
||||
$lang->menu->waterfall->projectrelease = array('link' => 'Release|projectrelease|browse|product={PRODUCT}');
|
||||
$lang->menu->waterfall->issue = 'Issue|issue|browse|';
|
||||
$lang->menu->waterfall->risk = 'Risk|risk|browse|';
|
||||
$lang->menu->waterfall->list = array('link' => 'More|workestimation|index|program={PROGRAM}', 'class' => 'dropdown dropdown-hover waterfall-list', 'subModule' => 'stakeholder,workestimation,durationestimation,budget,pssp,stakeholder');
|
||||
$lang->menu->waterfall->list = array('link' => 'More|workestimation|index|program={PROJECT}', 'class' => 'dropdown dropdown-hover waterfall-list', 'subModule' => 'stakeholder,workestimation,durationestimation,budget,pssp,stakeholder');
|
||||
|
||||
$lang->waterfall = new stdclass();
|
||||
$lang->waterfall->subMenu = new stdclass();
|
||||
@@ -919,15 +920,15 @@ $lang->durationestimation->menu = new stdclass();
|
||||
$lang->stakeholder->menu->list = array('link' => 'Stakeholder List|stakeholder|browse|', 'alias' => 'create,edit,view,batchcreate');
|
||||
$lang->stakeholder->menu->issue = array('link' => 'Issue|stakeholder|issue|');
|
||||
|
||||
$lang->workestimation->menu->index = 'Workload|workestimation|index|program={PROGRAM}';
|
||||
$lang->workestimation->menu->duration = array('link' => 'Duration|durationestimation|index|program={PROGRAM}', 'subModule' => 'durationestimation');
|
||||
$lang->workestimation->menu->index = 'Workload|workestimation|index|program={PROJECT}';
|
||||
$lang->workestimation->menu->duration = array('link' => 'Duration|durationestimation|index|program={PROJECT}', 'subModule' => 'durationestimation');
|
||||
$lang->workestimation->menu->budget = array('link' => 'Budget|budget|summary|', 'subModule' => 'budget');
|
||||
|
||||
$lang->durationestimation->menu = $lang->workestimation->menu;
|
||||
$lang->budget->menu = $lang->workestimation->menu;
|
||||
|
||||
$lang->programplan->menu->gantt = array('link' => 'Gantt|programplan|browse|programID={PROGRAM}&productID={PRODUCT}&type=gantt');
|
||||
$lang->programplan->menu->lists = array('link' => 'Stage|programplan|browse|programID={PROGRAM}&productID={PRODUCT}&type=lists', 'alias' => 'create');
|
||||
$lang->programplan->menu->gantt = array('link' => 'Gantt|programplan|browse|programID={PROJECT}&productID={PRODUCT}&type=gantt');
|
||||
$lang->programplan->menu->lists = array('link' => 'Stage|programplan|browse|programID={PROJECT}&productID={PRODUCT}&type=lists', 'alias' => 'create');
|
||||
|
||||
$lang->waterfallproduct->menu->plan = array('link' => "{$lang->planCommon}|productplan|browse|productID={PRODUCT}", 'subModule' => 'productplan');
|
||||
$lang->waterfallproduct->menu->story = 'Story|product|browse|product={PRODUCT}';
|
||||
|
||||
+17
-16
@@ -336,7 +336,7 @@ $lang->project->subMenu->qa->bug = 'Bug|project|bug|projectID=%s';
|
||||
$lang->project->subMenu->qa->build = array('link' => 'Build|project|build|projectID=%s', 'subModule' => 'build');
|
||||
$lang->project->subMenu->qa->testtask = array('link' => 'Recette|project|testtask|projectID=%s', 'subModule' => 'testreport,testtask');
|
||||
|
||||
$lang->project->dividerMenu = ',story,team,product,';
|
||||
$lang->project->dividerMenu = ',projectstory,issue,story,team,product,';
|
||||
|
||||
$lang->task = new stdclass();
|
||||
$lang->build = new stdclass();
|
||||
@@ -853,20 +853,21 @@ $lang->icons['score'] = 'tint';
|
||||
/* Scrum menu. */
|
||||
$lang->menu = new stdclass();
|
||||
$lang->menu->scrum = new stdclass();
|
||||
$lang->menu->scrum->program = 'Index|program|index|';
|
||||
$lang->menu->scrum->product = $lang->productCommon . '|product|index|locate=no';
|
||||
$lang->menu->scrum->project = "$lang->projectCommon|project|index|locate=no";
|
||||
$lang->menu->scrum->doc = 'Doc|doc|index|';
|
||||
$lang->menu->scrum->qa = 'QA|qa|index';
|
||||
$lang->menu->scrum->stakeholder = 'Stakeholder|stakeholder|browse';
|
||||
$lang->menu->scrum->program = 'Index|program|index|';
|
||||
$lang->menu->scrum->product = $lang->productCommon . '|product|index|locate=no';
|
||||
$lang->menu->scrum->project = "$lang->projectCommon|project|index|locate=no";
|
||||
$lang->menu->scrum->doc = 'Doc|doc|index|';
|
||||
$lang->menu->scrum->qa = 'QA|qa|index';
|
||||
$lang->menu->scrum->projectrelease = array('link' => 'Release|projectrelease|browse|product={PRODUCT}');
|
||||
$lang->menu->scrum->stakeholder = 'Stakeholder|stakeholder|browse';
|
||||
|
||||
/* Waterfall menu. */
|
||||
$lang->menu->waterfall = new stdclass();
|
||||
$lang->menu->waterfall->programindex = array('link' => 'Index|program|index|program={PROGRAM}');
|
||||
$lang->menu->waterfall->programplan = array('link' => 'Plan|programplan|browse|program={PROGRAM}', 'subModule' => 'programplan');
|
||||
$lang->menu->waterfall->programindex = array('link' => 'Index|program|index|program={PROJECT}');
|
||||
$lang->menu->waterfall->programplan = array('link' => 'Plan|programplan|browse|program={PROJECT}', 'subModule' => 'programplan');
|
||||
$lang->menu->waterfall->project = array('link' => $lang->projectCommon . '|project|task|projectID={PROJECT}', 'subModule' => ',project,task,');
|
||||
$lang->menu->waterfall->weekly = array('link' => 'Weekly|weekly|index|program={PROGRAM}', 'subModule' => ',milestone,');
|
||||
$lang->menu->waterfall->doc = array('link' => 'Doc|doc|index|program={PROGRAM}');
|
||||
$lang->menu->waterfall->weekly = array('link' => 'Weekly|weekly|index|program={PROJECT}', 'subModule' => ',milestone,');
|
||||
$lang->menu->waterfall->doc = array('link' => 'Doc|doc|index|program={PROJECT}');
|
||||
$lang->menu->waterfall->product = array('link' => 'Story|product|browse|product={PRODUCT}', 'subModule' => ',story,');
|
||||
$lang->menu->waterfall->design = 'Design|design|browse|product={PRODUCT}';
|
||||
$lang->menu->waterfall->ci = 'Code|repo|browse|';
|
||||
@@ -874,7 +875,7 @@ $lang->menu->waterfall->qa = array('link' => 'QA|bug|browse|product=
|
||||
$lang->menu->waterfall->projectrelease = array('link' => 'Release|projectrelease|browse|product={PRODUCT}');
|
||||
$lang->menu->waterfall->issue = 'Issue|issue|browse|';
|
||||
$lang->menu->waterfall->risk = 'Risk|risk|browse|';
|
||||
$lang->menu->waterfall->list = array('link' => 'More|workestimation|index|program={PROGRAM}', 'class' => 'dropdown dropdown-hover waterfall-list', 'subModule' => 'stakeholder,workestimation,durationestimation,budget,pssp,stakeholder');
|
||||
$lang->menu->waterfall->list = array('link' => 'More|workestimation|index|program={PROJECT}', 'class' => 'dropdown dropdown-hover waterfall-list', 'subModule' => 'stakeholder,workestimation,durationestimation,budget,pssp,stakeholder');
|
||||
|
||||
$lang->waterfall = new stdclass();
|
||||
$lang->waterfall->subMenu = new stdclass();
|
||||
@@ -919,15 +920,15 @@ $lang->durationestimation->menu = new stdclass();
|
||||
$lang->stakeholder->menu->list = array('link' => 'Stakeholder List|stakeholder|browse|', 'alias' => 'create,edit,view,batchcreate');
|
||||
$lang->stakeholder->menu->issue = array('link' => 'Issue|stakeholder|issue|');
|
||||
|
||||
$lang->workestimation->menu->index = 'Workload|workestimation|index|program={PROGRAM}';
|
||||
$lang->workestimation->menu->duration = array('link' => 'Duration|durationestimation|index|program={PROGRAM}', 'subModule' => 'durationestimation');
|
||||
$lang->workestimation->menu->index = 'Workload|workestimation|index|program={PROJECT}';
|
||||
$lang->workestimation->menu->duration = array('link' => 'Duration|durationestimation|index|program={PROJECT}', 'subModule' => 'durationestimation');
|
||||
$lang->workestimation->menu->budget = array('link' => 'Budget|budget|summary|', 'subModule' => 'budget');
|
||||
|
||||
$lang->durationestimation->menu = $lang->workestimation->menu;
|
||||
$lang->budget->menu = $lang->workestimation->menu;
|
||||
|
||||
$lang->programplan->menu->gantt = array('link' => 'Gantt|programplan|browse|programID={PROGRAM}&productID={PRODUCT}&type=gantt');
|
||||
$lang->programplan->menu->lists = array('link' => 'Stage|programplan|browse|programID={PROGRAM}&productID={PRODUCT}&type=lists', 'alias' => 'create');
|
||||
$lang->programplan->menu->gantt = array('link' => 'Gantt|programplan|browse|programID={PROJECT}&productID={PRODUCT}&type=gantt');
|
||||
$lang->programplan->menu->lists = array('link' => 'Stage|programplan|browse|programID={PROJECT}&productID={PRODUCT}&type=lists', 'alias' => 'create');
|
||||
|
||||
$lang->waterfallproduct->menu->plan = array('link' => "{$lang->planCommon}|productplan|browse|productID={PRODUCT}", 'subModule' => 'productplan');
|
||||
$lang->waterfallproduct->menu->story = 'Story|product|browse|product={PRODUCT}';
|
||||
|
||||
@@ -1,29 +1,31 @@
|
||||
<?php
|
||||
/* Sort of main menu. */
|
||||
$lang->waterfall->menuOrder[5] = 'programindex';
|
||||
$lang->waterfall->menuOrder[10] = 'programplan';
|
||||
$lang->waterfall->menuOrder[15] = 'project';
|
||||
$lang->waterfall->menuOrder[20] = 'weekly';
|
||||
$lang->waterfall->menuOrder[25] = 'review';
|
||||
$lang->waterfall->menuOrder[30] = 'doc';
|
||||
$lang->waterfall->menuOrder[35] = 'projectstory';
|
||||
$lang->waterfall->menuOrder[40] = 'product';
|
||||
$lang->waterfall->menuOrder[45] = 'design';
|
||||
$lang->waterfall->menuOrder[50] = 'ci';
|
||||
$lang->waterfall->menuOrder[55] = 'qa';
|
||||
$lang->waterfall->menuOrder[60] = 'projectrelease';
|
||||
$lang->waterfall->menuOrder[65] = 'issue';
|
||||
$lang->waterfall->menuOrder[70] = 'risk';
|
||||
$lang->waterfall->menuOrder[75] = 'report';
|
||||
$lang->waterfall->menuOrder[80] = 'auditplan';
|
||||
$lang->waterfall->menuOrder[85] = 'cm';
|
||||
$lang->waterfall->menuOrder[90] = 'list';
|
||||
$lang->waterfall->menuOrder[5] = 'programindex';
|
||||
$lang->waterfall->menuOrder[10] = 'programplan';
|
||||
$lang->waterfall->menuOrder[15] = 'project';
|
||||
$lang->waterfall->menuOrder[20] = 'weekly';
|
||||
$lang->waterfall->menuOrder[25] = 'review';
|
||||
$lang->waterfall->menuOrder[30] = 'doc';
|
||||
$lang->waterfall->menuOrder[35] = 'projectstory';
|
||||
$lang->waterfall->menuOrder[40] = 'product';
|
||||
$lang->waterfall->menuOrder[45] = 'design';
|
||||
$lang->waterfall->menuOrder[50] = 'ci';
|
||||
$lang->waterfall->menuOrder[55] = 'qa';
|
||||
$lang->waterfall->menuOrder[60] = 'projectrelease';
|
||||
$lang->waterfall->menuOrder[65] = 'issue';
|
||||
$lang->waterfall->menuOrder[70] = 'risk';
|
||||
$lang->waterfall->menuOrder[75] = 'report';
|
||||
$lang->waterfall->menuOrder[80] = 'auditplan';
|
||||
$lang->waterfall->menuOrder[85] = 'cm';
|
||||
$lang->waterfall->menuOrder[90] = 'list';
|
||||
|
||||
$lang->scrum->menuOrder[5] = 'program';
|
||||
$lang->scrum->menuOrder[10] = 'product';
|
||||
$lang->scrum->menuOrder[15] = 'project';
|
||||
$lang->scrum->menuOrder[20] = 'qa';
|
||||
$lang->scrum->menuOrder[25] = 'doc';
|
||||
$lang->scrum->menuOrder[5] = 'program';
|
||||
$lang->scrum->menuOrder[10] = 'product';
|
||||
$lang->scrum->menuOrder[15] = 'project';
|
||||
$lang->scrum->menuOrder[20] = 'projectstory';
|
||||
$lang->scrum->menuOrder[25] = 'qa';
|
||||
$lang->scrum->menuOrder[30] = 'projectrelease';
|
||||
$lang->scrum->menuOrder[35] = 'doc';
|
||||
|
||||
/* index menu order. */
|
||||
$lang->index->menuOrder[5] = 'product';
|
||||
|
||||
+17
-16
@@ -336,7 +336,7 @@ $lang->project->subMenu->qa->bug = 'Bug|project|bug|projectID=%s';
|
||||
$lang->project->subMenu->qa->build = array('link' => 'Bản dựng|project|build|projectID=%s', 'subModule' => 'build');
|
||||
$lang->project->subMenu->qa->testtask = array('link' => 'Yêu cầu|project|testtask|projectID=%s', 'subModule' => 'testreport,testtask');
|
||||
|
||||
$lang->project->dividerMenu = ',story,team,product,';
|
||||
$lang->project->dividerMenu = ',projectstory,issue,story,team,product,';
|
||||
|
||||
$lang->task = new stdclass();
|
||||
$lang->build = new stdclass();
|
||||
@@ -853,20 +853,21 @@ $lang->icons['score'] = 'tint';
|
||||
/* Scrum menu. */
|
||||
$lang->menu = new stdclass();
|
||||
$lang->menu->scrum = new stdclass();
|
||||
$lang->menu->scrum->program = 'Index|program|index|';
|
||||
$lang->menu->scrum->product = $lang->productCommon . '|product|index|locate=no';
|
||||
$lang->menu->scrum->project = "$lang->projectCommon|project|index|locate=no";
|
||||
$lang->menu->scrum->doc = 'Doc|doc|index|';
|
||||
$lang->menu->scrum->qa = 'QA|qa|index';
|
||||
$lang->menu->scrum->stakeholder = 'Stakeholder|stakeholder|browse';
|
||||
$lang->menu->scrum->program = 'Index|program|index|';
|
||||
$lang->menu->scrum->product = $lang->productCommon . '|product|index|locate=no';
|
||||
$lang->menu->scrum->project = "$lang->projectCommon|project|index|locate=no";
|
||||
$lang->menu->scrum->doc = 'Doc|doc|index|';
|
||||
$lang->menu->scrum->qa = 'QA|qa|index';
|
||||
$lang->menu->scrum->projectrelease = array('link' => 'Release|projectrelease|browse|product={PRODUCT}');
|
||||
$lang->menu->scrum->stakeholder = 'Stakeholder|stakeholder|browse';
|
||||
|
||||
/* Waterfall menu. */
|
||||
$lang->menu->waterfall = new stdclass();
|
||||
$lang->menu->waterfall->programindex = array('link' => 'Index|program|index|program={PROGRAM}');
|
||||
$lang->menu->waterfall->programplan = array('link' => 'Plan|programplan|browse|program={PROGRAM}', 'subModule' => 'programplan');
|
||||
$lang->menu->waterfall->programindex = array('link' => 'Index|program|index|program={PROJECT}');
|
||||
$lang->menu->waterfall->programplan = array('link' => 'Plan|programplan|browse|program={PROJECT}', 'subModule' => 'programplan');
|
||||
$lang->menu->waterfall->project = array('link' => $lang->projectCommon . '|project|task|projectID={PROJECT}', 'subModule' => ',project,task,');
|
||||
$lang->menu->waterfall->weekly = array('link' => 'Weekly|weekly|index|program={PROGRAM}', 'subModule' => ',milestone,');
|
||||
$lang->menu->waterfall->doc = array('link' => 'Doc|doc|index|program={PROGRAM}');
|
||||
$lang->menu->waterfall->weekly = array('link' => 'Weekly|weekly|index|program={PROJECT}', 'subModule' => ',milestone,');
|
||||
$lang->menu->waterfall->doc = array('link' => 'Doc|doc|index|program={PROJECT}');
|
||||
$lang->menu->waterfall->product = array('link' => 'Story|product|browse|product={PRODUCT}', 'subModule' => ',story,');
|
||||
$lang->menu->waterfall->design = 'Design|design|browse|product={PRODUCT}';
|
||||
$lang->menu->waterfall->ci = 'Code|repo|browse|';
|
||||
@@ -874,7 +875,7 @@ $lang->menu->waterfall->qa = array('link' => 'QA|bug|browse|product=
|
||||
$lang->menu->waterfall->projectrelease = array('link' => 'Release|projectrelease|browse|product={PRODUCT}');
|
||||
$lang->menu->waterfall->issue = 'Issue|issue|browse|';
|
||||
$lang->menu->waterfall->risk = 'Risk|risk|browse|';
|
||||
$lang->menu->waterfall->list = array('link' => 'More|workestimation|index|program={PROGRAM}', 'class' => 'dropdown dropdown-hover waterfall-list', 'subModule' => 'stakeholder,workestimation,durationestimation,budget,pssp,stakeholder');
|
||||
$lang->menu->waterfall->list = array('link' => 'More|workestimation|index|program={PROJECT}', 'class' => 'dropdown dropdown-hover waterfall-list', 'subModule' => 'stakeholder,workestimation,durationestimation,budget,pssp,stakeholder');
|
||||
|
||||
$lang->waterfall = new stdclass();
|
||||
$lang->waterfall->subMenu = new stdclass();
|
||||
@@ -919,15 +920,15 @@ $lang->durationestimation->menu = new stdclass();
|
||||
$lang->stakeholder->menu->list = array('link' => 'Stakeholder List|stakeholder|browse|', 'alias' => 'create,edit,view,batchcreate');
|
||||
$lang->stakeholder->menu->issue = array('link' => 'Issue|stakeholder|issue|');
|
||||
|
||||
$lang->workestimation->menu->index = 'Workload|workestimation|index|program={PROGRAM}';
|
||||
$lang->workestimation->menu->duration = array('link' => 'Duration|durationestimation|index|program={PROGRAM}', 'subModule' => 'durationestimation');
|
||||
$lang->workestimation->menu->index = 'Workload|workestimation|index|program={PROJECT}';
|
||||
$lang->workestimation->menu->duration = array('link' => 'Duration|durationestimation|index|program={PROJECT}', 'subModule' => 'durationestimation');
|
||||
$lang->workestimation->menu->budget = array('link' => 'Budget|budget|summary|', 'subModule' => 'budget');
|
||||
|
||||
$lang->durationestimation->menu = $lang->workestimation->menu;
|
||||
$lang->budget->menu = $lang->workestimation->menu;
|
||||
|
||||
$lang->programplan->menu->gantt = array('link' => 'Gantt|programplan|browse|programID={PROGRAM}&productID={PRODUCT}&type=gantt');
|
||||
$lang->programplan->menu->lists = array('link' => 'Stage|programplan|browse|programID={PROGRAM}&productID={PRODUCT}&type=lists', 'alias' => 'create');
|
||||
$lang->programplan->menu->gantt = array('link' => 'Gantt|programplan|browse|programID={PROJECT}&productID={PRODUCT}&type=gantt');
|
||||
$lang->programplan->menu->lists = array('link' => 'Stage|programplan|browse|programID={PROJECT}&productID={PRODUCT}&type=lists', 'alias' => 'create');
|
||||
|
||||
$lang->waterfallproduct->menu->plan = array('link' => "{$lang->planCommon}|productplan|browse|productID={PRODUCT}", 'subModule' => 'productplan');
|
||||
$lang->waterfallproduct->menu->story = 'Story|product|browse|product={PRODUCT}';
|
||||
|
||||
@@ -167,7 +167,7 @@ $lang->product->menu->list = array('link' => $lang->productCommon . '|product|al
|
||||
$lang->product->viewMenu = new stdclass();
|
||||
if($config->URAndSR) $lang->product->viewMenu->requirement = array('link' => "$lang->productURCommon|product|browse|productID=%s&branch=&browseType=unclosed¶m=0&storyType=requirement", 'alias' => 'batchedit', 'subModule' => 'story');
|
||||
$lang->product->viewMenu->story = array('link' => "$lang->productSRCommon|product|browse|productID=%s", 'alias' => 'batchedit', 'subModule' => 'story');
|
||||
$lang->product->viewMenu->track = array('link' => "跟踪矩阵|story|track|productID=%s");
|
||||
if($config->URAndSR) $lang->product->viewMenu->track = array('link' => "跟踪矩阵|story|track|productID=%s");
|
||||
$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';
|
||||
@@ -337,7 +337,7 @@ $lang->project->subMenu->qa->bug = 'Bug|project|bug|projectID=%s';
|
||||
$lang->project->subMenu->qa->build = array('link' => '版本|project|build|projectID=%s', 'subModule' => 'build');
|
||||
$lang->project->subMenu->qa->testtask = array('link' => '测试单|project|testtask|projectID=%s', 'subModule' => 'testreport,testtask');
|
||||
|
||||
$lang->project->dividerMenu = ',story,team,product,';
|
||||
$lang->project->dividerMenu = ',projectstory,issue,story,team,product,';
|
||||
|
||||
$lang->task = new stdclass();
|
||||
$lang->build = new stdclass();
|
||||
@@ -856,21 +856,29 @@ $lang->icons['score'] = 'tint';
|
||||
/* Scrum menu. */
|
||||
$lang->menu = new stdclass();
|
||||
$lang->menu->scrum = new stdclass();
|
||||
$lang->menu->scrum->program = '仪表盘|program|index|';
|
||||
//$lang->menu->scrum->product = $lang->productCommon . '|product|index|locate=no';
|
||||
$lang->menu->scrum->project = "$lang->projectCommon|project|index|locate=no";
|
||||
$lang->menu->scrum->doc = '文档|doc|index|';
|
||||
$lang->menu->scrum->qa = '测试|qa|index';
|
||||
$lang->menu->scrum->stakeholder = '干系人|stakeholder|browse';
|
||||
$lang->menu->scrum->program = '仪表盘|program|index|';
|
||||
//$lang->menu->scrum->product = $lang->productCommon . '|product|index|locate=no';
|
||||
$lang->menu->scrum->project = "$lang->projectCommon|project|index|locate=no";
|
||||
$lang->menu->scrum->projectstory = array('link' => '需求|projectstory|requirement', 'subModule' => 'requirement,story,track');
|
||||
$lang->menu->scrum->doc = '文档|doc|index|';
|
||||
$lang->menu->scrum->qa = '测试|qa|index';
|
||||
$lang->menu->scrum->projectrelease = array('link' => '发布|projectrelease|browse|product={PRODUCT}');
|
||||
$lang->menu->scrum->stakeholder = '干系人|stakeholder|browse';
|
||||
$lang->menu->scrum->list = array('link' => '更多|program|prjedit|project={PROJECT}', 'class' => 'dropdown dropdown-hover waterfall-list', 'subModule' => 'stakeholder,workestimation,durationestimation,budget,pssp,stakeholder');
|
||||
|
||||
$lang->scrum = new stdclass();
|
||||
$lang->scrum->subMenu = new stdclass();
|
||||
$lang->scrum->subMenu->list = new stdclass();
|
||||
$lang->scrum->subMenu->list->program = '项目|program|edit|';
|
||||
|
||||
/* Waterfall menu. */
|
||||
$lang->menu->waterfall = new stdclass();
|
||||
$lang->menu->waterfall->programindex = array('link' => '仪表盘|program|index|program={PROGRAM}');
|
||||
$lang->menu->waterfall->programplan = array('link' => '计划|programplan|browse|program={PROGRAM}', 'subModule' => 'programplan');
|
||||
$lang->menu->waterfall->programindex = array('link' => '仪表盘|program|index|project={PROJECT}');
|
||||
$lang->menu->waterfall->programplan = array('link' => '计划|programplan|browse|project={PROJECT}', 'subModule' => 'programplan');
|
||||
$lang->menu->waterfall->project = array('link' => $lang->projectCommon . '|project|task|projectID={PROJECT}', 'subModule' => ',project,task,');
|
||||
$lang->menu->waterfall->weekly = array('link' => '报告|weekly|index|program={PROGRAM}', 'subModule' => ',milestone,');
|
||||
$lang->menu->waterfall->doc = array('link' => '文档|doc|index|program={PROGRAM}');
|
||||
$lang->menu->waterfall->projectstory = array('link' => '需求|projectstory|requirement|projectID={PROGRAM}', 'subModule' => 'requirement,story,track');
|
||||
$lang->menu->waterfall->weekly = array('link' => '报告|weekly|index|project={PROJECT}', 'subModule' => ',milestone,');
|
||||
$lang->menu->waterfall->doc = array('link' => '文档|doc|index|project={PROJECT}');
|
||||
$lang->menu->waterfall->projectstory = array('link' => '需求|projectstory|requirement', 'subModule' => 'requirement,story,track');
|
||||
//$lang->menu->waterfall->product = array('link' => '需求|product|browse|product={PRODUCT}', 'subModule' => ',story,');
|
||||
$lang->menu->waterfall->design = '设计|design|browse|product={PRODUCT}';
|
||||
$lang->menu->waterfall->ci = '代码|repo|browse|';
|
||||
@@ -879,7 +887,7 @@ $lang->menu->waterfall->projectrelease = array('link' => '发布|projectrelease|
|
||||
//$lang->menu->waterfall->release = array('link' => '发布|release|browse|product={PRODUCT}', 'subModule' => 'release');
|
||||
$lang->menu->waterfall->issue = '问题|issue|browse|';
|
||||
$lang->menu->waterfall->risk = '风险|risk|browse|';
|
||||
$lang->menu->waterfall->list = array('link' => '更多|workestimation|index|program={PROGRAM}', 'class' => 'dropdown dropdown-hover waterfall-list', 'subModule' => 'stakeholder,workestimation,durationestimation,budget,pssp,stakeholder');
|
||||
$lang->menu->waterfall->list = array('link' => '更多|workestimation|index|project={PROJECT}', 'class' => 'dropdown dropdown-hover waterfall-list', 'subModule' => 'stakeholder,workestimation,durationestimation,budget,pssp,stakeholder');
|
||||
|
||||
$lang->waterfall = new stdclass();
|
||||
$lang->waterfall->subMenu = new stdclass();
|
||||
@@ -926,19 +934,19 @@ $lang->projectstory->menu = new stdclass();
|
||||
$lang->stakeholder->menu->list = array('link' => '干系人列表|stakeholder|browse|', 'alias' => 'create,edit,view,batchcreate');
|
||||
$lang->stakeholder->menu->issue = array('link' => '问题管理|stakeholder|issue|');
|
||||
|
||||
$lang->workestimation->menu->index = '工作量估算|workestimation|index|program={PROGRAM}';
|
||||
$lang->workestimation->menu->duration = array('link' => '工期估算|durationestimation|index|program={PROGRAM}', 'subModule' => 'durationestimation');
|
||||
$lang->workestimation->menu->index = '工作量估算|workestimation|index|project={PROJECT}';
|
||||
$lang->workestimation->menu->duration = array('link' => '工期估算|durationestimation|index|project={PROJECT}', 'subModule' => 'durationestimation');
|
||||
$lang->workestimation->menu->budget = array('link' => '费用估算|budget|summary|', 'subModule' => 'budget');
|
||||
|
||||
$lang->durationestimation->menu = $lang->workestimation->menu;
|
||||
$lang->budget->menu = $lang->workestimation->menu;
|
||||
|
||||
$lang->programplan->menu->gantt = array('link' => '甘特图|programplan|browse|programID={PROGRAM}&productID={PRODUCT}&type=gantt');
|
||||
$lang->programplan->menu->lists = array('link' => '阶段列表|programplan|browse|programID={PROGRAM}&productID={PRODUCT}&type=lists', 'alias' => 'create');
|
||||
$lang->programplan->menu->gantt = array('link' => '甘特图|programplan|browse|programID={PROJECT}&productID={PRODUCT}&type=gantt');
|
||||
$lang->programplan->menu->lists = array('link' => '阶段列表|programplan|browse|programID={PROJECT}&productID={PRODUCT}&type=lists', 'alias' => 'create');
|
||||
|
||||
$lang->projectstory->menu->requirement = array('link' => '用户需求|projectstory|requirement|programID={PROGRAM}&productID={PRODUCT}');
|
||||
$lang->projectstory->menu->story = array('link' => '软件需求|projectstory|story|programID={PROGRAM}&productID={PRODUCT}');
|
||||
$lang->projectstory->menu->track = array('link' => '跟踪矩阵|projectstory|track|programID={PROGRAM}&productID={PRODUCT}');
|
||||
$lang->projectstory->menu->requirement = array('link' => '用户需求|projectstory|requirement', 'subModule' => '');
|
||||
$lang->projectstory->menu->story = array('link' => '软件需求|projectstory|story', 'subModule' => '');
|
||||
$lang->projectstory->menu->track = array('link' => '跟踪矩阵|projectstory|track', 'subModule' => '');
|
||||
|
||||
$lang->waterfallproduct->menu->plan = array('link' => "{$lang->planCommon}|productplan|browse|productID={PRODUCT}", 'subModule' => 'productplan');
|
||||
$lang->waterfallproduct->menu->story = '需求|product|browse|product={PRODUCT}';
|
||||
|
||||
@@ -853,12 +853,13 @@ $lang->icons['score'] = 'tint';
|
||||
/* Scrum menu. */
|
||||
$lang->menu = new stdclass();
|
||||
$lang->menu->scrum = new stdclass();
|
||||
$lang->menu->scrum->program = '儀表盤|program|index|';
|
||||
//$lang->menu->scrum->product = $lang->productCommon . '|product|index|locate=no';
|
||||
$lang->menu->scrum->project = "$lang->projectCommon|project|index|locate=no";
|
||||
$lang->menu->scrum->doc = '文檔|doc|index|';
|
||||
$lang->menu->scrum->qa = '測試|qa|index';
|
||||
$lang->menu->scrum->stakeholder = '干係人|stakeholder|browse';
|
||||
$lang->menu->scrum->program = '儀表盤|program|index|';
|
||||
//$lang->menu->scrum->product = $lang->productCommon . '|product|index|locate=no';
|
||||
$lang->menu->scrum->project = "$lang->projectCommon|project|index|locate=no";
|
||||
$lang->menu->scrum->doc = '文檔|doc|index|';
|
||||
$lang->menu->scrum->qa = '測試|qa|index';
|
||||
$lang->menu->scrum->projectrelease = array('link' => '發布|projectrelease|browse|product={PRODUCT}');
|
||||
$lang->menu->scrum->stakeholder = '干係人|stakeholder|browse';
|
||||
|
||||
/* Waterfall menu. */
|
||||
$lang->menu->waterfall = new stdclass();
|
||||
|
||||
+50
-27
@@ -45,8 +45,19 @@ class commonModel extends model
|
||||
public function sendHeader()
|
||||
{
|
||||
header("Content-Type: text/html; Language={$this->config->charset}");
|
||||
if(!$this->loadModel('setting')->getItem('owner=system&module=sso&key=turnon')) header("X-Frame-Options: SAMEORIGIN");
|
||||
header("Cache-control: private");
|
||||
if($this->loadModel('setting')->getItem('owner=system&module=sso&key=turnon'))
|
||||
{
|
||||
if(isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == 'on')
|
||||
{
|
||||
$session = $this->config->sessionVar . '=' . session_id();
|
||||
header("Set-Cookie: $session; SameSite=None; Secure=true", false);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
header("X-Frame-Options: SAMEORIGIN");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -436,32 +447,35 @@ class commonModel extends model
|
||||
$moduleName = $app->getModuleName();
|
||||
$methodName = $app->getMethodName();
|
||||
|
||||
foreach($lang->menu->waterfall as $key => $menu)
|
||||
foreach(array('waterfall', 'scrum') as $model)
|
||||
{
|
||||
/* Replace for dropdown submenu. */
|
||||
if(isset($lang->waterfall->subMenu->$key))
|
||||
{
|
||||
$programSubMenu = $lang->waterfall->subMenu->$key;
|
||||
$subMenu = common::createSubMenu($programSubMenu, $app->session->PRJ);
|
||||
|
||||
if(!empty($subMenu))
|
||||
foreach($lang->menu->$model as $key => $menu)
|
||||
{
|
||||
/* Replace for dropdown submenu. */
|
||||
if(isset($lang->$model->subMenu->$key))
|
||||
{
|
||||
foreach($subMenu as $menuKey => $menu)
|
||||
{
|
||||
$itemMenu = zget($programSubMenu, $menuKey, '');
|
||||
$isActive['method'] = ($moduleName == strtolower($menu->link['module']) and $methodName == strtolower($menu->link['method']));
|
||||
$isActive['alias'] = ($moduleName == strtolower($menu->link['module']) and (is_array($itemMenu) and isset($itemMenu['alias']) and strpos($itemMenu['alias'], $methodName) !== false));
|
||||
$isActive['subModule'] = (is_array($itemMenu) and isset($itemMenu['subModule']) and strpos($itemMenu['subModule'], $moduleName) !== false);
|
||||
$programSubMenu = $lang->$model->subMenu->$key;
|
||||
$subMenu = common::createSubMenu($programSubMenu, $app->session->PRJ);
|
||||
|
||||
if($isActive['method'] or $isActive['alias'] or $isActive['subModule'])
|
||||
if(!empty($subMenu))
|
||||
{
|
||||
foreach($subMenu as $menuKey => $menu)
|
||||
{
|
||||
$lang->menu->waterfall->{$key}['link'] = $menu->text . "|" . join('|', $menu->link);
|
||||
break;
|
||||
$itemMenu = zget($programSubMenu, $menuKey, '');
|
||||
$isActive['method'] = ($moduleName == strtolower($menu->link['module']) and $methodName == strtolower($menu->link['method']));
|
||||
$isActive['alias'] = ($moduleName == strtolower($menu->link['module']) and (is_array($itemMenu) and isset($itemMenu['alias']) and strpos($itemMenu['alias'], $methodName) !== false));
|
||||
$isActive['subModule'] = (is_array($itemMenu) and isset($itemMenu['subModule']) and strpos($itemMenu['subModule'], $moduleName) !== false);
|
||||
|
||||
if($isActive['method'] or $isActive['alias'] or $isActive['subModule'])
|
||||
{
|
||||
$lang->menu->$model->{$key}['link'] = $menu->text . "|" . join('|', $menu->link);
|
||||
break;
|
||||
}
|
||||
}
|
||||
$lang->menu->$model->{$key}['subMenu'] = $subMenu;
|
||||
}
|
||||
$lang->menu->waterfall->{$key}['subMenu'] = $subMenu;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -598,7 +612,7 @@ class commonModel extends model
|
||||
self::setMainMenuByGroup($group, $moduleName, $methodName);
|
||||
|
||||
/* Print all main menus. */
|
||||
$menu = customModel::getMainmenu();
|
||||
$menu = customModel::getMainMenu();
|
||||
$activeName = 'active';
|
||||
$lastMenu = end($menu);
|
||||
if(isset($lang->menugroup->$moduleName)) $mainMenu = $lang->menugroup->$moduleName;
|
||||
@@ -2301,9 +2315,9 @@ EOD;
|
||||
{
|
||||
$link = is_array($setting) ? $setting['link'] : $setting;
|
||||
|
||||
if(strpos($link, "{PRODUCT}") !== false) $link = str_replace('{PRODUCT}', $app->session->product, $link);
|
||||
if(strpos($link, "{PROJECT}") !== false) $link = str_replace('{PROJECT}', $app->session->project, $link);
|
||||
if(strpos($link, "{PROGRAM}") !== false) $link = str_replace('{PROGRAM}', $app->session->PRJ, $link);
|
||||
if(strpos($link, "{PRODUCT}") !== false) $link = str_replace('{PRODUCT}', $app->session->product, $link);
|
||||
if(strpos($link, "{EXECUTION}") !== false) $link = str_replace('{EXECUTION}', $app->session->project, $link);
|
||||
if(strpos($link, "{PROJECT}") !== false) $link = str_replace('{PROJECT}', $app->session->PRJ, $link);
|
||||
|
||||
if(is_array($setting))
|
||||
{
|
||||
@@ -2334,10 +2348,14 @@ EOD;
|
||||
$program = $dbh->query("SELECT * FROM " . TABLE_PROGRAM . " WHERE `id` = '{$app->session->PRJ}'")->fetch();
|
||||
if(empty($program)) return;
|
||||
|
||||
self::initProgramSubmenu();
|
||||
if($program->model == 'scrum')
|
||||
{
|
||||
$lang->menuOrder = $lang->scrum->menuOrder;
|
||||
return $lang->menu->scrum;
|
||||
|
||||
/* The scrum project temporarily hides the trace matrix. */
|
||||
unset($lang->projectstory->menu->track);
|
||||
return self::processMenuVars($lang->menu->scrum);
|
||||
}
|
||||
|
||||
if($program->model == 'waterfall')
|
||||
@@ -2346,7 +2364,6 @@ EOD;
|
||||
$lang->menugroup->release = '';
|
||||
$lang->menuOrder = $lang->waterfall->menuOrder;
|
||||
$lang->program->dividerMenu = ',product,issue,';
|
||||
self::initProgramSubmenu();
|
||||
return self::processMenuVars($lang->menu->waterfall);
|
||||
}
|
||||
}
|
||||
@@ -2369,6 +2386,12 @@ EOD;
|
||||
$lang->navGroup->product = 'project';
|
||||
$lang->$moduleName->menu = self::processMenuVars($lang->$moduleName->menu);
|
||||
}
|
||||
if($program->model == 'scrum')
|
||||
{
|
||||
unset($lang->stakeholder->menu->issue);
|
||||
unset($lang->stakeholder->menu->plan);
|
||||
unset($lang->stakeholder->menu->expectation);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -10,7 +10,6 @@ $(function()
|
||||
else
|
||||
{
|
||||
$('#URSRName').removeClass('hidden');
|
||||
$('#customURSR').removeClass('hidden');
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -10,7 +10,6 @@ $(function()
|
||||
else
|
||||
{
|
||||
$('#URSRName').removeClass('hidden');
|
||||
$('#customURSR').removeClass('hidden');
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -15,63 +15,64 @@ $lang->moduleOrder[0] = 'index';
|
||||
$lang->moduleOrder[5] = 'my';
|
||||
$lang->moduleOrder[10] = 'todo';
|
||||
|
||||
$lang->moduleOrder[11] = 'program';
|
||||
$lang->moduleOrder[12] = 'personnel';
|
||||
$lang->moduleOrder[15] = 'product';
|
||||
$lang->moduleOrder[20] = 'story';
|
||||
$lang->moduleOrder[25] = 'productplan';
|
||||
$lang->moduleOrder[30] = 'release';
|
||||
$lang->moduleOrder[15] = 'program';
|
||||
$lang->moduleOrder[20] = 'personnel';
|
||||
$lang->moduleOrder[25] = 'product';
|
||||
$lang->moduleOrder[30] = 'story';
|
||||
$lang->moduleOrder[35] = 'productplan';
|
||||
$lang->moduleOrder[40] = 'release';
|
||||
$lang->moduleOrder[45] = 'projectstory';
|
||||
|
||||
$lang->moduleOrder[35] = 'project';
|
||||
$lang->moduleOrder[40] = 'task';
|
||||
$lang->moduleOrder[45] = 'build';
|
||||
$lang->moduleOrder[50] = 'project';
|
||||
$lang->moduleOrder[55] = 'task';
|
||||
$lang->moduleOrder[60] = 'build';
|
||||
|
||||
$lang->moduleOrder[50] = 'qa';
|
||||
$lang->moduleOrder[55] = 'bug';
|
||||
$lang->moduleOrder[60] = 'testcase';
|
||||
$lang->moduleOrder[65] = 'testtask';
|
||||
$lang->moduleOrder[70] = 'testsuite';
|
||||
$lang->moduleOrder[75] = 'testreport';
|
||||
$lang->moduleOrder[80] = 'caselib';
|
||||
$lang->moduleOrder[65] = 'qa';
|
||||
$lang->moduleOrder[70] = 'bug';
|
||||
$lang->moduleOrder[75] = 'testcase';
|
||||
$lang->moduleOrder[80] = 'testtask';
|
||||
$lang->moduleOrder[85] = 'testsuite';
|
||||
$lang->moduleOrder[90] = 'testreport';
|
||||
$lang->moduleOrder[95] = 'caselib';
|
||||
|
||||
$lang->moduleOrder[85] = 'doc';
|
||||
$lang->moduleOrder[90] = 'report';
|
||||
$lang->moduleOrder[100] = 'doc';
|
||||
$lang->moduleOrder[105] = 'report';
|
||||
|
||||
$lang->moduleOrder[95] = 'company';
|
||||
$lang->moduleOrder[100] = 'dept';
|
||||
$lang->moduleOrder[105] = 'group';
|
||||
$lang->moduleOrder[110] = 'user';
|
||||
$lang->moduleOrder[110] = 'company';
|
||||
$lang->moduleOrder[115] = 'dept';
|
||||
$lang->moduleOrder[120] = 'group';
|
||||
$lang->moduleOrder[125] = 'user';
|
||||
|
||||
$lang->moduleOrder[115] = 'admin';
|
||||
$lang->moduleOrder[120] = 'extension';
|
||||
$lang->moduleOrder[125] = 'custom';
|
||||
$lang->moduleOrder[140] = 'action';
|
||||
$lang->moduleOrder[130] = 'admin';
|
||||
$lang->moduleOrder[135] = 'extension';
|
||||
$lang->moduleOrder[140] = 'custom';
|
||||
$lang->moduleOrder[145] = 'action';
|
||||
|
||||
$lang->moduleOrder[145] = 'mail';
|
||||
$lang->moduleOrder[150] = 'svn';
|
||||
$lang->moduleOrder[155] = 'git';
|
||||
$lang->moduleOrder[160] = 'search';
|
||||
$lang->moduleOrder[165] = 'tree';
|
||||
$lang->moduleOrder[170] = 'api';
|
||||
$lang->moduleOrder[175] = 'file';
|
||||
$lang->moduleOrder[180] = 'misc';
|
||||
$lang->moduleOrder[185] = 'backup';
|
||||
$lang->moduleOrder[190] = 'cron';
|
||||
$lang->moduleOrder[195] = 'dev';
|
||||
$lang->moduleOrder[200] = 'message';
|
||||
$lang->moduleOrder[150] = 'mail';
|
||||
$lang->moduleOrder[155] = 'svn';
|
||||
$lang->moduleOrder[160] = 'git';
|
||||
$lang->moduleOrder[165] = 'search';
|
||||
$lang->moduleOrder[170] = 'tree';
|
||||
$lang->moduleOrder[175] = 'api';
|
||||
$lang->moduleOrder[180] = 'file';
|
||||
$lang->moduleOrder[185] = 'misc';
|
||||
$lang->moduleOrder[190] = 'backup';
|
||||
$lang->moduleOrder[195] = 'cron';
|
||||
$lang->moduleOrder[200] = 'dev';
|
||||
$lang->moduleOrder[205] = 'message';
|
||||
|
||||
$lang->moduleOrder[205] = 'design';
|
||||
$lang->moduleOrder[210] = 'programplan';
|
||||
$lang->moduleOrder[215] = 'issue';
|
||||
$lang->moduleOrder[220] = 'risk';
|
||||
$lang->moduleOrder[225] = 'stage';
|
||||
$lang->moduleOrder[210] = 'design';
|
||||
$lang->moduleOrder[215] = 'programplan';
|
||||
$lang->moduleOrder[220] = 'issue';
|
||||
$lang->moduleOrder[225] = 'risk';
|
||||
$lang->moduleOrder[230] = 'stage';
|
||||
|
||||
$lang->moduleOrder[230] = 'budget';
|
||||
$lang->moduleOrder[235] = 'workestimation';
|
||||
$lang->moduleOrder[240] = 'durationestimation';
|
||||
$lang->moduleOrder[235] = 'budget';
|
||||
$lang->moduleOrder[240] = 'workestimation';
|
||||
$lang->moduleOrder[245] = 'durationestimation';
|
||||
|
||||
$lang->moduleOrder[245] = 'subject';
|
||||
$lang->moduleOrder[250] = 'holiday';
|
||||
$lang->moduleOrder[250] = 'subject';
|
||||
$lang->moduleOrder[255] = 'holiday';
|
||||
|
||||
$lang->resource = new stdclass();
|
||||
|
||||
@@ -480,6 +481,16 @@ $lang->productplan->methodOrder[50] = 'unlinkBug';
|
||||
$lang->productplan->methodOrder[55] = 'batchUnlinkBug';
|
||||
$lang->productplan->methodOrder[60] = 'batchEdit';
|
||||
|
||||
/* Project Story. */
|
||||
$lang->resource->projectstory = new stdclass();
|
||||
$lang->resource->projectstory->requirement = 'requirement';
|
||||
$lang->resource->projectstory->story = 'story';
|
||||
$lang->resource->projectstory->track = 'track';
|
||||
|
||||
$lang->productplan->methodOrder[5] = 'requirement';
|
||||
$lang->productplan->methodOrder[10] = 'story';
|
||||
$lang->productplan->methodOrder[15] = 'track';
|
||||
|
||||
/* Release. */
|
||||
$lang->resource->release = new stdclass();
|
||||
$lang->resource->release->browse = 'browse';
|
||||
|
||||
+13
-15
@@ -104,9 +104,6 @@ class product extends control
|
||||
*/
|
||||
public function browse($productID = 0, $branch = '', $browseType = '', $param = 0, $storyType = 'story', $orderBy = '', $recTotal = 0, $recPerPage = 20, $pageID = 1)
|
||||
{
|
||||
$this->lang->product->menu = $this->lang->product->viewMenu;
|
||||
$this->lang->product->switcherMenu = $this->product->getSwitcher($productID, "storyType=$storyType", $branch);
|
||||
|
||||
/* Lower browse type. */
|
||||
$browseType = strtolower($browseType);
|
||||
|
||||
@@ -141,8 +138,13 @@ class product extends control
|
||||
$moduleID = ($browseType == 'bymodule') ? (int)$param : (($browseType == 'bysearch' or $browseType == 'bybranch') ? 0 : ($this->cookie->storyModule ? $this->cookie->storyModule : 0));
|
||||
$queryID = ($browseType == 'bysearch') ? (int)$param : 0;
|
||||
|
||||
/* Set menu. */
|
||||
$this->product->setMenu($this->products, $productID, $branch);
|
||||
/* Set menu. The projectstory module does not execute. */
|
||||
if($this->app->rawModule == 'product')
|
||||
{
|
||||
$this->lang->product->menu = $this->lang->product->viewMenu;
|
||||
$this->lang->product->switcherMenu = $this->product->getSwitcher($productID, "storyType=$storyType", $branch);
|
||||
$this->product->setMenu($this->products, $productID, $branch);
|
||||
}
|
||||
|
||||
/* Set moduleTree. */
|
||||
$createModuleLink = $storyType == 'story' ? 'createStoryLink' : 'createRequirementLink';
|
||||
@@ -150,11 +152,11 @@ class product extends control
|
||||
{
|
||||
setcookie('treeBranch', (int)$branch, 0, $this->config->webRoot, '', false, false);
|
||||
$browseType = 'unclosed';
|
||||
$moduleTree = $this->tree->getTreeMenu($productID, $viewType = 'story', $startModuleID = 0, array('treeModel', $createModuleLink), '', $branch, "¶m=$param&storyType=$storyType");
|
||||
$moduleTree = $this->tree->getTreeMenu($productID, 'story', $startModuleID = 0, array('treeModel', $createModuleLink), '', $branch, "¶m=$param&storyType=$storyType");
|
||||
}
|
||||
else
|
||||
{
|
||||
$moduleTree = $this->tree->getTreeMenu($productID, $viewType = 'story', $startModuleID = 0, array('treeModel', $createModuleLink), '', (int)$this->cookie->treeBranch, "¶m=$param&storyType=$storyType");
|
||||
$moduleTree = $this->tree->getTreeMenu($productID, 'story', $startModuleID = 0, array('treeModel', $createModuleLink), '', (int)$this->cookie->treeBranch, "¶m=$param&storyType=$storyType");
|
||||
}
|
||||
|
||||
if($browseType != 'bymodule' and $browseType != 'bybranch') $this->session->set('storyBrowseType', $browseType);
|
||||
@@ -173,11 +175,6 @@ class product extends control
|
||||
|
||||
/* Get stories. */
|
||||
$stories = $this->product->getStories($productID, $branch, $browseType, $queryID, $moduleID, $storyType, $sort, $pager);
|
||||
if(empty($stories) and $pageID > 1)
|
||||
{
|
||||
$pager = pager::init(0, $recPerPage, 1);
|
||||
$stories = $this->product->getStories($productID, $branch, $browseType, $queryID, $moduleID, $storyType, $sort, $pager);
|
||||
}
|
||||
|
||||
/* Process the sql, get the conditon partion, save it to session. */
|
||||
$this->loadModel('common')->saveQueryCondition($this->dao->get(), 'story', $browseType != 'bysearch');
|
||||
@@ -204,7 +201,9 @@ class product extends control
|
||||
}
|
||||
|
||||
/* Build search form. */
|
||||
$actionURL = $this->createLink('product', 'browse', "productID=$productID&branch=$branch&browseType=bySearch&queryID=myQueryID&storyType=$storyType");
|
||||
$rawModule = $this->app->rawModule;
|
||||
$rawMethod = $this->app->rawMethod;
|
||||
$actionURL = $this->createLink($rawModule, $rawMethod, "productID=$productID&branch=$branch&browseType=bySearch&queryID=myQueryID&storyType=$storyType");
|
||||
$this->config->product->search['onMenuBar'] = 'yes';
|
||||
$this->product->buildSearchForm($productID, $this->products, $queryID, $actionURL);
|
||||
|
||||
@@ -216,7 +215,6 @@ class product extends control
|
||||
$this->view->position[] = $this->products[$productID];
|
||||
$this->view->position[] = $this->lang->product->browse;
|
||||
$this->view->productID = $productID;
|
||||
$this->view->program = $this->loadModel('project')->getById($this->session->PRJ);
|
||||
$this->view->product = $this->product->getById($productID);
|
||||
$this->view->productName = $this->products[$productID];
|
||||
$this->view->moduleID = $moduleID;
|
||||
@@ -229,7 +227,7 @@ class product extends control
|
||||
$this->view->users = $this->user->getPairs('noletter|pofirst|nodeleted');
|
||||
$this->view->orderBy = $orderBy;
|
||||
$this->view->browseType = $browseType;
|
||||
$this->view->modules = $this->tree->getOptionMenu($productID, $viewType = 'story', 0, $branch);
|
||||
$this->view->modules = $this->tree->getOptionMenu($productID, 'story', 0, $branch);
|
||||
$this->view->moduleID = $moduleID;
|
||||
$this->view->moduleName = $moduleID ? $this->tree->getById($moduleID)->name : $this->lang->tree->all;
|
||||
$this->view->branch = $branch;
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
$(function()
|
||||
{
|
||||
$('#navbar .nav li').removeClass('active');
|
||||
$("#navbar .nav li[data-id=" + storyType + ']').addClass('active');
|
||||
if(typeof(rawModule) == 'undefined') rawModule = 'product';
|
||||
if(rawModule != 'projectstory')
|
||||
{
|
||||
$('#navbar .nav li').removeClass('active');
|
||||
$("#navbar .nav li[data-id=" + storyType + ']').addClass('active');
|
||||
}
|
||||
|
||||
if($('#storyList thead th.c-title').width() < 150) $('#storyList thead th.c-title').width(150);
|
||||
$('#storyList td.has-child .story-toggle').each(function()
|
||||
|
||||
@@ -1235,10 +1235,6 @@ class productModel extends model
|
||||
$extra = $extra ? $extra : 'gantt';
|
||||
$link = helper::createLink($module, 'browse', "projectID=%s&productID=%s&type=$extra" . ($branch ? "&branch=%s" : ''));
|
||||
}
|
||||
elseif($module == 'projectstory')
|
||||
{
|
||||
$link = helper::createLink($module, $method, "projectID=%s&productID=%s" . ($branch ? "&branch=%s" : ''));
|
||||
}
|
||||
else
|
||||
{
|
||||
$link = helper::createLink($module, $method, "productID=%s" . ($branch ? "&branch=%s" : ''));
|
||||
@@ -1281,7 +1277,7 @@ class productModel extends model
|
||||
*/
|
||||
public function setParamsForLink($module, $link, $projectID, $productID)
|
||||
{
|
||||
$linkHtml = strpos('programplan,projectstory', $module) !== false ? sprintf($link, $projectID, $productID) : sprintf($link, $productID);
|
||||
$linkHtml = strpos('programplan', $module) !== false ? sprintf($link, $projectID, $productID) : sprintf($link, $productID);
|
||||
return $linkHtml;
|
||||
}
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
<?php js::set('browseType', $browseType);?>
|
||||
<?php js::set('productID', $productID);?>
|
||||
<?php js::set('branch', $branch);?>
|
||||
<?php js::set('rawModule', $this->app->rawModule);?>
|
||||
<?php
|
||||
$unfoldStories = isset($config->product->browse->unfoldStories) ? json_decode($config->product->browse->unfoldStories, true) : array();
|
||||
$unfoldStories = zget($unfoldStories, $productID, array());
|
||||
@@ -31,7 +32,7 @@ $lang->story->create = $storyType == 'story' ? $lang->story->createStory : $lang
|
||||
echo $moduleName;
|
||||
if($moduleID)
|
||||
{
|
||||
$removeLink = $browseType == 'bymodule' ? $this->createLink('product', 'browse', "productID=$productID&branch=$branch&browseType=$browseType¶m=0&storyType=$storyType&orderBy=$orderBy&recTotal=0&recPerPage={$pager->recPerPage}") : 'javascript:removeCookieByKey("storyModule")';
|
||||
$removeLink = $browseType == 'bymodule' ? $this->createLink($this->app->rawModule, $this->app->rawMethod, "productID=$productID&branch=$branch&browseType=$browseType¶m=0&storyType=$storyType&orderBy=$orderBy&recTotal=0&recPerPage={$pager->recPerPage}") : 'javascript:removeCookieByKey("storyModule")';
|
||||
echo html::a($removeLink, "<i class='icon icon-sm icon-close'></i>", '', "class='text-muted'");
|
||||
}
|
||||
?>
|
||||
@@ -62,20 +63,20 @@ $lang->story->create = $storyType == 'story' ? $lang->story->createStory : $lang
|
||||
foreach($lang->product->moreSelects as $key => $value)
|
||||
{
|
||||
$active = $key == $storyBrowseType ? 'btn-active-text' : '';
|
||||
echo '<li>' . html::a($this->createLink('product', 'browse', "productID=$productID&branch=$branch&browseType=$key¶m=0&storyType=$storyType"), "<span class='text'>{$value}</span>", '', "class='btn btn-link $active'") . '</li>';
|
||||
echo '<li>' . html::a($this->createLink($this->app->rawModule, $this->app->rawMethod, "productID=$productID&branch=$branch&browseType=$key¶m=0&storyType=$storyType"), "<span class='text'>{$value}</span>", '', "class='btn btn-link $active'") . '</li>';
|
||||
}
|
||||
echo '</ul></div>';
|
||||
}
|
||||
}
|
||||
elseif($menuItem->name == 'QUERY')
|
||||
{
|
||||
$searchBrowseLink = $this->createLink('product', 'browse', "productID=$productID&branch=$branch&browseType=$menuBrowseType¶m=%s&storyType=$storyType");
|
||||
$searchBrowseLink = $this->createLink($this->app->rawModule, $this->app->rawMethod, "productID=$productID&branch=$branch&browseType=$menuBrowseType¶m=%s&storyType=$storyType");
|
||||
$isBySearch = $this->session->storyBrowseType == 'bysearch';
|
||||
include '../../common/view/querymenu.html.php';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo html::a($this->createLink('product', 'browse', "productID=$productID&branch=$branch&browseType=$menuBrowseType¶m=0&storyType=$storyType"), "<span class='text'>$menuItem->text</span>" . ($menuItem->name == $this->session->storyBrowseType ? ' <span class="label label-light label-badge">' . $pager->recTotal . '</span>' : ''), '', "id='{$menuItem->name}Tab' class='btn btn-link" . ($this->session->storyBrowseType == $menuItem->name ? ' btn-active-text' : '') . "'");
|
||||
echo html::a($this->createLink($this->app->rawModule, $this->app->rawMethod, "productID=$productID&branch=$branch&browseType=$menuBrowseType¶m=0&storyType=$storyType"), "<span class='text'>$menuItem->text</span>" . ($menuItem->name == $this->session->storyBrowseType ? ' <span class="label label-light label-badge">' . $pager->recTotal . '</span>' : ''), '', "id='{$menuItem->name}Tab' class='btn btn-link" . ($this->session->storyBrowseType == $menuItem->name ? ' btn-active-text' : '') . "'");
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -55,11 +55,13 @@
|
||||
<?php echo html::select('type', $productTypeList, 'normal', "class='form-control'");?>
|
||||
</td><td></td>
|
||||
</tr>
|
||||
<?php if($config->URAndSR):?>
|
||||
<tr>
|
||||
<th><?php echo $lang->product->storyConcept;?></th>
|
||||
<td><?php echo html::select('storyConcept', $lang->custom->URSRList, zget($config->custom, 'URSRName', 1), "class='form-control chosen'");?></td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<tr class='hide'>
|
||||
<th><?php echo $lang->product->status;?></th>
|
||||
<td><?php echo html::hidden('status', 'normal');?></td>
|
||||
|
||||
+17
-40
@@ -14,7 +14,6 @@ class program extends control
|
||||
{
|
||||
parent::__construct($moduleName, $methodName);
|
||||
$this->loadModel('project');
|
||||
$this->loadModel('programplan');
|
||||
$this->loadModel('group');
|
||||
}
|
||||
|
||||
@@ -685,11 +684,10 @@ class program extends control
|
||||
* @param int $programID
|
||||
* @param string $from PRJ|PGM
|
||||
* @param int $copyProjectID
|
||||
* @param int $projectID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function PRJCreate($model = 'waterfall', $programID = 0, $from = 'PRJ', $copyProjectID = '', $projectID = 0)
|
||||
public function PRJCreate($model = 'waterfall', $programID = 0, $from = 'PRJ', $copyProjectID = '')
|
||||
{
|
||||
$this->app->loadLang('custom');
|
||||
if($from == 'PRJ')
|
||||
@@ -702,17 +700,6 @@ class program extends control
|
||||
$this->lang->program->switcherMenu = $this->program->getPGMCommonAction();
|
||||
}
|
||||
|
||||
if($projectID)
|
||||
{
|
||||
$this->view->title = $this->lang->program->tips;
|
||||
$this->view->tips = $this->fetch('program', 'tips', "model=$model&programID=$programID&from=$from&projectID=$projectID");
|
||||
$this->view->programID = $programID;
|
||||
$this->view->from = $from;
|
||||
$this->view->projectID = $projectID;
|
||||
$this->display();
|
||||
exit;
|
||||
}
|
||||
|
||||
if($_POST)
|
||||
{
|
||||
$projectID = $this->program->PRJCreate();
|
||||
@@ -720,7 +707,16 @@ class program extends control
|
||||
|
||||
$this->loadModel('action')->create('project', $projectID, 'opened');
|
||||
|
||||
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $this->createLink('program', 'PRJCreate', "model=$model&programID=$programID&from=$from©ProjectID=&projectID=$projectID", '', '',$projectID)));
|
||||
if($from == 'PGM')
|
||||
{
|
||||
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => inlink('PGMBrowse')));
|
||||
}
|
||||
else
|
||||
{
|
||||
if($model == 'waterfall') $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $this->createLink('programplan', 'create', "projectID=$projectID", '', '', $projectID)));
|
||||
|
||||
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $this->createLink('project', 'create', '', '', '', $projectID)));
|
||||
}
|
||||
}
|
||||
|
||||
$name = '';
|
||||
@@ -1143,7 +1139,8 @@ class program extends control
|
||||
|
||||
if($this->post->comment != '' or !empty($changes))
|
||||
{
|
||||
$actionID = $this->action->create('program', $projectID, 'Started', $this->post->comment);
|
||||
$objectType = $project->type == 'program' ? 'program' : 'project';
|
||||
$actionID = $this->action->create($objectType, $projectID, 'Started', $this->post->comment);
|
||||
$this->action->logHistory($actionID, $changes);
|
||||
}
|
||||
$this->executeHooks($projectID);
|
||||
@@ -1178,7 +1175,8 @@ class program extends control
|
||||
|
||||
if($this->post->comment != '' or !empty($changes))
|
||||
{
|
||||
$actionID = $this->action->create('program', $projectID, 'Suspended', $this->post->comment);
|
||||
$objectType = $project->type == 'program' ? 'program' : 'project';
|
||||
$actionID = $this->action->create($objectType, $projectID, 'Suspended', $this->post->comment);
|
||||
$this->action->logHistory($actionID, $changes);
|
||||
}
|
||||
$this->executeHooks($projectID);
|
||||
@@ -1214,7 +1212,7 @@ class program extends control
|
||||
|
||||
if($this->post->comment != '' or !empty($changes))
|
||||
{
|
||||
$actionID = $this->action->create('program', $projectID, 'Closed', $this->post->comment);
|
||||
$actionID = $this->action->create('project', $projectID, 'Closed', $this->post->comment);
|
||||
$this->action->logHistory($actionID, $changes);
|
||||
}
|
||||
$this->executeHooks($projectID);
|
||||
@@ -1250,7 +1248,7 @@ class program extends control
|
||||
|
||||
if($this->post->comment != '' or !empty($changes))
|
||||
{
|
||||
$actionID = $this->action->create('program', $projectID, 'Activated', $this->post->comment);
|
||||
$actionID = $this->action->create('project', $projectID, 'Activated', $this->post->comment);
|
||||
$this->action->logHistory($actionID, $changes);
|
||||
}
|
||||
$this->executeHooks($projectID);
|
||||
@@ -1442,25 +1440,4 @@ class program extends control
|
||||
|
||||
echo $this->fetch('program', 'PGMProduct', "programID=$programID");
|
||||
}
|
||||
|
||||
/**
|
||||
* When create a project, help the user.
|
||||
*
|
||||
* @param string $model
|
||||
* @param int $programID
|
||||
* @param string $from PRJ|PGM
|
||||
* @param int $projectID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function tips($model = 'waterfall', $programID = 0, $from = 'PRJ', $projectID)
|
||||
{
|
||||
$this->view->model = $model;
|
||||
$this->view->programID = $programID;
|
||||
$this->view->from = $from;
|
||||
$this->view->projectID = $projectID;
|
||||
$this->view->project = $this->project->getById($projectID);
|
||||
|
||||
$this->display('program', 'tips');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,4 +8,3 @@
|
||||
#copyProjectModal a.active:after {position: absolute; content: '\e92f'; font-family: ZentaoIcon; font-size: 20px; right: 25px;}
|
||||
#copyProjectModal a.cancel {color: #ff5d5d}
|
||||
#budget {border-right:0px;}
|
||||
#tipsModal {margin-top: 10%;}
|
||||
|
||||
@@ -38,9 +38,6 @@ $lang->program->errorNoProducts = 'At least one product is associated';
|
||||
$lang->program->copyNoProject = 'There are no items available to copy.';
|
||||
$lang->program->PRJSource = 'Project source:';
|
||||
$lang->program->PRJStandalone = 'Projects that do not belong to a program.';
|
||||
$lang->program->tips = 'Note';
|
||||
$lang->program->setTeam = 'Set Team';
|
||||
$lang->program->goback = 'Go Back';
|
||||
|
||||
/* Fields. */
|
||||
$lang->program->common = 'Program';
|
||||
@@ -153,7 +150,6 @@ $lang->program->cannotCancelCat = "It has child projects, so you cannot unmark
|
||||
$lang->program->parentBeginEnd = "Parent begin&end date: %s ~ %s";
|
||||
$lang->program->childLongTime = "If a child as long-term projects, the parent should be long-term too.";
|
||||
$lang->program->readjustTime = 'Change the project begin&end date.';
|
||||
$lang->program->afterInfo = "Project is created. Next you can ";
|
||||
|
||||
$lang->program->PRJProgramTitle['0'] = 'Hide';
|
||||
$lang->program->PRJProgramTitle['base'] = 'Base-level program only';
|
||||
|
||||
@@ -38,9 +38,6 @@ $lang->program->errorNoProducts = 'At least one product is associated';
|
||||
$lang->program->copyNoProject = 'There are no items available to copy.';
|
||||
$lang->program->PRJSource = 'Project source:';
|
||||
$lang->program->PRJStandalone = 'Projects that do not belong to a program.';
|
||||
$lang->program->tips = 'Note';
|
||||
$lang->program->setTeam = 'Set Team';
|
||||
$lang->program->goback = 'Go Back';
|
||||
|
||||
/* Fields. */
|
||||
$lang->program->common = 'Program';
|
||||
@@ -153,7 +150,6 @@ $lang->program->cannotCancelCat = "It has child projects, so you cannot unmark
|
||||
$lang->program->parentBeginEnd = "Parent begin&end date: %s ~ %s";
|
||||
$lang->program->childLongTime = "If a child as long-term projects, the parent should be long-term too.";
|
||||
$lang->program->readjustTime = 'Change the project begin&end date.';
|
||||
$lang->program->afterInfo = "Project is created. Next you can ";
|
||||
|
||||
$lang->program->PRJProgramTitle['0'] = 'Hide';
|
||||
$lang->program->PRJProgramTitle['base'] = 'Base-level program only';
|
||||
|
||||
@@ -38,9 +38,6 @@ $lang->program->errorNoProducts = 'At least one product is associated';
|
||||
$lang->program->copyNoProject = 'There are no items available to copy.';
|
||||
$lang->program->PRJSource = 'Project source:';
|
||||
$lang->program->PRJStandalone = 'Projects that do not belong to a program.';
|
||||
$lang->program->tips = 'Note';
|
||||
$lang->program->setTeam = 'Set Team';
|
||||
$lang->program->goback = 'Go Back';
|
||||
|
||||
/* Fields. */
|
||||
$lang->program->common = 'Program';
|
||||
@@ -153,7 +150,6 @@ $lang->program->cannotCancelCat = "It has child projects, so you cannot unmark
|
||||
$lang->program->parentBeginEnd = "Parent begin&end date: %s ~ %s";
|
||||
$lang->program->childLongTime = "If a child as long-term projects, the parent should be long-term too.";
|
||||
$lang->program->readjustTime = 'Change the project begin&end date.';
|
||||
$lang->program->afterInfo = "Project is created. Next you can ";
|
||||
|
||||
$lang->program->PRJProgramTitle['0'] = 'Hide';
|
||||
$lang->program->PRJProgramTitle['base'] = 'Base-level program only';
|
||||
|
||||
@@ -38,9 +38,6 @@ $lang->program->errorNoProducts = 'At least one product is associated';
|
||||
$lang->program->copyNoProject = 'There are no items available to copy.';
|
||||
$lang->program->PRJSource = 'Project source:';
|
||||
$lang->program->PRJStandalone = 'Projects that do not belong to a program.';
|
||||
$lang->program->tips = 'Note';
|
||||
$lang->program->setTeam = 'Set Team';
|
||||
$lang->program->goback = 'Go Back';
|
||||
|
||||
/* Fields. */
|
||||
$lang->program->common = 'Program';
|
||||
@@ -153,7 +150,6 @@ $lang->program->cannotCancelCat = "It has child projects, so you cannot unmark
|
||||
$lang->program->parentBeginEnd = "Parent begin&end date: %s ~ %s";
|
||||
$lang->program->childLongTime = "If a child as long-term projects, the parent should be long-term too.";
|
||||
$lang->program->readjustTime = 'Change the project begin&end date.';
|
||||
$lang->program->afterInfo = "Project is created. Next you can ";
|
||||
|
||||
$lang->program->PRJProgramTitle['0'] = 'Hide';
|
||||
$lang->program->PRJProgramTitle['base'] = 'Base-level program only';
|
||||
|
||||
@@ -39,9 +39,6 @@ $lang->program->errorNoProducts = '最少关联一个产品';
|
||||
$lang->program->copyNoProject = '没有可用的项目来复制';
|
||||
$lang->program->PRJSource = '项目来源:';
|
||||
$lang->program->PRJStandalone = '没有所属项目集的项目';
|
||||
$lang->program->tips = '提示';
|
||||
$lang->program->setTeam = '设置团队';
|
||||
$lang->program->goback = '返回项目列表';
|
||||
|
||||
/* Fields. */
|
||||
$lang->program->common = '项目集';
|
||||
@@ -155,7 +152,6 @@ $lang->program->cannotCancelCat = "该项目下已经有子项目,无法取
|
||||
$lang->program->parentBeginEnd = "父项目起止时间:%s ~ %s";
|
||||
$lang->program->childLongTime = "子项目中有长期项目,父项目也应该是长期项目";
|
||||
$lang->program->readjustTime = '重新调整项目起止时间';
|
||||
$lang->program->afterInfo = "项目添加成功,您现在可以进行以下操作:";
|
||||
|
||||
$lang->program->PRJProgramTitle['0'] = '不显示';
|
||||
$lang->program->PRJProgramTitle['base'] = '只显示一级项目集';
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<th class='w-100px'><?php common::printOrderLink('end', $orderBy, $vars, $lang->program->end);?></th>
|
||||
<th class='w-100px'><?php common::printOrderLink('budget', $orderBy, $vars, $lang->program->PGMBudget);?></th>
|
||||
<th class='w-100px'><?php common::printOrderLink('PM', $orderBy, $vars, $lang->program->PGMPM);?></th>
|
||||
<th class='text-center w-200px'><?php echo $lang->actions;?></th>
|
||||
<th class='text-center w-240px'><?php echo $lang->actions;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id='programTableList'>
|
||||
@@ -71,6 +71,8 @@
|
||||
<?php else:?>
|
||||
<?php common::printIcon('program', 'PRJGroup', "programID=$program->id", $program, 'list', 'icon icon-lock');?>
|
||||
<?php common::printIcon('program', 'PRJManageMembers', "programID=$program->id", $program, 'list', 'persons');?>
|
||||
<?php common::printIcon('program', 'PRJWhitelist', "projectID=$program->id", $program, 'list', 'group');?>
|
||||
<?php common::printIcon('program', 'PRJManageProducts', "projectID=$program->id", $program, 'list', 'icon icon-menu-project');?>
|
||||
<?php common::printIcon('program', 'PRJStart', "programID=$program->id", $program, 'list', 'play', '', 'iframe', true);?>
|
||||
<?php if(common::hasPriv('program','PRJEdit')) echo html::a($this->createLink("program", "prjedit", "programID=$program->id"), "<i class='icon-edit'></i>", '', "class='btn' title='{$this->lang->program->PRJEdit}'");?>
|
||||
<?php common::printIcon('program', 'PRJCreate', "programID=$program->id", '', 'list', 'treemap-alt', '', 'disabled', '', '', $this->lang->program->PGMChildren);?>
|
||||
|
||||
@@ -10,32 +10,6 @@
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<?php if(isset($tips)):?>
|
||||
<?php
|
||||
if($from == 'PRJ')
|
||||
{
|
||||
$defaultURL = $this->createLink('program', 'PRJBrowse', "programID=$programID&browseType=all");
|
||||
}
|
||||
else
|
||||
{
|
||||
$defaultURL = $this->createLink('program', 'PGMBrowse');
|
||||
}
|
||||
?>
|
||||
<?php include '../../common/view/header.lite.html.php';?>
|
||||
<body>
|
||||
<div class='modal-dialog mw-500px' id='tipsModal'>
|
||||
<div class='modal-header'>
|
||||
<a href='<?php echo $defaultURL;?>' class='close'><i class="icon icon-close"></i></a>
|
||||
<h4 class='modal-title' id='myModalLabel'><?php echo $lang->program->tips;?></h4>
|
||||
</div>
|
||||
<div class='modal-body'>
|
||||
<?php echo $tips;?>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
<?php exit;?>
|
||||
<?php endif;?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php include '../../common/view/kindeditor.html.php';?>
|
||||
<?php js::import($jsRoot . 'misc/date.js');?>
|
||||
@@ -156,12 +130,14 @@ else
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<?php $this->printExtendFields('', 'table');?>
|
||||
<?php if($config->URAndSR):?>
|
||||
<tr>
|
||||
<th><?php echo $lang->program->PRJStoryConcept;?></th>
|
||||
<td>
|
||||
<?php echo html::select('storyConcept', $lang->custom->URSRList, zget($config->custom, 'URSRName', 1), "class='form-control chosen'");?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<tr>
|
||||
<th><?php echo $lang->program->PRJDesc;?></th>
|
||||
<td colspan='3'>
|
||||
|
||||
@@ -128,12 +128,14 @@
|
||||
<td></td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<?php if($config->URAndSR):?>
|
||||
<tr>
|
||||
<th><?php echo $lang->program->PRJStoryConcept;?></th>
|
||||
<td>
|
||||
<?php echo html::select('storyConcept', $lang->custom->URSRList, $project->storyConcept, "class='form-control chosen'");?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<tr>
|
||||
<th><?php echo $lang->program->PRJDesc;?></th>
|
||||
<td colspan='3'>
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* The tips view file of program module of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2020 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @license ZPL (http://zpl.pub/page/zplv12.html)
|
||||
* @author Shujie Tian <tianshujie@easycorp.ltd>
|
||||
* @package program
|
||||
* @version $Id: tips.html.php 4769 2020-11-24 09:24:21Z tianshujie $
|
||||
* @link https://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<div style='margin: 0 auto; max-width: 400px'>
|
||||
<p><strong><?php echo $lang->program->afterInfo;?></strong></p>
|
||||
<div>
|
||||
<?php echo html::a($this->createLink('program', 'PRJManageMembers', "projectID=$projectID", '', '', $projectID), $lang->program->setTeam, '', "class='btn'");?>
|
||||
<?php
|
||||
if($model == 'waterfall')
|
||||
{
|
||||
echo html::a($this->createLink('programplan', 'create', "projectID=$projectID", '', '', $projectID), $lang->programplan->create, '', "class='btn'");
|
||||
}
|
||||
else
|
||||
{
|
||||
echo html::a($this->createLink('project', 'create', '', '', '', $projectID), $lang->project->create, '', "class='btn'");
|
||||
}
|
||||
?>
|
||||
<?php if($project->type != 'ops') echo html::a($this->createLink('program', 'PRJManageProducts', "projectID=$projectID&programID=$programID", '', '', $projectID), $lang->program->PRJManageProducts, '', "class='btn'");?>
|
||||
<?php
|
||||
if($from = 'PMG')
|
||||
{
|
||||
echo html::a($this->createLink('program', 'PRJBrowse', '', '', '', $projectID), $lang->program->goback, '', "class='btn'");
|
||||
}
|
||||
else
|
||||
{
|
||||
echo html::a($this->createLink('program', 'PRJBrowse', "programID=$programID&browseType=all", '', '', $projectID), $lang->program->goback, '', "class='btn'");
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
@@ -424,6 +424,7 @@ class programplanModel extends model
|
||||
$parentStage = $this->getByID($parentID);
|
||||
$parentAttribute = $parentStage->attribute;
|
||||
$parentPercent = $parentStage->percent;
|
||||
$parentACL = $parentStage->acl;
|
||||
}
|
||||
|
||||
$attributes = array_values($attributes);
|
||||
@@ -447,7 +448,7 @@ class programplanModel extends model
|
||||
$plan->realBegan = empty($realBegan[$key]) ? '0000-00-00' : $realBegan[$key];
|
||||
$plan->realEnd = empty($realEnd[$key]) ? '0000-00-00' : $realEnd[$key];
|
||||
$plan->output = empty($output[$key]) ? '' : implode(',', $output[$key]);
|
||||
$plan->acl = $acl[$key];
|
||||
$plan->acl = empty($parentID) ? $acl[$key] : $parentACL;
|
||||
|
||||
$datas[] = $plan;
|
||||
}
|
||||
@@ -543,7 +544,7 @@ class programplanModel extends model
|
||||
{
|
||||
unset($data->id);
|
||||
$data->status = 'wait';
|
||||
$data->acl = 'open';
|
||||
$data->acl = $data->parent == 0 ? 'open' : $this->dao->findByID($data->parent)->from(TABLE_PROJECT)->fetch('acl');
|
||||
$data->version = 1;
|
||||
$data->parentVersion = $data->parent == 0 ? 0 : $this->dao->findByID($data->parent)->from(TABLE_PROJECT)->fetch('version');
|
||||
$data->team = substr($data->name,0, 30);
|
||||
@@ -559,6 +560,8 @@ class programplanModel extends model
|
||||
if(!dao::isError())
|
||||
{
|
||||
$stageID = $this->dao->lastInsertID();
|
||||
|
||||
if($data->acl != 'open') $this->user->updateUserView($stageID, 'sprint');
|
||||
$this->dao->update(TABLE_PROJECT)->set('`order`')->eq($stageID * 5)->where('id')->eq($stageID)->exec();
|
||||
|
||||
/* Create doc lib. */
|
||||
@@ -660,6 +663,7 @@ class programplanModel extends model
|
||||
{
|
||||
$parentPlan = $this->getByID($plan->parent);
|
||||
$plan->attribute = $parentPlan->attribute;
|
||||
$plan->acl = $parentPlan->acl;
|
||||
$parentPercent = $parentPlan->percent;
|
||||
|
||||
$childrenTotalPercent = $this->getTotalPercent($parentPlan, true);
|
||||
@@ -677,6 +681,8 @@ class programplanModel extends model
|
||||
}
|
||||
else
|
||||
{
|
||||
$childrenIDList = $this->dao->select('*')->from(TABLE_PROJECT)->where('parent')->eq($oldPlan->id)->fetch('id');
|
||||
if(!empty($childrenIDList)) $this->dao->update(TABLE_PROJECT)->set('acl')->eq($plan->acl)->where('id')->in($childrenIDList)->exec();
|
||||
/* The workload of the parent plan cannot exceed 100%. */
|
||||
$oldPlan->parent = $plan->parent;
|
||||
$totalPercent = $this->getTotalPercent($oldPlan);
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<?php $hideAttribute = $planID == 0 ? '' : ' hidden'?>
|
||||
<?php $class = $planID == 0 ? '' : "disabled='disabled'"?>
|
||||
<div id='mainContent' class='main-content'>
|
||||
<form class='main-form form-ajax' method='post' id='planForm' enctype='multipart/form-data'>
|
||||
<table class='table table-form'>
|
||||
@@ -53,7 +54,7 @@
|
||||
</div>
|
||||
</td>
|
||||
<td class='<?php echo $hideAttribute?>'><?php echo html::select("attributes[$i]", $lang->stage->typeList, $stage->type, "class='form-control'");?></td>
|
||||
<td><?php echo html::select("acl[]", $lang->project->aclList, 'open', 'class="form-control"');?></td>
|
||||
<td><?php echo html::select("acl[]", $lang->project->aclList, 'open', "class='form-control' $class");?></td>
|
||||
<td><?php echo html::radio("milestone[$i]", $lang->programplan->milestoneList, 0);?></td>
|
||||
<td><input type='text' name='begin[]' id='begin<?php echo $i;?>' value='' class='form-control form-date' /></td>
|
||||
<td><input type='text' name='end[]' id='end<?php echo $i;?>' value='' class='form-control form-date' /></td>
|
||||
@@ -84,7 +85,7 @@
|
||||
</div>
|
||||
</td>
|
||||
<td class='<?php echo $hideAttribute?>'><?php echo html::select("attributes[$i]", $lang->stage->typeList, $plan->attribute, "class='form-control'");?></td>
|
||||
<td><?php echo html::select("acl[]", $lang->project->aclList, $plan->acl, 'class="form-control"');?></td>
|
||||
<td><?php echo html::select("acl[]", $lang->project->aclList, $plan->acl, "class='form-control' $class");?></td>
|
||||
<td><?php echo html::radio("milestone[$i]", $lang->programplan->milestoneList, $plan->milestone, $disabled);?></td>
|
||||
<td><input type='text' name='begin[] ' id='begin<?php echo $i;?>' value='<?php echo $plan->begin;?>' class='form-control form-date' /></td>
|
||||
<td><input type='text' name='end[]' id='end<?php echo $i;?>' value='<?php echo $plan->end;?>' class='form-control form-date' /></td>
|
||||
@@ -112,7 +113,7 @@
|
||||
</div>
|
||||
</td>
|
||||
<td class='<?php echo $hideAttribute?>'><?php echo html::select("attributes[$i]", $lang->stage->typeList, '', "class='form-control'");?></td>
|
||||
<td><?php echo html::select("acl[]", $lang->project->aclList, 'open', 'class="form-control"');?></td>
|
||||
<td><?php echo html::select("acl[]", $lang->project->aclList, 'open', "class='form-control' $class");?></td>
|
||||
<td><?php echo html::radio("milestone[$i]", $lang->programplan->milestoneList, 0);?></td>
|
||||
<td><input type='text' name='begin[] ' id='begin<?php echo $i;?>' value='' class='form-control form-date' /></td>
|
||||
<td><input type='text' name='end[]' id='end<?php echo $i;?>' value='' class='form-control form-date' /></td>
|
||||
@@ -151,7 +152,7 @@
|
||||
</div>
|
||||
</td>
|
||||
<td class='<?php echo $hideAttribute?>'><?php echo html::select("attributes[$i]", $lang->stage->typeList, '', "class='form-control'");?></td>
|
||||
<td><?php echo html::select("acl[]", $lang->project->aclList, 'open', 'class="form-control"');?></td>
|
||||
<td><?php echo html::select("acl[]", $lang->project->aclList, 'open', "class='form-control' $class");?></td>
|
||||
<td><?php echo html::radio("milestone[$i]", $lang->programplan->milestoneList, 0);?></td>
|
||||
<td><input type='text' name='begin[] ' id='begin<?php echo $i;?>' class='form-control form-date' /></td>
|
||||
<td><input type='text' name='end[]' id='end<?php echo $i;?>' class='form-control form-date' /></td>
|
||||
|
||||
@@ -57,7 +57,8 @@
|
||||
<?php endif;?>
|
||||
<tr>
|
||||
<th><?php echo $lang->project->acl;?> </th>
|
||||
<td><?php echo html::select('acl', $lang->project->aclList, $plan->acl, 'class="form-control"');?></td>
|
||||
<?php $class = $plan->grade == 2 ? "disabled='disabled'" : '';?>
|
||||
<td><?php echo html::select('acl', $lang->project->aclList, $plan->acl, "class='form-control' $class");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->programplan->begin;?> </th>
|
||||
|
||||
+17
-17
@@ -81,7 +81,7 @@ class project extends control
|
||||
$products = $this->project->getProducts($projectID);
|
||||
$childProjects = $this->project->getChildExecutions($projectID);
|
||||
$teamMembers = $this->project->getTeamMembers($projectID);
|
||||
$actions = $this->loadModel('action')->getList('project', $projectID);
|
||||
$actions = $this->loadModel('action')->getList('execution', $projectID);
|
||||
|
||||
/* Set menu. */
|
||||
$this->project->setMenu($this->projects, $projectID, $buildID = 0, $extra);
|
||||
@@ -1149,7 +1149,7 @@ class project extends control
|
||||
$this->project->updateProducts($projectID);
|
||||
if(dao::isError()) $this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
|
||||
$this->loadModel('action')->create('project', $projectID, 'opened', '', join(',', $_POST['products']));
|
||||
$this->loadModel('action')->create('execution', $projectID, 'opened', '', join(',', $_POST['products']));
|
||||
|
||||
$this->executeHooks($projectID);
|
||||
|
||||
@@ -1239,7 +1239,7 @@ class project extends control
|
||||
$this->loadModel('action');
|
||||
$this->dao->update(TABLE_PROJECT)->set('deleted')->eq(0)->where('id')->eq($projectID)->exec();
|
||||
$this->dao->update(TABLE_ACTION)->set('extra')->eq(ACTIONMODEL::BE_UNDELETED)->where('id')->eq($extra)->exec();
|
||||
$this->action->create('project', $projectID, 'undeleted');
|
||||
$this->action->create('execution', $projectID, 'undeleted');
|
||||
}
|
||||
$oldProducts = array_keys($oldProducts);
|
||||
$newProducts = $this->project->getProducts($projectID);
|
||||
@@ -1249,7 +1249,7 @@ class project extends control
|
||||
|
||||
if($changes or $diffProducts)
|
||||
{
|
||||
$actionID = $this->loadModel('action')->create('project', $projectID, 'edited', '', $products);
|
||||
$actionID = $this->loadModel('action')->create('execution', $projectID, 'edited', '', $products);
|
||||
$this->action->logHistory($actionID, $changes);
|
||||
}
|
||||
$this->executeHooks($projectID);
|
||||
@@ -1352,7 +1352,7 @@ class project extends control
|
||||
{
|
||||
if(empty($changes)) continue;
|
||||
|
||||
$actionID = $this->loadModel('action')->create('project', $projectID, 'Edited');
|
||||
$actionID = $this->loadModel('action')->create('execution', $projectID, 'Edited');
|
||||
$this->action->logHistory($actionID, $changes);
|
||||
}
|
||||
}
|
||||
@@ -1425,7 +1425,7 @@ class project extends control
|
||||
|
||||
if($this->post->comment != '' or !empty($changes))
|
||||
{
|
||||
$actionID = $this->action->create('project', $projectID, 'Started', $this->post->comment);
|
||||
$actionID = $this->action->create('execution', $projectID, 'Started', $this->post->comment);
|
||||
$this->action->logHistory($actionID, $changes);
|
||||
}
|
||||
$this->executeHooks($projectID);
|
||||
@@ -1436,7 +1436,7 @@ class project extends control
|
||||
$this->view->position[] = html::a($this->createLink('project', 'browse', "projectID=$projectID"), $this->view->project->name);
|
||||
$this->view->position[] = $this->lang->project->start;
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter');
|
||||
$this->view->actions = $this->loadModel('action')->getList('project', $projectID);
|
||||
$this->view->actions = $this->loadModel('action')->getList('execution', $projectID);
|
||||
$this->display();
|
||||
}
|
||||
|
||||
@@ -1460,7 +1460,7 @@ class project extends control
|
||||
|
||||
if($this->post->comment != '' or !empty($changes))
|
||||
{
|
||||
$actionID = $this->action->create('project', $projectID, 'Delayed', $this->post->comment);
|
||||
$actionID = $this->action->create('execution', $projectID, 'Delayed', $this->post->comment);
|
||||
$this->action->logHistory($actionID, $changes);
|
||||
}
|
||||
$this->executeHooks($projectID);
|
||||
@@ -1471,7 +1471,7 @@ class project extends control
|
||||
$this->view->position[] = html::a($this->createLink('project', 'browse', "projectID=$projectID"), $this->view->project->name);
|
||||
$this->view->position[] = $this->lang->project->putoff;
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter');
|
||||
$this->view->actions = $this->loadModel('action')->getList('project', $projectID);
|
||||
$this->view->actions = $this->loadModel('action')->getList('execution', $projectID);
|
||||
$this->display();
|
||||
}
|
||||
|
||||
@@ -1495,7 +1495,7 @@ class project extends control
|
||||
|
||||
if($this->post->comment != '' or !empty($changes))
|
||||
{
|
||||
$actionID = $this->action->create('project', $projectID, 'Suspended', $this->post->comment);
|
||||
$actionID = $this->action->create('execution', $projectID, 'Suspended', $this->post->comment);
|
||||
$this->action->logHistory($actionID, $changes);
|
||||
}
|
||||
$this->executeHooks($projectID);
|
||||
@@ -1506,7 +1506,7 @@ class project extends control
|
||||
$this->view->position[] = html::a($this->createLink('project', 'browse', "projectID=$projectID"), $this->view->project->name);
|
||||
$this->view->position[] = $this->lang->project->suspend;
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter');
|
||||
$this->view->actions = $this->loadModel('action')->getList('project', $projectID);
|
||||
$this->view->actions = $this->loadModel('action')->getList('execution', $projectID);
|
||||
$this->display();
|
||||
}
|
||||
|
||||
@@ -1530,7 +1530,7 @@ class project extends control
|
||||
|
||||
if($this->post->comment != '' or !empty($changes))
|
||||
{
|
||||
$actionID = $this->action->create('project', $projectID, 'Activated', $this->post->comment);
|
||||
$actionID = $this->action->create('execution', $projectID, 'Activated', $this->post->comment);
|
||||
$this->action->logHistory($actionID, $changes);
|
||||
}
|
||||
$this->executeHooks($projectID);
|
||||
@@ -1546,7 +1546,7 @@ class project extends control
|
||||
$this->view->position[] = $this->lang->project->activate;
|
||||
$this->view->project = $project;
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter');
|
||||
$this->view->actions = $this->loadModel('action')->getList('project', $projectID);
|
||||
$this->view->actions = $this->loadModel('action')->getList('execution', $projectID);
|
||||
$this->view->newBegin = $newBegin;
|
||||
$this->view->newEnd = $newEnd;
|
||||
$this->display();
|
||||
@@ -1572,7 +1572,7 @@ class project extends control
|
||||
|
||||
if($this->post->comment != '' or !empty($changes))
|
||||
{
|
||||
$actionID = $this->action->create('project', $projectID, 'Closed', $this->post->comment);
|
||||
$actionID = $this->action->create('execution', $projectID, 'Closed', $this->post->comment);
|
||||
$this->action->logHistory($actionID, $changes);
|
||||
}
|
||||
$this->executeHooks($projectID);
|
||||
@@ -1583,7 +1583,7 @@ class project extends control
|
||||
$this->view->position[] = html::a($this->createLink('project', 'browse', "projectID=$projectID"), $this->view->project->name);
|
||||
$this->view->position[] = $this->lang->project->close;
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter');
|
||||
$this->view->actions = $this->loadModel('action')->getList('project', $projectID);
|
||||
$this->view->actions = $this->loadModel('action')->getList('execution', $projectID);
|
||||
$this->display();
|
||||
}
|
||||
|
||||
@@ -1628,7 +1628,7 @@ class project extends control
|
||||
$this->view->products = $products;
|
||||
$this->view->branchGroups = $this->loadModel('branch')->getByProducts(array_keys($products), '', $linkedBranches);
|
||||
$this->view->planGroups = $this->project->getPlans($products);
|
||||
$this->view->actions = $this->loadModel('action')->getList('project', $projectID);
|
||||
$this->view->actions = $this->loadModel('action')->getList('execution', $projectID);
|
||||
$this->view->dynamics = $this->loadModel('action')->getDynamic('all', 'all', 'date_desc', $pager, 'all', $projectID);
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter');
|
||||
$this->view->teamMembers = $this->project->getTeamMembers($projectID);
|
||||
@@ -1947,7 +1947,7 @@ class project extends control
|
||||
$newProducts = $this->project->getProducts($projectID);
|
||||
$newProducts = array_keys($newProducts);
|
||||
$diffProducts = array_merge(array_diff($oldProducts, $newProducts), array_diff($newProducts, $oldProducts));
|
||||
if($diffProducts) $this->loadModel('action')->create('project', $projectID, 'Managed', '', !empty($_POST['products']) ? join(',', $_POST['products']) : '');
|
||||
if($diffProducts) $this->loadModel('action')->create('execution', $projectID, 'Managed', '', !empty($_POST['products']) ? join(',', $_POST['products']) : '');
|
||||
|
||||
die(js::locate($browseProjectLink));
|
||||
}
|
||||
|
||||
@@ -77,9 +77,7 @@ class projectModel extends model
|
||||
|
||||
if(!$projectID and $this->session->project) $projectID = $this->session->project;
|
||||
|
||||
/* Get project and program */
|
||||
$project = $this->getById($projectID);
|
||||
|
||||
$isProgram = false;
|
||||
if(!empty($project))
|
||||
{
|
||||
@@ -436,13 +434,14 @@ class projectModel extends model
|
||||
$project = fixer::input('post')
|
||||
->setIF($this->post->begin == '0000-00-00', 'begin', '')
|
||||
->setIF($this->post->end == '0000-00-00', 'end', '')
|
||||
->setIF($this->post->acl == 'open', 'whitelist', '')
|
||||
->setDefault('team', $this->post->name)
|
||||
->join('whitelist', ',')
|
||||
->stripTags($this->config->project->editor->edit['id'], $this->config->allowedTags)
|
||||
->remove('products, branch, uid, plans')
|
||||
->get();
|
||||
|
||||
if(!isset($project->acl)) $project->acl = $oldProject->acl;
|
||||
if($project->acl == 'open') $project->whitelist = '';
|
||||
$project = $this->loadModel('file')->processImgURL($project, $this->config->project->editor->edit['id'], $this->post->uid);
|
||||
|
||||
/* Check the workload format. */
|
||||
|
||||
@@ -170,7 +170,8 @@
|
||||
<?php $this->printExtendFields($project, 'table');?>
|
||||
<tr>
|
||||
<th><?php echo $lang->project->acl;?></th>
|
||||
<td colspan='2'><?php echo nl2br(html::radio('acl', $lang->project->aclList, $project->acl, "onclick='setWhite(this.value);'", 'block'));?></td>
|
||||
<?php $class = $project->grade == 2 ? "disabled='disabled'" : '';?>
|
||||
<td colspan='2'><?php echo nl2br(html::radio('acl', $lang->project->aclList, $project->acl, "onclick='setWhite(this.value);' $class", 'block'));?></td>
|
||||
</tr>
|
||||
<tr class="<?php if($project->acl == 'open') echo 'hidden';?>" id="whitelistBox">
|
||||
<th><?php echo $lang->whitelist;?></th>
|
||||
|
||||
@@ -228,6 +228,51 @@ class projectrelease extends control
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete a release.
|
||||
*
|
||||
* @param int $releaseID
|
||||
* @param string $confirm yes|no
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function delete($releaseID, $confirm = 'no')
|
||||
{
|
||||
if($confirm == 'no')
|
||||
{
|
||||
die(js::confirm($this->lang->release->confirmDelete, $this->createLink('projectrelease', 'delete', "releaseID=$releaseID&confirm=yes")));
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->release->delete(TABLE_RELEASE, $releaseID);
|
||||
|
||||
$release = $this->dao->select('*')->from(TABLE_RELEASE)->where('id')->eq((int)$releaseID)->fetch();
|
||||
$build = $this->dao->select('*')->from(TABLE_BUILD)->where('id')->eq((int)$release->build)->fetch();
|
||||
if(empty($build->project)) $this->loadModel('build')->delete(TABLE_BUILD, $build->id);
|
||||
|
||||
$this->executeHooks($releaseID);
|
||||
|
||||
/* if ajax request, send result. */
|
||||
if($this->server->ajax)
|
||||
{
|
||||
if(dao::isError())
|
||||
{
|
||||
$response['result'] = 'fail';
|
||||
$response['message'] = dao::getError();
|
||||
}
|
||||
else
|
||||
{
|
||||
$response['result'] = 'success';
|
||||
$response['message'] = '';
|
||||
$release = $this->release->getById($releaseID);
|
||||
$this->dao->update(TABLE_BUILD)->set('deleted')->eq(1)->where('id')->eq($release->build)->andWhere('name')->eq($release->name)->exec();
|
||||
}
|
||||
$this->send($response);
|
||||
}
|
||||
die(js::locate($this->session->releaseList, 'parent'));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Export the stories of release to HTML.
|
||||
*
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
<div class="table-empty-tip">
|
||||
<p>
|
||||
<span class="text-muted"><?php echo $lang->release->noRelease;?></span>
|
||||
<?php if(common::canModify('product', $product) and common::hasPriv('release', 'create')):?>
|
||||
<?php if(common::canModify('product', $product) and common::hasPriv('projectrelease', 'create')):?>
|
||||
<?php echo html::a($this->createLink('projectrelease', 'create', "productID=$product->id&branch=$branch"), "<i class='icon icon-plus'></i> " . $lang->release->create, '', "class='btn btn-info'");?>
|
||||
<?php endif;?>
|
||||
</p>
|
||||
@@ -58,7 +58,7 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($releases as $release):?>
|
||||
<?php $canBeChanged = common::canBeChanged('release', $release);?>
|
||||
<?php $canBeChanged = common::canBeChanged('projectrelease', $release);?>
|
||||
<tr>
|
||||
<td><?php echo html::a(inlink('view', "releaseID=$release->id"), sprintf('%03d', $release->id));?></td>
|
||||
<td>
|
||||
@@ -81,17 +81,17 @@
|
||||
<?php
|
||||
if($canBeChanged)
|
||||
{
|
||||
if(common::hasPriv('release', 'linkStory')) echo html::a(inlink('view', "releaseID=$release->id&type=story&link=true"), '<i class="icon-link"></i> ', '', "class='btn' title='{$lang->release->linkStory}'");
|
||||
if(common::hasPriv('release', 'linkBug')) echo html::a(inlink('view', "releaseID=$release->id&type=bug&link=true"), '<i class="icon-bug"></i> ', '', "class='btn' title='{$lang->release->linkBug}'");
|
||||
if(common::hasPriv('release', 'changeStatus', $release))
|
||||
if(common::hasPriv('projectrelease', 'linkStory')) echo html::a(inlink('view', "releaseID=$release->id&type=story&link=true"), '<i class="icon-link"></i> ', '', "class='btn' title='{$lang->release->linkStory}'");
|
||||
if(common::hasPriv('projectrelease', 'linkBug')) echo html::a(inlink('view', "releaseID=$release->id&type=bug&link=true"), '<i class="icon-bug"></i> ', '', "class='btn' title='{$lang->release->linkBug}'");
|
||||
if(common::hasPriv('projectrelease', 'changeStatus', $release))
|
||||
{
|
||||
$changedStatus = $release->status == 'normal' ? 'terminate' : 'normal';
|
||||
echo html::a($this->createLink('release', 'changeStatus', "releaseID=$release->id&status=$changedStatus"), '<i class="icon-' . ($release->status == 'normal' ? 'pause' : 'play') . '"></i> ', 'hiddenwin', "class='btn' title='{$lang->release->changeStatusList[$changedStatus]}'");
|
||||
echo html::a($this->createLink('projectrelease', 'changeStatus', "releaseID=$release->id&status=$changedStatus"), '<i class="icon-' . ($release->status == 'normal' ? 'pause' : 'play') . '"></i> ', 'hiddenwin', "class='btn' title='{$lang->release->changeStatusList[$changedStatus]}'");
|
||||
}
|
||||
common::printIcon('projectrelease', 'edit', "release=$release->id", $release, 'list');
|
||||
if(common::hasPriv('release', 'delete', $release))
|
||||
if(common::hasPriv('projectrelease', 'delete', $release))
|
||||
{
|
||||
$deleteURL = $this->createLink('release', 'delete', "releaseID=$release->id&confirm=yes");
|
||||
$deleteURL = $this->createLink('projectrelease', 'delete', "releaseID=$release->id&confirm=yes");
|
||||
echo html::a("javascript:ajaxDelete(\"$deleteURL\", \"releaseList\", confirmDelete)", '<i class="icon-trash"></i>', '', "class='btn' title='{$lang->release->delete}'");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,19 +31,19 @@
|
||||
</div>
|
||||
<div class='btn-toolbar pull-right'>
|
||||
<?php
|
||||
$canBeChanged = common::canBeChanged('release', $release);
|
||||
$canBeChanged = common::canBeChanged('projectrelease', $release);
|
||||
|
||||
if(!$release->deleted and $canBeChanged)
|
||||
{
|
||||
echo $this->buildOperateMenu($release, 'view');
|
||||
|
||||
if(common::hasPriv('release', 'changeStatus', $release))
|
||||
if(common::hasPriv('projectrelease', 'changeStatus', $release))
|
||||
{
|
||||
$changedStatus = $release->status == 'normal' ? 'terminate' : 'normal';
|
||||
echo html::a(inlink('changeStatus', "releaseID=$release->id&status=$changedStatus"), '<i class="icon-' . ($release->status == 'normal' ? 'pause' : 'play') . '"></i> ' . $lang->release->changeStatusList[$changedStatus], 'hiddenwin', "class='btn btn-link' title='{$lang->release->changeStatusList[$changedStatus]}'");
|
||||
}
|
||||
if(common::hasPriv('release', 'edit')) echo html::a(inlink('edit', "releaseID=$release->id"), "<i class='icon-common-edit icon-edit'></i> " . $this->lang->edit, '', "class='btn btn-link' title='{$this->lang->edit}'");
|
||||
if(common::hasPriv('release', 'delete')) echo html::a(inlink('delete', "releaseID=$release->id"), "<i class='icon-common-delete icon-trash'></i> " . $this->lang->delete, '', "class='btn btn-link' title='{$this->lang->delete}' target='hiddenwin'");
|
||||
if(common::hasPriv('projectrelease', 'edit')) echo html::a(inlink('edit', "releaseID=$release->id"), "<i class='icon-common-edit icon-edit'></i> " . $this->lang->edit, '', "class='btn btn-link' title='{$this->lang->edit}'");
|
||||
if(common::hasPriv('projectrelease', 'delete')) echo html::a(inlink('delete', "releaseID=$release->id"), "<i class='icon-common-delete icon-trash'></i> " . $this->lang->delete, '', "class='btn btn-link' title='{$this->lang->delete}' target='hiddenwin'");
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
@@ -59,19 +59,19 @@
|
||||
<li <?php if($type == 'leftBug') echo "class='active'"?>><a href='#leftBugs' data-toggle='tab'><?php echo html::icon($lang->icons['bug'], 'text-red') . ' ' . $lang->release->generatedBugs;?></a></li>
|
||||
<li <?php if($type == 'releaseInfo') echo "class='active'"?>><a href='#releaseInfo' data-toggle='tab'><?php echo html::icon($lang->icons['plan'], 'text-info') . ' ' . $lang->release->view;?></a></li>
|
||||
<?php if($countStories or $countBugs or $countLeftBugs):?>
|
||||
<li class='pull-right'><div><?php common::printIcon('release', 'export', '', '', 'button', '', '', "export btn-sm");?></div></li>
|
||||
<li class='pull-right'><div><?php common::printIcon('projectrelease', 'export', '', '', 'button', '', '', "export btn-sm");?></div></li>
|
||||
<?php endif;?>
|
||||
</ul>
|
||||
<div class='tab-content'>
|
||||
<div class='tab-pane <?php if($type == 'story') echo 'active'?>' id='stories'>
|
||||
<?php if(common::hasPriv('release', 'linkStory') and $canBeChanged):?>
|
||||
<?php if(common::hasPriv('projectrelease', 'linkStory') and $canBeChanged):?>
|
||||
<div class='actions'><?php echo html::a("javascript:showLink({$release->id}, \"story\")", '<i class="icon-link"></i> ' . $lang->release->linkStory, '', "class='btn btn-primary'");?></div>
|
||||
<div class='linkBox cell hidden'></div>
|
||||
<?php endif;?>
|
||||
<form class='main-table table-story' method='post' id='linkedStoriesForm' data-ride="table">
|
||||
<table class='table has-sort-head' id='storyList'>
|
||||
<?php
|
||||
$canBatchUnlink = common::hasPriv('release', 'batchUnlinkStory');
|
||||
$canBatchUnlink = common::hasPriv('projectrelease', 'batchUnlinkStory');
|
||||
$canBatchClose = common::hasPriv('story', 'batchClose');
|
||||
?>
|
||||
<?php $vars = "releaseID={$release->id}&type=story&link=$link¶m=$param&orderBy=%s";?>
|
||||
@@ -122,9 +122,9 @@
|
||||
<td><?php echo $lang->story->stageList[$story->stage];?></td>
|
||||
<td class='c-actions'>
|
||||
<?php
|
||||
if(common::hasPriv('release', 'unlinkStory') and $canBeChanged)
|
||||
if(common::hasPriv('projectrelease', 'unlinkStory') and $canBeChanged)
|
||||
{
|
||||
$unlinkURL = $this->createLink('release', 'unlinkStory', "releaseID=$release->id&story=$story->id");
|
||||
$unlinkURL = $this->createLink('projectrelease', 'unlinkStory', "releaseID=$release->id&story=$story->id");
|
||||
echo html::a("javascript:ajaxDelete(\"$unlinkURL\", \"storyList\", confirmUnlinkStory)", '<i class="icon-unlink"></i>', '', "class='btn' title='{$lang->release->unlinkStory}'");
|
||||
}
|
||||
?>
|
||||
@@ -138,7 +138,7 @@
|
||||
<div class="checkbox-primary check-all"><label><?php echo $lang->selectAll?></label></div>
|
||||
<div class="table-actions btn-toolbar">
|
||||
<?php
|
||||
if(common::hasPriv('release', 'batchUnlinkStory'))
|
||||
if(common::hasPriv('projectrelease', 'batchUnlinkStory'))
|
||||
{
|
||||
$unlinkURL = inlink('batchUnlinkStory', "release=$release->id");
|
||||
echo html::a('###', $lang->release->batchUnlink, '', "onclick='setFormAction(\"$unlinkURL\", \"hiddenwin\", this)' class='btn'");
|
||||
@@ -162,13 +162,13 @@
|
||||
</form>
|
||||
</div>
|
||||
<div class='tab-pane <?php if($type == 'bug') echo 'active'?>' id='bugs'>
|
||||
<?php if(common::hasPriv('release', 'linkBug') and $canBeChanged):?>
|
||||
<?php if(common::hasPriv('projectrelease', 'linkBug') and $canBeChanged):?>
|
||||
<div class='actions'><?php echo html::a("javascript:showLink({$release->id}, \"bug\")", '<i class="icon-bug"></i> ' . $lang->release->linkBug, '', "class='btn btn-primary'");?></div>
|
||||
<div class='linkBox cell hidden'></div>
|
||||
<?php endif;?>
|
||||
<form class='main-table table-bug' method='post' target='hiddenwin' action="<?php echo inLink('batchUnlinkBug', "releaseID=$release->id");?>" id='linkedBugsForm' data-ride="table">
|
||||
<table class='table has-sort-head' id='bugList'>
|
||||
<?php $canBatchUnlink = common::hasPriv('release', 'batchUnlinkBug');?>
|
||||
<?php $canBatchUnlink = common::hasPriv('projectrelease', 'batchUnlinkBug');?>
|
||||
<?php $vars = "releaseID={$release->id}&type=bug&link=$link¶m=$param&orderBy=%s";?>
|
||||
<thead>
|
||||
<tr class='text-center'>
|
||||
@@ -212,9 +212,9 @@
|
||||
<td><?php echo substr($bug->resolvedDate, 5, 11)?></td>
|
||||
<td class='c-actions'>
|
||||
<?php
|
||||
if(common::hasPriv('release', 'unlinkBug') and $canBeChanged)
|
||||
if(common::hasPriv('projectrelease', 'unlinkBug') and $canBeChanged)
|
||||
{
|
||||
$unlinkURL = $this->createLink('release', 'unlinkBug', "releaseID=$release->id&bug=$bug->id");
|
||||
$unlinkURL = $this->createLink('projectrelease', 'unlinkBug', "releaseID=$release->id&bug=$bug->id");
|
||||
echo html::a("javascript:ajaxDelete(\"$unlinkURL\", \"bugList\", confirmUnlinkBug)", '<i class="icon-unlink"></i>', '', "class='btn' title='{$lang->release->unlinkBug}'");
|
||||
}
|
||||
?>
|
||||
@@ -240,13 +240,13 @@
|
||||
</form>
|
||||
</div>
|
||||
<div class='tab-pane <?php if($type == 'leftBug') echo 'active'?>' id='leftBugs'>
|
||||
<?php if(common::hasPriv('release', 'linkBug') and $canBeChanged):?>
|
||||
<?php if(common::hasPriv('projectrelease', 'linkBug') and $canBeChanged):?>
|
||||
<div class='actions'><?php echo html::a("javascript:showLink({$release->id}, \"leftBug\")", '<i class="icon-bug"></i> ' . $lang->release->linkBug, '', "class='btn btn-primary'");?></div>
|
||||
<div class='linkBox cell hidden'></div>
|
||||
<?php endif;?>
|
||||
<form class='main-table table-bug' method='post' target='hiddenwin' action="<?php echo inlink('batchUnlinkBug', "releaseID=$release->id&type=leftBug");?>" id='linkedBugsForm' data-ride="table">
|
||||
<table class='table has-sort-head' id='leftBugList'>
|
||||
<?php $canBatchUnlink = common::hasPriv('release', 'batchUnlinkBug');?>
|
||||
<?php $canBatchUnlink = common::hasPriv('projectrelease', 'batchUnlinkBug');?>
|
||||
<?php $vars = "releaseID={$release->id}&type=leftBug&link=$link¶m=$param&orderBy=%s";?>
|
||||
<thead>
|
||||
<tr class='text-center'>
|
||||
@@ -303,9 +303,9 @@
|
||||
<td><?php echo $bug->openedDate?></td>
|
||||
<td class='c-actions'>
|
||||
<?php
|
||||
if(common::hasPriv('release', 'unlinkBug') and $canBeChanged)
|
||||
if(common::hasPriv('projectrelease', 'unlinkBug') and $canBeChanged)
|
||||
{
|
||||
$unlinkURL = $this->createLink('release', 'unlinkBug', "releaseID=$release->id&bug=$bug->id&type=leftBug");
|
||||
$unlinkURL = $this->createLink('projectrelease', 'unlinkBug', "releaseID=$release->id&bug=$bug->id&type=leftBug");
|
||||
echo html::a("javascript:ajaxDelete(\"$unlinkURL\", \"leftBugList\", confirmUnlinkBug)", '<i class="icon-unlink"></i>', '', "class='btn' title='{$lang->release->unlinkBug}'");
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -12,6 +12,14 @@ class projectStory extends control
|
||||
{
|
||||
public $products = array();
|
||||
|
||||
/**
|
||||
* Get the products associated with the project.
|
||||
*
|
||||
* @param string $moduleName
|
||||
* @param string $methodName
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function __construct($moduleName = '', $methodName = '')
|
||||
{
|
||||
parent::__construct($moduleName, $methodName);
|
||||
@@ -19,15 +27,67 @@ class projectStory extends control
|
||||
if(empty($this->products)) die($this->locate($this->createLink('product', 'showErrorNone', "fromModule=projectStory")));
|
||||
}
|
||||
|
||||
public function requirement($projectID = 0, $productID = 0, $branch = 0)
|
||||
/**
|
||||
* Obtain user requirements through product.
|
||||
*
|
||||
* @param int $productID
|
||||
* @param string $browseType
|
||||
* @param int $param
|
||||
* @param string $storyType
|
||||
* @param string $orderBy
|
||||
* @param int $recTotal
|
||||
* @param int $recPerPage
|
||||
* @param int $pageID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function requirement($productID = 0, $branch = '', $browseType = '', $param = 0, $storyType = 'requirement', $orderBy = '', $recTotal = 0, $recPerPage = 20, $pageID = 1)
|
||||
{
|
||||
if(empty($productID)) $productID = key($this->products);
|
||||
$this->lang->projectstory->menu->requirement['subModule'] = 'product';
|
||||
$this->projectstory->setMenu($this->products, $productID, $branch);
|
||||
$this->display();
|
||||
echo $this->fetch('product', 'browse', "productID=$productID&branch=$branch&browseType=$browseType¶m=$param&storyType=$storyType&orderBy=$orderBy&recTotal=$recTotal&recPerPage=$recPerPage&pageID=$pageID");
|
||||
}
|
||||
|
||||
public function story()
|
||||
/**
|
||||
* Get software requirements from product.
|
||||
*
|
||||
* @param int $productID
|
||||
* @param string $browseType
|
||||
* @param int $param
|
||||
* @param string $storyType
|
||||
* @param string $orderBy
|
||||
* @param int $recTotal
|
||||
* @param int $recPerPage
|
||||
* @param int $pageID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function story($productID = 0, $branch = '', $browseType = '', $param = 0, $storyType = 'story', $orderBy = '', $recTotal = 0, $recPerPage = 20, $pageID = 1)
|
||||
{
|
||||
$this->display();
|
||||
if(empty($productID)) $productID = key($this->products);
|
||||
$this->lang->projectstory->menu->story['subModule'] = 'product';
|
||||
$this->projectstory->setMenu($this->products, $productID, $branch);
|
||||
echo $this->fetch('product', 'browse', "productID=$productID&branch=$branch&browseType=$browseType¶m=$param&storyType=$storyType&orderBy=$orderBy&recTotal=$recTotal&recPerPage=$recPerPage&pageID=$pageID");
|
||||
}
|
||||
|
||||
/**
|
||||
* Obtain the tracking matrix through the product.
|
||||
*
|
||||
* @param int $productID
|
||||
* @param int $browseType
|
||||
* @param int $recTotal
|
||||
* @param int $recPerPage
|
||||
* @param int $pageID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function track($productID = 0, $branch = 0, $recTotal = 0, $recPerPage = 20, $pageID = 1)
|
||||
{
|
||||
if(empty($productID)) $productID = key($this->products);
|
||||
$this->lang->projectstory->menu->track['subModule'] = 'story';
|
||||
$this->projectstory->setMenu($this->products, $productID, $branch);
|
||||
echo $this->fetch('story', 'track', "productID=$productID&branch=$branch&recTotal=$recTotal&recPerPage=$recPerPage&pageID=$pageID");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,2 +1,6 @@
|
||||
<?php
|
||||
$lang->projectstory->index = '需求主页';
|
||||
$lang->projectstory->common = '项目需求';
|
||||
$lang->projectstory->index = '需求主页';
|
||||
$lang->projectstory->requirement = '用户需求';
|
||||
$lang->projectstory->story = '软件需求';
|
||||
$lang->projectstory->track = '跟踪矩阵';
|
||||
|
||||
@@ -22,9 +22,12 @@ class projectstoryModel extends model
|
||||
*/
|
||||
public function setMenu($products = array(), $productID = 0, $branch = 0)
|
||||
{
|
||||
/* Determine if the product is accessible. */
|
||||
if($products and (!isset($products[$productID]) or !$this->loadModel('product')->checkPriv($productID))) $this->loadModel('product')->accessDenied();
|
||||
|
||||
if(empty($productID)) $productID = key($products);
|
||||
$this->loadModel('product')->setMenu($products, $productID, $branch);
|
||||
$selectHtml = $this->product->select($products, $productID, 'projectstory', 'requirement', '', $branch);
|
||||
$selectHtml = $this->product->select($products, $productID, 'projectstory', $this->app->rawMethod, '', $branch);
|
||||
$indexHtml = '<div class="btn-group angle-btn"><div class="btn-group">' . html::a(helper::createLink('projectstory', 'requirement'), $this->lang->projectstory->index, '', "class='btn'") . '</div></div>';
|
||||
$pageNav = $indexHtml . $selectHtml;
|
||||
$this->lang->modulePageNav = $pageNav;
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* The requirement file of projectStory module of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @license ZPL (http://zpl.pub/page/zplv12.html)
|
||||
* @author Chunsheng Wang<wwccss@gmail.com>
|
||||
* @package projectStory
|
||||
* @version $Id
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<h1>用户需求</h1>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* The story file of projectStory module of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @license ZPL (http://zpl.pub/page/zplv12.html)
|
||||
* @author Chunsheng Wang<wwccss@gmail.com>
|
||||
* @package projectStory
|
||||
* @version $Id
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<h1>软件需求</h1>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
+14
-10
@@ -1315,24 +1315,28 @@ class story extends control
|
||||
* Story track.
|
||||
*
|
||||
* @param int $productID
|
||||
* @param int $branch
|
||||
* @param int $recPerPage
|
||||
* @param int $pageID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function track($productID, $recPerPage = 10, $pageID = 1)
|
||||
{
|
||||
$this->lang->product->menu = $this->lang->product->viewMenu;
|
||||
$this->lang->product->switcherMenu = $this->product->getSwitcher($productID);
|
||||
|
||||
$products = $this->product->getPairs();
|
||||
$productID = $this->product->saveState($productID, $products);
|
||||
$this->product->setMenu($products, $productID, 0, 0, '');
|
||||
public function track($productID, $branch = 0, $recTotal = 0, $recPerPage = 20, $pageID = 1)
|
||||
{
|
||||
/* 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->product->setMenu($products, $productID, $branch);
|
||||
}
|
||||
|
||||
/* Load pager and get tracks. */
|
||||
$this->app->loadClass('pager', $static = true);
|
||||
$pager = new pager(0, $recPerPage, $pageID);
|
||||
$tracks = $this->story->getTracks($productID, $pager);
|
||||
$pager = new pager($recTotal, $recPerPage, $pageID);
|
||||
$tracks = $this->story->getTracks($productID, $branch, $pager);
|
||||
|
||||
$this->view->title = $this->lang->story->track;
|
||||
$this->view->posision[] = $this->lang->story->track;
|
||||
|
||||
@@ -2,8 +2,12 @@ $(function()
|
||||
{
|
||||
if(typeof(resetActive) != 'undefined') return false;
|
||||
if(typeof(storyType) == 'undefined') storyType = '';
|
||||
$('#navbar .nav li').removeClass('active');
|
||||
$("#navbar .nav li[data-id=" + storyType + ']').addClass('active');
|
||||
if(typeof(rawModule) == 'undefined') rawModule = 'product';
|
||||
if(rawModule != 'projectstory')
|
||||
{
|
||||
$('#navbar .nav li').removeClass('active');
|
||||
$("#navbar .nav li[data-id=" + storyType + ']').addClass('active');
|
||||
}
|
||||
})
|
||||
|
||||
function getStatus(method, params)
|
||||
|
||||
@@ -155,8 +155,8 @@ class storyModel extends model
|
||||
|
||||
return $story;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
/**
|
||||
* Get requirements for story.
|
||||
*
|
||||
* @param int $productID
|
||||
@@ -164,7 +164,7 @@ class storyModel extends model
|
||||
* @return void
|
||||
*/
|
||||
public function getRequierements($productID)
|
||||
{
|
||||
{
|
||||
return $this->dao->select('id,title')->from(TABLE_STORY)
|
||||
->where('deleted')->eq(0)
|
||||
->andWhere('status')->ne('draft')
|
||||
@@ -3587,14 +3587,15 @@ class storyModel extends model
|
||||
* Get tracks.
|
||||
*
|
||||
* @param int $productID
|
||||
* @param int $branch
|
||||
* @param object $pager
|
||||
* @access public
|
||||
* @return bool|array
|
||||
*/
|
||||
public function getTracks($productID, $pager = null)
|
||||
public function getTracks($productID = 0, $branch = 0, $pager = null)
|
||||
{
|
||||
$sourcePageID = $pager->pageID;
|
||||
$requirements = $this->getProductStories($productID, 0, 0, 'all', 'requirement', 'id_desc', true, '', $pager);
|
||||
$requirements = $this->getProductStories($productID, $branch, 0, 'all', 'requirement', 'id_desc', true, '', $pager);
|
||||
if($pager->pageID != $sourcePageID)
|
||||
{
|
||||
$requirements = array();
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php js::set('storyType', 'track');?>
|
||||
<?php js::set('rawModule', $this->app->rawModule);?>
|
||||
<style>
|
||||
.table td{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;position:unset !important;border-bottom-color:#ddd !important;}
|
||||
.requirement{background: #fff}
|
||||
|
||||
@@ -410,7 +410,11 @@ class treeModel extends model
|
||||
{
|
||||
$linkHtml = ($type == 'case' and !empty($extra)) ? '<a>' . $branch . '</a>' : $this->createBranchLink($type, $rootID, $branchID, $branch);
|
||||
$linkHtml = $manage ? html::a(inlink('browse', "root=$rootID&viewType=$type¤tModuleID=0&branch=$branchID"), $branch) : $linkHtml;
|
||||
if($type == 'story' or $type == 'bug') $linkHtml = html::a(inlink('browse', "productID=$rootID&branch=$branchID&browseType=bybranch" . $extraParams), $branch, "", "id=branch" . $branchID);
|
||||
if($type == 'story' or $type == 'bug')
|
||||
{
|
||||
$branchLink = helper::createLink($this->app->rawModule, $this->app->rawMethod, "productID=$rootID&branch=$branchID&browseType=bybranch" . $extraParams);
|
||||
$linkHtml = html::a($branchLink, $branch, "", "id=branch" . $branchID);
|
||||
}
|
||||
if($firstBranch and $product->type != 'normal')
|
||||
{
|
||||
$linkHtml = '<a>' . $this->lang->product->branchName[$product->type] . '</a><ul><li>' . $linkHtml;
|
||||
@@ -840,7 +844,7 @@ class treeModel extends model
|
||||
*/
|
||||
public function createStoryLink($type, $module)
|
||||
{
|
||||
return html::a(helper::createLink('product', 'browse', "root={$module->root}&branch=&type=byModule¶m={$module->id}"), $module->name, '_self', "id='module{$module->id}'");
|
||||
return html::a(helper::createLink($this->app->rawModule, $this->app->rawMethod, "root={$module->root}&branch=&type=byModule¶m={$module->id}"), $module->name, '_self', "id='module{$module->id}'");
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -900,8 +904,8 @@ class treeModel extends model
|
||||
* @return string
|
||||
*/
|
||||
public function createRequirementLink($type, $module)
|
||||
{
|
||||
return html::a(helper::createLink('product', 'browse', "root={$module->root}&branch=&type=byModule¶m={$module->id}&storyType=requirement"), $module->name, '_self', "id='module{$module->id}'");
|
||||
{
|
||||
return html::a(helper::createLink($this->app->rawModule, $this->app->rawMethod, "root={$module->root}&branch=&type=byModule¶m={$module->id}&storyType=requirement"), $module->name, '_self', "id='module{$module->id}'");
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+20
-2
@@ -1135,6 +1135,18 @@ class userModel extends model
|
||||
return $this->dao->select('id, listName')->from(TABLE_USERCONTACT)->where('account')->eq($account)->fetchPairs();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get users who have access to the parent stage.
|
||||
*
|
||||
* @param int $stageID
|
||||
* @access public
|
||||
* @return object
|
||||
*/
|
||||
public function getParentStageAuthedUsers($stageID = 0)
|
||||
{
|
||||
return $this->dao->select('account')->from(TABLE_USERVIEW)->where("CONCAT(',', sprints, ',')")->like("%,{$stageID},%")->fetchPairs();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a contact list by id.
|
||||
*
|
||||
@@ -1652,8 +1664,7 @@ class userModel extends model
|
||||
->where('acl')->eq('open')
|
||||
->andWhere('type')
|
||||
->in('sprint,stage')
|
||||
->andWhere('project')
|
||||
->in($userView->projects)
|
||||
->andWhere('project')->in($userView->projects)
|
||||
->fetchAll('id');
|
||||
|
||||
$openedSprints = join(',', array_keys($openedSprints));
|
||||
@@ -1978,6 +1989,13 @@ class userModel extends model
|
||||
$whiteList = zget($whiteListGroup, $sprint->project, array());
|
||||
|
||||
$authedUsers += $this->getSprintAuthedUsers($sprint, $stakeholders, array_merge($teams, $parentTeams), $whiteList);
|
||||
|
||||
/* If you have parent stage view permissions, you have child stage permissions. */
|
||||
if($sprint->type == 'stage' && $sprint->grade == 2)
|
||||
{
|
||||
$parentStageAuthedUsers = $this->getParentStageAuthedUsers($sprint->parent);
|
||||
$authedUsers = array_merge($authedUsers, $parentStageAuthedUsers);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user