This commit is contained in:
hufangzhou
2020-11-26 10:59:29 +08:00
78 changed files with 2581 additions and 341 deletions
+10 -10
View File
@@ -43,20 +43,20 @@ $config->projectCommonList['vi'][0] = 'Lặp lại';
$config->projectCommonList['vi'][1] = 'Sprint';
$config->projectCommonList['vi'][2] = 'Giai đoạn';
$config->URStory['zh-cn'] = '用户需求';
$config->SRStory['zh-cn'] = '软件需求';
$config->URCommonList['zh-cn'] = '用户需求';
$config->SRCommonList['zh-cn'] = '软件需求';
$config->URStory['en'] = 'Requirement';
$config->SRStory['en'] = 'Story';
$config->URCommonList['en'] = 'Requirement';
$config->SRCommonList['en'] = 'Story';
$config->URStory['vi'] = 'Requirement';
$config->SRStory['vi'] = 'Story';
$config->URCommonList['vi'] = 'Requirement';
$config->SRCommonList['vi'] = 'Story';
$config->URStory['fr'] = 'Requirement';
$config->SRStory['fr'] = 'Story';
$config->URCommonList['fr'] = 'Requirement';
$config->SRCommonList['fr'] = 'Story';
$config->URStory['de'] = 'Requirement';
$config->SRStory['de'] = 'Story';
$config->URCommonList['de'] = 'Requirement';
$config->SRCommonList['de'] = 'Story';
/* Story common list. */
$config->hourPointCommonList['zh-cn'][0] = '故事点';
+16 -11
View File
@@ -126,7 +126,7 @@ class router extends baseRouter
$commonSettings = array();
try
{
$commonSettings = $this->dbh->query('SELECT section, `key`, value FROM' . TABLE_CONFIG . "WHERE `owner`='system' AND `module`='custom' and `key` in ('productProject','hourPoint','URAndSR')")->fetchAll();
$commonSettings = $this->dbh->query('SELECT section, `key`, value FROM' . TABLE_CONFIG . "WHERE `owner`='system' AND `module`='custom' and `key` in ('productProject','hourPoint','URAndSR', 'URSRName')")->fetchAll();
}
catch (PDOException $exception)
{
@@ -147,7 +147,7 @@ class router extends baseRouter
}
}
$productIndex = $hourIndex = $planIndex = $URAndSR = 0;
$productIndex = $hourIndex = $planIndex = $URAndSR = $URSRName = 0;
$projectIndex = empty($this->config->isINT) ? 0 : 1;
foreach($commonSettings as $setting)
@@ -155,6 +155,7 @@ class router extends baseRouter
if($setting->key == 'productProject') list($productIndex, $projectIndex) = explode('_', $setting->value);
if($setting->key == 'hourPoint') $hourIndex = $setting->value;
if($setting->key == 'URAndSR') $URAndSR = $setting->value;
if($setting->key == 'URSRName') $URSRName = $setting->value;
}
$model = new stdclass();
@@ -166,7 +167,8 @@ class router extends baseRouter
$projectIndex = 2;
}
$config->URAndSR = $URAndSR;
$config->URAndSR = $URAndSR;
$config->URSRName = $URSRName;
/* Set productCommon, projectCommon, hourCommon and planCommon. Default english lang. */
$lang->productCommon = isset($this->config->productCommonList[$this->clientLang][(int)$productIndex]) ? $this->config->productCommonList[$this->clientLang][(int)$productIndex] : $this->config->productCommonList['en'][(int)$productIndex];
@@ -174,6 +176,7 @@ class router extends baseRouter
$lang->hourCommon = isset($this->config->hourPointCommonList[$this->clientLang][(int)$hourIndex]) ? $this->config->hourPointCommonList[$this->clientLang][(int)$hourIndex] : $this->config->hourPointCommonList['en'][(int)$hourIndex];
$lang->planCommon = isset($this->config->planCommonList[$this->clientLang][(int)$planIndex]) ? $this->config->planCommonList[$this->clientLang][(int)$planIndex] : $this->config->planCommonList['en'][(int)$planIndex];
/* Get story concept in project and product. */
$URLists = $this->dbh->query('SELECT `key`, `value` FROM' . TABLE_LANG . "WHERE module = 'custom' and section = 'URList' and lang = \"{$this->clientLang}\"")->fetchAll();
$SRLists = $this->dbh->query('SELECT `key`, `value` FROM' . TABLE_LANG . "WHERE module = 'custom' and section = 'SRList' and lang = \"{$this->clientLang}\"")->fetchAll();
@@ -182,25 +185,27 @@ class router extends baseRouter
foreach($URLists as $pair) $URList[$pair->key] = $pair->value;
foreach($SRLists as $pair) $SRList[$pair->key] = $pair->value;
$lang->projectURCommon = $config->URStory[$this->clientLang];
$lang->productURCommon = $config->URStory[$this->clientLang];
$lang->projectSRCommon = $config->SRStory[$this->clientLang];
$lang->productSRCommon = $config->SRStory[$this->clientLang];
$lang->URCommon = zget($URList, $config->URSRName, $config->URCommonList[$this->clientLang]);
$lang->SRCommon = zget($SRList, $config->URSRName, $config->SRCommonList[$this->clientLang]);
$lang->projectURCommon = $config->URCommonList[$this->clientLang];
$lang->productURCommon = $config->URCommonList[$this->clientLang];
$lang->projectSRCommon = $config->SRCommonList[$this->clientLang];
$lang->productSRCommon = $config->SRCommonList[$this->clientLang];
$projectID = $this->session->PRJ;
if($projectID)
{
$storyConcept = $this->dbh->query('SELECT `storyConcept` FROM' . TABLE_PROJECT . "WHERE id = {$projectID}")->fetch();
$lang->projectURCommon = zget($URList, $storyConcept->storyConcept, $config->URStory[$this->clientLang]);
$lang->projectSRCommon = zget($SRList, $storyConcept->storyConcept, $config->SRStory[$this->clientLang]);
$lang->projectURCommon = zget($URList, $storyConcept->storyConcept, $config->URCommonList[$this->clientLang]);
$lang->projectSRCommon = zget($SRList, $storyConcept->storyConcept, $config->SRCommonList[$this->clientLang]);
}
$productID = $this->session->product;
if($productID)
{
$storyConcept = $this->dbh->query('SELECT `storyConcept` FROM' . TABLE_PRODUCT . "WHERE id = {$productID}")->fetch();
$lang->productURCommon = zget($URList, $storyConcept->storyConcept, $config->URStory[$this->clientLang]);
$lang->productSRCommon = zget($SRList, $storyConcept->storyConcept, $config->SRStory[$this->clientLang]);
$lang->productURCommon = zget($URList, $storyConcept->storyConcept, $config->URCommonList[$this->clientLang]);
$lang->productSRCommon = zget($SRList, $storyConcept->storyConcept, $config->SRCommonList[$this->clientLang]);
}
}
+9 -1
View File
@@ -768,6 +768,7 @@ class blockModel extends model
list($moduleName, $blockKey) = explode('|', $block);
if(empty($moduleName))
{
if(isset($this->lang->block->$blockKey)) $blockPairs[$block] = $this->lang->block->$blockKey;
if($blockKey == 'html') $blockPairs[$block] = 'HTML';
if($blockKey == 'flowchart') $blockPairs[$block] = $this->lang->block->lblFlowchart;
if($blockKey == 'dynamic') $blockPairs[$block] = $this->lang->block->dynamic;
@@ -775,7 +776,14 @@ class blockModel extends model
}
else
{
$blockPairs[$block] = "{$this->lang->block->moduleList[$moduleName]}|{$this->lang->block->modules[$moduleName]->availableBlocks->$blockKey}";
$blockName = $blockKey;
if(isset($this->lang->block->modules[$moduleName]->availableBlocks->$blockKey)) $blockName = $this->lang->block->modules[$moduleName]->availableBlocks->$blockKey;
if(isset($this->lang->block->availableBlocks->$blockKey)) $blockName = $this->lang->block->availableBlocks->$blockKey;
if(isset($this->lang->block->modules['scrum']['index']->availableBlocks->$blockKey)) $blockName = $this->lang->block->modules['scrum']['index']->availableBlocks->$blockKey;
if(isset($this->lang->block->modules['waterfall']['index']->availableBlocks->$blockKey)) $blockName = $this->lang->block->modules['waterfall']['index']->availableBlocks->$blockKey;
$blockPairs[$block] = isset($this->lang->block->moduleList[$moduleName]) ? "{$this->lang->block->moduleList[$moduleName]}|" : '';
$blockPairs[$block] .= $blockName;
}
}
+9 -9
View File
@@ -18,8 +18,8 @@ $lang->bug->productplan = '所属' . $lang->planCommon;
$lang->bug->module = '所属模块';
$lang->bug->moduleAB = '模块';
$lang->bug->project = '所属' . $lang->projectCommon;
$lang->bug->story = "相关{$lang->productSRCommon}";
$lang->bug->storyVersion = "{$lang->productSRCommon}版本";
$lang->bug->story = "相关{$lang->projectSRCommon}";
$lang->bug->storyVersion = "{$lang->projectSRCommon}版本";
$lang->bug->color = '标题颜色';
$lang->bug->task = '相关任务';
$lang->bug->title = 'Bug标题';
@@ -39,7 +39,7 @@ $lang->bug->activatedDate = '激活日期';
$lang->bug->confirmed = '是否确认';
$lang->bug->confirmedAB = '确认';
$lang->bug->toTask = '转任务';
$lang->bug->toStory = "转{$lang->productSRCommon}";
$lang->bug->toStory = "转{$lang->projectSRCommon}";
$lang->bug->mailto = '抄送给';
$lang->bug->openedBy = '由谁创建';
$lang->bug->openedByAB = '创建者';
@@ -110,7 +110,7 @@ $lang->bug->exportAction = '导出Bug';
$lang->bug->delete = '删除';
$lang->bug->deleteAction = '删除Bug';
$lang->bug->deleted = '已删除';
$lang->bug->confirmStoryChange = "确认{$lang->productSRCommon}变动";
$lang->bug->confirmStoryChange = "确认{$lang->projectSRCommon}变动";
$lang->bug->copy = '复制Bug';
$lang->bug->search = '搜索';
@@ -129,7 +129,7 @@ $lang->bug->postponedBugs = '被延期';
$lang->bug->overdueBugs = '过期Bug';
$lang->bug->allBugs = '所有';
$lang->bug->byQuery = '搜索';
$lang->bug->needConfirm = "{$lang->productSRCommon}变动";
$lang->bug->needConfirm = "{$lang->projectSRCommon}变动";
$lang->bug->allProduct = '所有' . $lang->productCommon;
$lang->bug->my = '我的';
$lang->bug->yesterdayResolved = '昨天解决Bug数';
@@ -159,7 +159,7 @@ $lang->bug->createBuild = '创建';
/* legend列表。*/
$lang->bug->legendBasicInfo = '基本信息';
$lang->bug->legendAttatch = '附件';
$lang->bug->legendPrjStoryTask = $lang->projectCommon . "/{$lang->productSRCommon}/任务";
$lang->bug->legendPrjStoryTask = $lang->projectCommon . "/{$lang->projectSRCommon}/任务";
$lang->bug->lblTypeAndSeverity = '类型/严重程度';
$lang->bug->lblSystemBrowserAndHardware = '系统/浏览器';
$lang->bug->legendSteps = '重现步骤';
@@ -173,7 +173,7 @@ $lang->bug->buttonConfirm = '确认';
/* 交互提示。*/
$lang->bug->summary = "本页共 <strong>%s</strong> 个Bug,未解决 <strong>%s</strong>。";
$lang->bug->confirmChangeProduct = "修改{$lang->productCommon}会导致相应的{$lang->projectCommon}、{$lang->productSRCommon}和任务发生变化,确定吗?";
$lang->bug->confirmChangeProduct = "修改{$lang->productCommon}会导致相应的{$lang->projectCommon}、{$lang->projectSRCommon}和任务发生变化,确定吗?";
$lang->bug->confirmDelete = '您确认要删除该Bug吗?';
$lang->bug->remindTask = '该Bug已经转化为任务,是否更新任务(编号:%s)状态 ?';
$lang->bug->skipClose = 'Bug %s 不是已解决状态,不能关闭。';
@@ -270,7 +270,7 @@ $lang->bug->resolutionList['fixed'] = '已解决';
$lang->bug->resolutionList['notrepro'] = '无法重现';
$lang->bug->resolutionList['postponed'] = '延期处理';
$lang->bug->resolutionList['willnotfix'] = "不予解决";
$lang->bug->resolutionList['tostory'] = "转为{$lang->productSRCommon}";
$lang->bug->resolutionList['tostory'] = "转为{$lang->projectSRCommon}";
/* 统计报表。*/
$lang->bug->report = new stdclass();
@@ -371,7 +371,7 @@ $lang->bug->report->bugHistories->graph->xAxisName = '处理步骤';
/* 操作记录。*/
$lang->bug->action = new stdclass();
$lang->bug->action->resolved = array('main' => '$date, 由 <strong>$actor</strong> 解决,方案为 <strong>$extra</strong> $appendLink。', 'extra' => 'resolutionList');
$lang->bug->action->tostory = array('main' => '$date, 由 <strong>$actor</strong> 转为<strong> ' . $lang->productSRCommon . '</strong>,编号为 <strong>$extra</strong>。');
$lang->bug->action->tostory = array('main' => '$date, 由 <strong>$actor</strong> 转为<strong> ' . $lang->projectSRCommon . '</strong>,编号为 <strong>$extra</strong>。');
$lang->bug->action->totask = array('main' => '$date, 由 <strong>$actor</strong> 导入为<strong>任务</strong>,编号为 <strong>$extra</strong>。');
$lang->bug->action->linked2plan = array('main' => '$date, 由 <strong>$actor</strong> 关联到' . $lang->planCommon . ' <strong>$extra</strong>。');
$lang->bug->action->unlinkedfromplan = array('main' => '$date, 由 <strong>$actor</strong> 从' . $lang->planCommon . ' <strong>$extra</strong> 移除。');
+24 -18
View File
@@ -454,6 +454,10 @@ $lang->doc->menu = new stdclass();
$lang->svn = new stdclass();
$lang->git = new stdclass();
/* Project release menu settings. */
$lang->projectrelease = new stdclass();
$lang->projectrelease->menu = new stdclass();
/* Report menu settings. */
$lang->report = new stdclass();
$lang->report->menu = new stdclass();
@@ -625,6 +629,7 @@ $lang->navGroup->job = 'project';
$lang->navGroup->jenkins = 'project';
$lang->navGroup->compile = 'project';
$lang->navGroup->build = 'project';
$lang->navGroup->projectrelease = 'project';
$lang->navGroup->durationestimation = 'project';
@@ -854,27 +859,28 @@ $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->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';
/* 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->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->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|';
$lang->menu->waterfall->qa = array('link' => 'QA|bug|browse|product={PRODUCT}', 'subModule' => ',testcase,testtask,testsuite,testreport,caselib,');
$lang->menu->waterfall->release = array('link' => 'Release|release|browse|product={PRODUCT}', 'subModule' => 'release');
$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->programindex = array('link' => 'Index|program|index|program={PROGRAM}');
$lang->menu->waterfall->programplan = array('link' => 'Plan|programplan|browse|program={PROGRAM}', '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->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|';
$lang->menu->waterfall->qa = array('link' => 'QA|bug|browse|product={PRODUCT}', 'subModule' => ',testcase,testtask,testsuite,testreport,caselib,');
$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->waterfall = new stdclass();
$lang->waterfall->subMenu = new stdclass();
+24 -18
View File
@@ -454,6 +454,10 @@ $lang->doc->menu = new stdclass();
$lang->svn = new stdclass();
$lang->git = new stdclass();
/* Project release menu settings. */
$lang->projectrelease = new stdclass();
$lang->projectrelease->menu = new stdclass();
/* Report menu settings. */
$lang->report = new stdclass();
$lang->report->menu = new stdclass();
@@ -625,6 +629,7 @@ $lang->navGroup->job = 'project';
$lang->navGroup->jenkins = 'project';
$lang->navGroup->compile = 'project';
$lang->navGroup->build = 'project';
$lang->navGroup->projectrelease = 'project';
$lang->navGroup->durationestimation = 'project';
@@ -854,27 +859,28 @@ $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->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';
/* 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->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->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|';
$lang->menu->waterfall->qa = array('link' => 'QA|bug|browse|product={PRODUCT}', 'subModule' => ',testcase,testtask,testsuite,testreport,caselib,');
$lang->menu->waterfall->release = array('link' => 'Release|release|browse|product={PRODUCT}', 'subModule' => 'release');
$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->programindex = array('link' => 'Index|program|index|program={PROGRAM}');
$lang->menu->waterfall->programplan = array('link' => 'Plan|programplan|browse|program={PROGRAM}', '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->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|';
$lang->menu->waterfall->qa = array('link' => 'QA|bug|browse|product={PRODUCT}', 'subModule' => ',testcase,testtask,testsuite,testreport,caselib,');
$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->waterfall = new stdclass();
$lang->waterfall->subMenu = new stdclass();
+24 -18
View File
@@ -454,6 +454,10 @@ $lang->doc->menu = new stdclass();
$lang->svn = new stdclass();
$lang->git = new stdclass();
/* Project release menu settings. */
$lang->projectrelease = new stdclass();
$lang->projectrelease->menu = new stdclass();
/* Report menu settings. */
$lang->report = new stdclass();
$lang->report->menu = new stdclass();
@@ -625,6 +629,7 @@ $lang->navGroup->job = 'project';
$lang->navGroup->jenkins = 'project';
$lang->navGroup->compile = 'project';
$lang->navGroup->build = 'project';
$lang->navGroup->projectrelease = 'project';
$lang->navGroup->durationestimation = 'project';
@@ -854,27 +859,28 @@ $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->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';
/* 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->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->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|';
$lang->menu->waterfall->qa = array('link' => 'QA|bug|browse|product={PRODUCT}', 'subModule' => ',testcase,testtask,testsuite,testreport,caselib,');
$lang->menu->waterfall->release = array('link' => 'Release|release|browse|product={PRODUCT}', 'subModule' => 'release');
$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->programindex = array('link' => 'Index|program|index|program={PROGRAM}');
$lang->menu->waterfall->programplan = array('link' => 'Plan|programplan|browse|program={PROGRAM}', '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->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|';
$lang->menu->waterfall->qa = array('link' => 'QA|bug|browse|product={PRODUCT}', 'subModule' => ',testcase,testtask,testsuite,testreport,caselib,');
$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->waterfall = new stdclass();
$lang->waterfall->subMenu = new stdclass();
+1 -1
View File
@@ -11,7 +11,7 @@ $lang->waterfall->menuOrder[40] = 'product';
$lang->waterfall->menuOrder[45] = 'design';
$lang->waterfall->menuOrder[50] = 'ci';
$lang->waterfall->menuOrder[55] = 'qa';
$lang->waterfall->menuOrder[60] = 'release';
$lang->waterfall->menuOrder[60] = 'projectrelease';
$lang->waterfall->menuOrder[65] = 'issue';
$lang->waterfall->menuOrder[70] = 'risk';
$lang->waterfall->menuOrder[75] = 'report';
+24 -18
View File
@@ -454,6 +454,10 @@ $lang->doc->menu = new stdclass();
$lang->svn = new stdclass();
$lang->git = new stdclass();
/* Project release menu settings. */
$lang->projectrelease = new stdclass();
$lang->projectrelease->menu = new stdclass();
/* Report menu settings. */
$lang->report = new stdclass();
$lang->report->menu = new stdclass();
@@ -625,6 +629,7 @@ $lang->navGroup->job = 'project';
$lang->navGroup->jenkins = 'project';
$lang->navGroup->compile = 'project';
$lang->navGroup->build = 'project';
$lang->navGroup->projectrelease = 'project';
$lang->navGroup->durationestimation = 'project';
@@ -854,27 +859,28 @@ $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->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';
/* 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->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->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|';
$lang->menu->waterfall->qa = array('link' => 'QA|bug|browse|product={PRODUCT}', 'subModule' => ',testcase,testtask,testsuite,testreport,caselib,');
$lang->menu->waterfall->release = array('link' => 'Release|release|browse|product={PRODUCT}', 'subModule' => 'release');
$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->programindex = array('link' => 'Index|program|index|program={PROGRAM}');
$lang->menu->waterfall->programplan = array('link' => 'Plan|programplan|browse|program={PROGRAM}', '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->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|';
$lang->menu->waterfall->qa = array('link' => 'QA|bug|browse|product={PRODUCT}', 'subModule' => ',testcase,testtask,testsuite,testreport,caselib,');
$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->waterfall = new stdclass();
$lang->waterfall->subMenu = new stdclass();
+32 -18
View File
@@ -455,6 +455,10 @@ $lang->doc->menu = new stdclass();
$lang->svn = new stdclass();
$lang->git = new stdclass();
/* 发布视图菜单设置。*/
$lang->projectrelease = new stdclass();
$lang->projectrelease->menu = new stdclass();
/* 统计视图菜单设置。*/
$lang->report = new stdclass();
$lang->report->menu = new stdclass();
@@ -608,6 +612,7 @@ $lang->navGroup->feedback = 'project';
$lang->navGroup->deploy = 'project';
$lang->navGroup->stakeholder = 'project';
$lang->navGroup->projectstory = 'project';
$lang->navGroup->programplan = 'project';
$lang->navGroup->workestimation = 'project';
$lang->navGroup->budget = 'project';
@@ -627,6 +632,7 @@ $lang->navGroup->job = 'project';
$lang->navGroup->jenkins = 'project';
$lang->navGroup->compile = 'project';
$lang->navGroup->build = 'project';
$lang->navGroup->projectrelease = 'project';
$lang->navGroup->durationestimation = 'project';
@@ -856,28 +862,30 @@ $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->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';
/* 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->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|product={PRODUCT}', 'subModule' => 'requirement,story,');
//$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|';
$lang->menu->waterfall->qa = array('link' => '测试|bug|browse|product={PRODUCT}', 'subModule' => ',testcase,testtask,testsuite,testreport,caselib,');
$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->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->product = array('link' => '需求|product|browse|product={PRODUCT}', 'subModule' => ',story,');
$lang->menu->waterfall->design = '设计|design|browse|product={PRODUCT}';
$lang->menu->waterfall->ci = '代码|repo|browse|';
$lang->menu->waterfall->qa = array('link' => '测试|bug|browse|product={PRODUCT}', 'subModule' => ',testcase,testtask,testsuite,testreport,caselib,');
$lang->menu->waterfall->projectrelease = array('link' => '发布|projectrelease|browse|product={PRODUCT}');
//$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->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->waterfall = new stdclass();
$lang->waterfall->subMenu = new stdclass();
@@ -902,6 +910,7 @@ $lang->issue = new stdclass();
$lang->risk = new stdclass();
$lang->stakeholder = new stdclass();
$lang->durationestimation = new stdclass();
$lang->projectstory = new stdclass();
$lang->workestimation->menu = new stdclass();
$lang->budget->menu = new stdclass();
@@ -918,6 +927,7 @@ $lang->risk->menu = new stdclass();
$lang->stakeholder->menu = new stdclass();
$lang->waterfallproduct->menu = new stdclass();
$lang->durationestimation->menu = new stdclass();
$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|');
@@ -932,6 +942,10 @@ $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->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->waterfallproduct->menu->plan = array('link' => "{$lang->planCommon}|productplan|browse|productID={PRODUCT}", 'subModule' => 'productplan');
$lang->waterfallproduct->menu->story = '需求|product|browse|product={PRODUCT}';
$lang->waterfallproduct->menu->track = '跟踪矩阵|story|track|product={PRODUCT}';
+24 -18
View File
@@ -454,6 +454,10 @@ $lang->doc->menu = new stdclass();
$lang->svn = new stdclass();
$lang->git = new stdclass();
/* 項目發布視圖菜單設置。*/
$lang->projectrelease = new stdclass();
$lang->projectrelease->menu = new stdclass();
/* 統計視圖菜單設置。*/
$lang->report = new stdclass();
$lang->report->menu = new stdclass();
@@ -625,6 +629,7 @@ $lang->navGroup->job = 'project';
$lang->navGroup->jenkins = 'project';
$lang->navGroup->compile = 'project';
$lang->navGroup->build = 'project';
$lang->navGroup->projectrelease = 'project';
$lang->navGroup->durationestimation = 'project';
@@ -854,27 +859,28 @@ $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->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';
/* 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->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->product = array('link' => '需求|product|browse|product={PRODUCT}', 'subModule' => ',story,');
$lang->menu->waterfall->design = '設計|design|browse|product={PRODUCT}';
$lang->menu->waterfall->ci = '代碼|repo|browse|';
$lang->menu->waterfall->qa = array('link' => '測試|bug|browse|product={PRODUCT}', 'subModule' => ',testcase,testtask,testsuite,testreport,caselib,');
//$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->programindex = array('link' => '儀表盤|program|index|program={PROGRAM}');
$lang->menu->waterfall->programplan = array('link' => '計劃|programplan|browse|program={PROGRAM}', '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->product = array('link' => '需求|product|browse|product={PRODUCT}', 'subModule' => ',story,');
$lang->menu->waterfall->design = '設計|design|browse|product={PRODUCT}';
$lang->menu->waterfall->ci = '代碼|repo|browse|';
$lang->menu->waterfall->qa = array('link' => '測試|bug|browse|product={PRODUCT}', 'subModule' => ',testcase,testtask,testsuite,testreport,caselib,');
$lang->menu->waterfall->projectrelease = array('link' => '發布|projectrelease|browse|product={PRODUCT}');
$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->waterfall = new stdclass();
$lang->waterfall->subMenu = new stdclass();
+1 -1
View File
@@ -45,7 +45,7 @@ class commonModel extends model
public function sendHeader()
{
header("Content-Type: text/html; Language={$this->config->charset}");
header("X-Frame-Options: SAMEORIGIN");
if(!$this->loadModel('setting')->getItem('owner=system&module=sso&key=turnon')) header("X-Frame-Options: SAMEORIGIN");
header("Cache-control: private");
}
+30
View File
@@ -510,6 +510,36 @@ $lang->release->methodOrder[60] = 'unlinkBug';
$lang->release->methodOrder[65] = 'batchUnlinkBug';
$lang->release->methodOrder[70] = 'changeStatus';
/* Release. */
$lang->resource->projectrelease = new stdclass();
$lang->resource->projectrelease->browse = 'browse';
$lang->resource->projectrelease->create = 'create';
$lang->resource->projectrelease->edit = 'edit';
$lang->resource->projectrelease->delete = 'delete';
$lang->resource->projectrelease->view = 'view';
$lang->resource->projectrelease->export = 'export';
$lang->resource->projectrelease->linkStory = 'linkStory';
$lang->resource->projectrelease->unlinkStory = 'unlinkStory';
$lang->resource->projectrelease->batchUnlinkStory = 'batchUnlinkStory';
$lang->resource->projectrelease->linkBug = 'linkBug';
$lang->resource->projectrelease->unlinkBug = 'unlinkBug';
$lang->resource->projectrelease->batchUnlinkBug = 'batchUnlinkBug';
$lang->resource->projectrelease->changeStatus = 'changeStatus';
$lang->projectrelease->methodOrder[5] = 'browse';
$lang->projectrelease->methodOrder[10] = 'create';
$lang->projectrelease->methodOrder[15] = 'edit';
$lang->projectrelease->methodOrder[20] = 'delete';
$lang->projectrelease->methodOrder[25] = 'view';
$lang->projectrelease->methodOrder[35] = 'export';
$lang->projectrelease->methodOrder[40] = 'linkStory';
$lang->projectrelease->methodOrder[45] = 'unlinkStory';
$lang->projectrelease->methodOrder[50] = 'batchUnlinkStory';
$lang->projectrelease->methodOrder[55] = 'linkBug';
$lang->projectrelease->methodOrder[60] = 'unlinkBug';
$lang->projectrelease->methodOrder[65] = 'batchUnlinkBug';
$lang->projectrelease->methodOrder[70] = 'changeStatus';
/* Project. */
$lang->resource->project = new stdclass();
$lang->resource->project->index = 'index';
+1
View File
@@ -253,6 +253,7 @@ class product extends control
*/
public function create()
{
$this->app->loadLang('custom');
$this->lang->product->switcherMenu = $this->product->getSwitcher();
if(!empty($_POST))
+1
View File
@@ -96,6 +96,7 @@ $lang->product->iterationInfo = '%s Iterations';
$lang->product->iterationView = 'Details';
$lang->product->createdBy = 'Created By';
$lang->product->createdDate = 'Created Date';
$lang->product->storyConcept = 'Story Concept';
$lang->product->searchStory = 'Suche';
$lang->product->assignedToMe = 'Mir zuweisen';
+1
View File
@@ -96,6 +96,7 @@ $lang->product->iterationInfo = '%s Iteration';
$lang->product->iterationView = 'More';
$lang->product->createdBy = 'CreatedBy';
$lang->product->createdDate = 'createdDate';
$lang->product->storyConcept = 'Story Concept';
$lang->product->searchStory = 'Search';
$lang->product->assignedToMe = 'AssignedToMe';
+1
View File
@@ -96,6 +96,7 @@ $lang->product->iterationInfo = '%s Itération';
$lang->product->iterationView = 'Détail';
$lang->product->createdBy = 'Créé par';
$lang->product->createdDate = 'Créé le';
$lang->product->storyConcept = 'Story Concept';
$lang->product->searchStory = 'Recherche';
$lang->product->assignedToMe = 'Affectées à Moi';
+1
View File
@@ -96,6 +96,7 @@ $lang->product->iterationInfo = '%s lặp lại';
$lang->product->iterationView = 'Chi tiết';
$lang->product->createdBy = 'Người tạo';
$lang->product->createdDate = 'Ngày tạo';
$lang->product->storyConcept = 'Story Concept';
$lang->product->searchStory = 'Tìm kiếm';
$lang->product->assignedToMe = 'Giao cho bạn';
+1
View File
@@ -96,6 +96,7 @@ $lang->product->iterationInfo = '迭代 %s 次';
$lang->product->iterationView = '查看详情';
$lang->product->createdBy = '由谁创建';
$lang->product->createdDate = '创建日期';
$lang->product->storyConcept = '需求概念组合';
$lang->product->searchStory = '搜索';
$lang->product->assignedToMe = '指给我';
+21 -1
View File
@@ -1212,7 +1212,7 @@ class productModel extends model
public function getProductLink($module, $method, $extra, $branch = false)
{
$link = '';
if(strpos('programplan,product,roadmap,bug,testcase,testtask,story,qa,testsuite,testreport,build', $module) !== false)
if(strpos('programplan,product,roadmap,bug,testcase,testtask,story,qa,testsuite,testreport,build,projectrelease,projectstory', $module) !== false)
{
if($module == 'product' && $method == 'project')
{
@@ -1235,6 +1235,10 @@ 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" : ''));
@@ -1265,6 +1269,22 @@ class productModel extends model
return $link;
}
/**
* 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)
{
$linkHtml = strpos('programplan,projectstory', $module) !== false ? sprintf($link, $projectID, $productID) : sprintf($link, $productID);
return $linkHtml;
}
/**
* Fix order.
*
+10 -32
View File
@@ -14,7 +14,7 @@ foreach($products as $product)
if($product->status == 'closed') $closeds++;
$productNames[] = $product->name;
}
$productsPinYin = common::convert2Pinyin($productNames);
$productsPinYin = common::convert2Pinyin($productNames);
$myProductsHtml = '';
$normalProductsHtml = '';
$closedProductsHtml = '';
@@ -23,43 +23,21 @@ foreach($products as $product)
{
if($product->status == 'normal' and $product->PO == $this->app->user->account)
{
if($product->type != 'platform' && $module == 'branch' && $method == 'manage')
{
$linkHtml = $module == 'programplan' ? sprintf($link, $projectID, $productID) : sprintf($link, $productID);
$myProductsHtml .= html::a($linkHtml, "<i class='icon icon-cube'></i> " . $product->name, '', "class='text-important' title='{$product->name}' data-key='" . zget($productsPinYin, $product->name, '') . "'");
}
else
{
$linkHtml = $module == 'programplan' ? sprintf($link, $projectID, $product->id) : sprintf($link, $product->id);
$myProductsHtml .= html::a($linkHtml, "<i class='icon icon-cube'></i> " . $product->name, '', "class='text-important' title='{$product->name}' data-key='" . zget($productsPinYin, $product->name, '') . "'");
}
$objectID = ($product->type != 'platform' && $module == 'branch' && $method == 'manage') ? $productID : $product->id;
$linkHtml = $this->product->setParamsForLink($module, $link, $projectID, $product->id);
$myProductsHtml .= html::a($linkHtml, "<i class='icon icon-cube'></i> " . $product->name, '', "class='text-important' title='{$product->name}' data-key='" . zget($productsPinYin, $product->name, '') . "'");
}
else if($product->status == 'normal' and !($product->PO == $this->app->user->account))
{
if($product->type != 'platform' && $module == 'branch' && $method == 'manage')
{
$linkHtml = $module == 'programplan' ? sprintf($link, $projectID, $productID) : sprintf($link, $productID);
$normalProductsHtml .= html::a($linkHtml, "<i class='icon icon-cube'></i> " . $product->name, '', "title='{$product->name}' data-key='" . zget($productsPinYin, $product->name, '') . "'");
}
else
{
$linkHtml = $module == 'programplan' ? sprintf($link, $projectID, $product->id) : sprintf($link, $product->id);
$normalProductsHtml .= html::a($linkHtml, "<i class='icon icon-cube'></i> " . $product->name, '', "title='{$product->name}' data-key='" . zget($productsPinYin, $product->name, '') . "'");
}
$objectID = ($product->type != 'platform' && $module == 'branch' && $method == 'manage') ? $productID : $product->id;
$linkHtml = $this->product->setParamsForLink($module, $link, $projectID, $product->id);
$normalProductsHtml .= html::a($linkHtml, "<i class='icon icon-cube'></i> " . $product->name, '', "title='{$product->name}' data-key='" . zget($productsPinYin, $product->name, '') . "'");
}
else if($product->status == 'closed')
{
if($product->type != 'platform' && $module == 'branch' && $method == 'manage')
{
$linkHtml = $module == 'programplan' ? sprintf($link, $projectID, $productID) : sprintf($link, $productID);
$closedProductsHtml .= html::a($linkHtml, "<i class='icon icon-cube'></i> " . $product->name, '', "title='{$product->name}' class='closed' data-key='" . zget($productsPinYin, $product->name, '') . "'");
}
else
{
$linkHtml = $module == 'programplan' ? sprintf($link, $projectID, $product->id) : sprintf($link, $product->id);
$closedProductsHtml .= html::a($linkHtml, "<i class='icon icon-cube'></i> " . $product->name, '', "title='{$product->name}' class='closed' data-key='" . zget($productsPinYin, $product->name, '') . "'");
}
$objectID = ($product->type != 'platform' && $module == 'branch' && $method == 'manage') ? $productID : $product->id;
$linkHtml = $this->product->setParamsForLink($module, $link, $projectID, $objectID);
$closedProductsHtml .= html::a($linkHtml, "<i class='icon icon-cube'></i> " . $product->name, '', "title='{$product->name}' class='closed' data-key='" . zget($productsPinYin, $product->name, '') . "'");
}
}
?>
+5
View File
@@ -55,6 +55,11 @@
<?php echo html::select('type', $productTypeList, 'normal', "class='form-control'");?>
</td><td></td>
</tr>
<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>
<tr class='hide'>
<th><?php echo $lang->product->status;?></th>
<td><?php echo html::hidden('status', 'normal');?></td>
+1 -1
View File
@@ -122,5 +122,5 @@ $config->program->datatable->fieldList['PRJSurplus']['sort'] = 'no';
$config->program->datatable->fieldList['actions']['title'] = 'actions';
$config->program->datatable->fieldList['actions']['fixed'] = 'right';
$config->program->datatable->fieldList['actions']['width'] = '270';
$config->program->datatable->fieldList['actions']['width'] = '180';
$config->program->datatable->fieldList['actions']['required'] = 'yes';
+1 -1
View File
@@ -68,7 +68,6 @@ class program extends control
if(common::hasPriv('program', 'pgmcreate')) $this->lang->pageActions = html::a($this->createLink('program', 'pgmcreate'), "<i class='icon icon-sm icon-plus'></i> " . $this->lang->program->PGMCreate, '', "class='btn btn-secondary'");
$this->app->session->set('programList', $this->app->getURI(true));
$this->app->session->set('taskList', $this->app->getURI(true). "?PRJ=6");
$programType = $this->cookie->programType ? $this->cookie->programType : 'bylist';
@@ -789,6 +788,7 @@ class program extends control
*/
public function PRJEdit($projectID = 0, $programID = 0)
{
$this->app->loadLang('custom');
$this->lang->navGroup->program = 'project';
$this->app->loadLang('project');
$this->loadModel('productplan');
+3
View File
@@ -33,3 +33,6 @@
#projectTree ul > li.item-meas a.selected{color: #0c64eb;}
.side-col {padding-right: 20px; width: 18%}
#sidebar>.cell {width: 100%;}
td.c-actions{overflow: visible}
.c-actions .btn{overflow: visible}
+1 -1
View File
@@ -101,7 +101,7 @@ function computeEndDate(delta)
delta = parseInt(delta);
if(delta == 999)
{
$('#end').val('');
$('#end').val('2059-12-31');
$('#end').attr('disabled', 'disabled');
return false;
}
+16 -1
View File
@@ -30,6 +30,19 @@ function setCopyProject(copyProjectID)
location.href = createLink('program', 'PRJCreate', 'model=' + model + '&programID=' + programID + '&from=' + from + '&copyProjectID=' + copyProjectID);
}
function addNewProduct(obj)
{
if($(obj).attr('checked'))
{
$('#productName').closest('tr').removeClass('hidden');
}
else
{
$('#productName').closest('tr').addClass('hidden');
}
}
function setAclList(programID)
{
if(programID != 0)
@@ -66,7 +79,9 @@ function loadBranches(product)
if($('#productsBox .input-group:last select:first').val() != 0)
{
var length = $('#productsBox .input-group').size();
$('#productsBox .row').append('<div class="col-sm-4">' + $('#productsBox .col-sm-4:last').html() + '</div>');
var $html = $('#productsBox .col-sm-4:last').html();
$('#productsBox .col-sm-4:last').find('.input-group-addon').remove();
$('#productsBox .row').append('<div class="col-sm-4">' + $html + '</div>');
if($('#productsBox .input-group:last select').size() >= 2) $('#productsBox .input-group:last select:last').remove();
$('#productsBox .input-group:last .chosen-container').remove();
$('#productsBox .input-group:last select:first').attr('name', 'products[' + length + ']').attr('id', 'products' + length);
+1
View File
@@ -22,6 +22,7 @@ $lang->program->PRJManageView = 'Manage View';
$lang->program->PRJManagePriv = 'Manage Privilege';
$lang->program->PRJManageMembers = 'Manage Team';
$lang->program->export = 'Export';
$lang->program->addProduct = 'Add product';
$lang->program->PRJManageGroupMember = 'Manage Group';
$lang->program->PRJModuleSetting = 'List Settings';
$lang->program->PRJModuleOpen = 'Program Name';
+1
View File
@@ -22,6 +22,7 @@ $lang->program->PRJManageView = 'Manage View';
$lang->program->PRJManagePriv = 'Manage Privilege';
$lang->program->PRJManageMembers = 'Manage Team';
$lang->program->export = 'Export';
$lang->program->addProduct = 'Add Product';
$lang->program->PRJManageGroupMember = 'Manage Group';
$lang->program->PRJModuleSetting = 'List Settings';
$lang->program->PRJModuleOpen = 'Program Name';
+1
View File
@@ -22,6 +22,7 @@ $lang->program->PRJManageView = 'Manage View';
$lang->program->PRJManagePriv = 'Manage Privilege';
$lang->program->PRJManageMembers = 'Manage Team';
$lang->program->export = 'Export';
$lang->program->addProduct = 'Add product';
$lang->program->PRJManageGroupMember = 'Manage Group';
$lang->program->PRJModuleSetting = 'List Settings';
$lang->program->PRJModuleOpen = 'Program Name';
+1
View File
@@ -22,6 +22,7 @@ $lang->program->PRJManageView = 'Manage View';
$lang->program->PRJManagePriv = 'Manage Privilege';
$lang->program->PRJManageMembers = 'Manage Team';
$lang->program->export = 'Export';
$lang->program->addProduct = 'Add product';
$lang->program->PRJManageGroupMember = 'Manage Group';
$lang->program->PRJModuleSetting = 'List Settings';
$lang->program->PRJModuleOpen = 'Program Name';
+2 -1
View File
@@ -22,6 +22,7 @@ $lang->program->PRJManageView = '项目维护视野';
$lang->program->PRJManagePriv = '项目维护权限';
$lang->program->PRJManageMembers = '项目团队';
$lang->program->export = '导出';
$lang->program->addProduct = '新建产品';
$lang->program->PRJManageGroupMember = '维护分组用户';
$lang->program->PRJModuleSetting = '列表设置';
$lang->program->PRJModuleOpen = '显示项目集名';
@@ -91,7 +92,7 @@ $lang->program->cv = 'CV%';
$lang->program->PRJTeamCount = '项目成员';
$lang->program->PRJLongTime = '长期';
$lang->program->productNotEmpty = '请关联产品或创建产品。';
$lang->program->productNotEmpty = '请关联产品或创建产品。';
$lang->program->unitList[''] = '';
$lang->program->unitList['yuan'] = '元';
+23 -13
View File
@@ -73,7 +73,10 @@ class programModel extends model
return $this->dao->select('*')->from(TABLE_PROGRAM)
->where('type')->in('program,project')
->andWhere('deleted')->eq(0)
->beginIF(!$this->app->user->admin)->andWhere('id')->in($this->app->user->view->programs)->fi()
->beginIF(!$this->app->user->admin)
->andWhere('id')->in($this->app->user->view->programs)
->orWhere('id')->in($this->app->user->view->projects)
->fi()
->beginIF($status != 'all')->andWhere('status')->eq($status)->fi()
->beginIF(!$this->cookie->showClosed)->andWhere('status')->ne('closed')->fi()
->orderBy($orderBy)
@@ -1215,7 +1218,7 @@ class programModel extends model
->join('whitelist', ',')
->cleanInt('budget')
->stripTags($this->config->program->editor->prjcreate['id'], $this->config->allowedTags)
->remove('products,branch,plans,delta')
->remove('products,branch,plans,delta,newProduct,productName')
->get();
if($project->parent)
@@ -1238,7 +1241,7 @@ class programModel extends model
{
if(!empty($product)) $linkedProductsCount++;
}
if(empty($linkedProductsCount))
if(empty($linkedProductsCount) and !$this->post->productName)
{
dao::$errors[] = $this->lang->program->productNotEmpty;
return false;
@@ -1276,13 +1279,14 @@ class programModel extends model
{
$this->loadModel('project')->updateProducts($projectID);
}
else
if(isset($this->post->newProduct) || !$project->parent)
{
/* If parent not empty, link products or create products. */
$product = new stdclass();
$product->name = $project->name;
$product->code = $project->code;
$product->bind = 1;
$product->name = $this->post->productName ? $this->post->productName : $project->name;
$product->code = $this->post->productName ? $this->post->productName : $project->code;
$product->bind = $this->post->productName ? 0 : 1;
$product->acl = $project->acl = 'open' ? 'open' : 'private';
$product->PO = $project->PM;
$product->createdBy = $this->app->user->account;
@@ -1472,7 +1476,7 @@ class programModel extends model
echo $project->begin;
break;
case 'end':
echo $project->end == '2059-12-31' ? '' : $project->end;
echo $project->end;
break;
case 'PRJStatus':
echo zget($this->lang->program->statusList, $project->status);
@@ -1500,14 +1504,20 @@ class programModel extends model
common::printIcon('program', 'PRJManageMembers', "programID=$project->id", $project, 'list', 'persons');
common::printIcon('program', 'PRJWhitelist', "projectID=$project->id&programID=$programID", $project, 'list', 'group');
common::printIcon('program', 'PRJManageProducts', "projectID=$project->id&programID=$programID", $project, 'list', 'icon icon-menu-project');
common::printIcon('program', 'PRJStart', "programID=$project->id", $project, 'list', 'start', '', 'iframe', true);
common::printIcon('program', 'PRJActivate', "programID=$project->id", $project, 'list', 'magic', '', 'iframe', true);
common::printIcon('program', 'PRJSuspend', "programID=$project->id", $project, 'list', 'pause', '', 'iframe', true);
common::printIcon('program', 'PRJClose', "programID=$project->id", $project, 'list', 'off', '', 'iframe', true);
if(common::hasPriv('program', 'PRJEdit')) echo html::a(helper::createLink("program", "PRJEdit", "programID=$project->id"), "<i class='icon-edit'></i>", '', "class='btn' title='{$this->lang->edit}'");
common::printIcon('program', 'PRJDelete', "projectID=$project->id", $project, 'list', 'trash', 'hiddenwin', '', true);
echo "<button type='button' class='btn icon-ellipsis-v' data-toggle='context-dropdown' title={$this->lang->more}></button>";
echo "<div class='dropdown-menu pull-right w-150px'>";
common::printIcon('program', 'PRJStart', "programID=$project->id", $project, 'list', 'start', '', 'iframe btn-action', true);
common::printIcon('program', 'PRJActivate', "programID=$project->id", $project, 'list', 'magic', '', 'iframe btn-action', true);
common::printIcon('program', 'PRJSuspend', "programID=$project->id", $project, 'list', 'pause', '', 'iframe btn-action', true);
common::printIcon('program', 'PRJClose', "programID=$project->id", $project, 'list', 'off', '', 'iframe btn-action', true);
common::printIcon('program', 'PRJDelete', "projectID=$project->id", $project, 'list', 'trash', 'hiddenwin', 'btn-action', true);
echo "</div>";
break;
}
echo '</td>';
}
}
}
+18 -15
View File
@@ -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-250px'><?php echo $lang->actions;?></th>
<th class='text-center w-200px'><?php echo $lang->actions;?></th>
</tr>
</thead>
<tbody id='programTableList'>
@@ -53,33 +53,33 @@
</td>
<td class='c-status'><span class="status-program status-<?php echo $program->status?>"><?php echo zget($lang->project->statusList, $program->status, '');?></span></td>
<td><?php echo $program->begin;?></td>
<td><?php echo $program->end == '2059-12-31' ? '' : $program->end;?></td>
<td><?php echo $program->end;?></td>
<td class='text-left'><?php echo $program->budget ? $program->budget . ' ' . zget($lang->program->unitList, $program->budgetUnit) : '';?></td>
<td><?php echo zget($users, $program->PM);?></td>
<td class='text-right c-actions'>
<?php if($program->type == 'program'):?>
<?php common::printIcon('program', 'PRJStart', "programID=$program->id", $program, 'list', 'play', '', 'iframe', true);?>
<?php if(common::hasPriv('program', 'PGMEdit')) echo html::a($this->createLink("program", "pgmedit", "programID=$program->id"), "<i class='icon-edit'></i>", '', "class='btn' title='{$lang->edit}'");?>
<?php common::printIcon('program', 'PRJStart', "programID=$program->id", $program, 'list', 'play', '', 'iframe', true, '', $this->lang->program->PGMStart);?>
<?php if(common::hasPriv('program', 'PGMEdit')) echo html::a($this->createLink("program", "pgmedit", "programID=$program->id"), "<i class='icon-edit'></i>", '', "class='btn' title='{$this->lang->program->PGMEdit}'");?>
<?php common::printIcon('program', 'PGMCreate', "programID=$program->id", '', 'list', 'treemap-alt', '', '', '', '', $this->lang->program->PGMChildren);?>
<button type='button' class='btn icon-ellipsis-v' data-toggle='context-dropdown'></button>
<button type='button' class='btn icon-ellipsis-v' data-toggle='dropdown' title="<?php echo $this->lang->more;?>"></button>
<div class='dropdown-menu pull-right w-120px'>
<?php common::printIcon('program', 'PGMActivate', "programID=$program->id", $program, 'list', 'magic', '', 'iframe btn-action', true);?>
<?php common::printIcon('program', 'PRJSuspend', "programID=$program->id", $program, 'list', 'pause', '', 'iframe btn-action', true);?>
<?php common::printIcon('program', 'PGMClose', "programID=$program->id", $program, 'list', 'off', '', 'iframe btn-action', true);?>
<?php if(common::hasPriv('program', 'PGMDelete')) echo html::a($this->createLink("program", "pgmdelete", "programID=$program->id"), "<i class='icon-trash'></i>", 'hiddenwin', "class='btn btn-action' title='{$lang->delete}'");?>
<?php common::printIcon('program', 'PGMActivate', "programID=$program->id", $program, 'list', 'magic', '', 'iframe', true);?>
<?php common::printIcon('program', 'PRJSuspend', "programID=$program->id", $program, 'list', 'pause', '', 'iframe', true, '', $this->lang->program->PGMSuspend);?>
<?php common::printIcon('program', 'PGMClose', "programID=$program->id", $program, 'list', 'off', '', 'iframe', true);?>
<?php if(common::hasPriv('program', 'PGMDelete')) echo html::a($this->createLink("program", "pgmdelete", "programID=$program->id"), "<i class='icon-trash'></i>", 'hiddenwin', "class='btn' title='{$this->lang->program->PGMDelete}'");?>
</div>
<?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', '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='{$lang->edit}'");?>
<?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);?>
<button type='button' class='btn icon-ellipsis-v' data-toggle='context-dropdown'></button>
<button type='button' class='btn icon-ellipsis-v' data-toggle='dropdown' title="<?php echo $this->lang->more;?>"></button>
<div class='dropdown-menu pull-right w-120px'>
<?php common::printIcon('program', 'PRJActivate', "programID=$program->id", $program, 'list', 'magic', '', 'iframe btn-action', true);?>
<?php common::printIcon('program', 'PRJSuspend', "programID=$program->id", $program, 'list', 'pause', '', 'iframe btn-action', true);?>
<?php common::printIcon('program', 'PRJClose', "programID=$program->id", $program, 'list', 'off', '', 'iframe btn-action', true);?>
<?php if(common::hasPriv('program','PRJDelete')) echo html::a($this->createLink("program", "prjdelete", "programID=$program->id"), "<i class='icon-trash'></i>", 'hiddenwin', "class='btn btn-action' title='{$lang->delete}'");?>
<?php common::printIcon('program', 'PRJActivate', "programID=$program->id", $program, 'list', 'magic', '', 'iframe', true);?>
<?php common::printIcon('program', 'PRJSuspend', "programID=$program->id", $program, 'list', 'pause', '', 'iframe', true);?>
<?php common::printIcon('program', 'PRJClose', "programID=$program->id", $program, 'list', 'off', '', 'iframe', true);?>
<?php if(common::hasPriv('program','PRJDelete')) echo html::a($this->createLink("program", "prjdelete", "programID=$program->id"), "<i class='icon-trash'></i>", 'hiddenwin', "class='btn' title='{$this->lang->program->PRJDelete}'");?>
</div>
<?php endif;?>
</td>
@@ -93,6 +93,9 @@
#programTableList.sortable-sorting > tr {opacity: 0.7}
#programTableList.sortable-sorting > tr.drag-row {opacity: 1;}
#programTableList > tr.drop-not-allowed {opacity: 0.1!important}
#programList .c-actions {overflow: visible;}
#programList .c-actions .dropdown-menu {padding-right: 8px; margin-top: -4px;}
#programTableList > tr:last-child .c-actions .dropdown-menu {top: auto; bottom: 100%; margin-bottom: -5px;}
</style>
<?php js::set('originOrders', $originOrders);?>
<script>
+1 -1
View File
@@ -55,7 +55,7 @@
<?php echo html::input('begin', $program->begin, "class='form-control form-date' placeholder='" . $lang->program->begin . "' required");?>
<span class='input-group-addon'><?php echo $lang->program->to;?></span>
<?php $disabledEnd = $program->end == '2059-12-31' ? 'disabled' : '';?>
<?php echo html::input('end', $program->end == '2059-12-31' ? '' : $program->end, "class='form-control form-date' $disabledEnd placeholder='" . $lang->program->end . "' required");?>
<?php echo html::input('end', $program->end, "class='form-control form-date' $disabledEnd placeholder='" . $lang->program->end . "' required");?>
</div>
</td>
<?php $endValue = $program->end == '2059-12-31' ? 999 : '';?>
+7 -8
View File
@@ -49,7 +49,7 @@ else
<div id='mainContent' class='main-content'>
<div class='center-block'>
<div class='main-header'>
<h2><?php echo $lang->program->PRJCreate;?></h2>
<h2><?php echo $lang->program->PRJCreate . ' - ' . zget($lang->program->modelList, $model, '');?></h2>
<div class="pull-right btn-toolbar">
<button type='button' class='btn btn-link' data-toggle='modal' data-target='#copyProjectModal'><?php echo html::icon($lang->icons['copy'], 'muted') . ' ' . $lang->program->PRJCopy;?></button>
</div>
@@ -57,12 +57,7 @@ else
<form class='form-indicator main-form form-ajax' method='post' target='hiddenwin' id='dataform'>
<table class='table table-form'>
<tr>
<th class='w-120px'><?php echo $lang->program->PRJTemplate;?></th>
<td><?php echo zget($lang->program->modelList, $model, '');?></td><td></td><td>
</td>
</tr>
<tr>
<th><?php echo $lang->program->PGMParent;?></th>
<th class='w-120px'><?php echo $lang->program->PGMParent;?></th>
<td><?php echo html::select('parent', $programList, $programID, "class='form-control chosen' onchange='setParentProgram(this.value)'");?></td>
<td>
<icon class='icon icon-help' data-toggle='tooltip' data-placement='right' title=<?php echo $lang->program->PGMTips;?>></icon>
@@ -77,6 +72,10 @@ else
<th><?php echo $lang->program->PRJCode;?></th>
<td><?php echo html::input('code', $code, "class='form-control' required");?></td><td></td><td></td>
</tr>
<tr class='hidden'>
<th><?php echo $lang->product->name;?></th>
<td><?php echo html::input('productName', '', "class='form-control' required");?></td><td></td><td></td>
</tr>
<tr>
<th><?php echo $lang->project->manageProducts;?></th>
<td class='text-left' id='productsBox' colspan="3">
@@ -96,7 +95,7 @@ else
<div class='col-sm-4 <?php if($programID) echo 'required';?>'>
<div class='input-group'>
<?php echo html::select("products[$i]", $allProducts, '', "class='form-control chosen' onchange='loadBranches(this)'");?>
<span class='input-group-addon fix-border'></span>
<span class='input-group-addon'><?php echo html::checkBox('newProduct', $lang->program->addProduct, '', "onchange=addNewProduct(this);");?></span>
</div>
</div>
</div>
+8 -7
View File
@@ -28,12 +28,7 @@
<form class='form-indicator main-form form-ajax' method='post' target='hiddenwin' id='dataform'>
<table class='table table-form'>
<tr>
<th class='w-120px'><?php echo $lang->program->PRJTemplate;?></th>
<td><?php echo zget($lang->program->modelList, $project->model, '');?></td><td></td><td>
</td>
</tr>
<tr>
<th><?php echo $lang->program->PGMParent;?></th>
<th class='w-120px'><?php echo $lang->program->PGMParent;?></th>
<td><?php echo html::select('parent', $programList, $programID ? $programID : $project->parent, "class='form-control chosen' onchange='setParentProgram(this.value)'");?></td>
<td></td>
<td></td>
@@ -113,7 +108,7 @@
<span class='input-group-addon'><?php echo $lang->program->to;?></span>
<?php
$disabledEnd = $project->end == '2059-12-31' ? 'disabled' : '';
echo html::input('end', $project->end == '2059-12-31' ? '' : $project->end, "class='form-control form-date' onchange='computeWorkDays();' $disabledEnd placeholder='" . $lang->program->end . "' required");
echo html::input('end', $project->end, "class='form-control form-date' onchange='computeWorkDays();' $disabledEnd placeholder='" . $lang->program->end . "' required");
?>
</div>
</td>
@@ -133,6 +128,12 @@
<td></td>
</tr>
<?php endif;?>
<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>
<tr>
<th><?php echo $lang->program->PRJDesc;?></th>
<td colspan='3'>
+2 -2
View File
@@ -1274,7 +1274,7 @@ class project extends control
$projectProsucts = $this->project->getProducts($project->project);
foreach($projectProsucts as $product) $allProducts[$product->id] = $product->name;
$linkedProducts = $this->project->getProducts($project->project);
$linkedProducts = $this->project->getProducts($project->id);
$linkedBranches = array();
foreach($linkedProducts as $product)
{
@@ -1964,7 +1964,7 @@ class project extends control
$position[] = $this->lang->project->manageProducts;
$allProducts = $this->product->getProductPairsByProject($project->project);
$linkedProducts = $this->project->getProducts($project->project);
$linkedProducts = $this->project->getProducts($project->id);
$linkedBranches = array();
// Merge allProducts and linkedProducts for closed product.
foreach($linkedProducts as $product)
+31 -31
View File
@@ -57,12 +57,12 @@ $lang->project->totalLeft = '剩余';
$lang->project->progress = '进度';
$lang->project->hours = '预计 %s 消耗 %s 剩余 %s';
$lang->project->viewBug = '查看bug';
$lang->project->noProduct = "无{$lang->productCommon}{$lang->projectCommon}";
$lang->project->createStory = "添加{$lang->productSRCommon}";
$lang->project->noProduct = "无{$lang->projectCommon}{$lang->projectCommon}";
$lang->project->createStory = "添加{$lang->projectSRCommon}";
$lang->project->all = '所有';
$lang->project->undone = '未完成';
$lang->project->unclosed = '未关闭';
$lang->project->typeDesc = "运维{$lang->projectCommon}没有{$lang->productSRCommon}、bug、版本、测试功能。";
$lang->project->typeDesc = "运维{$lang->projectCommon}没有{$lang->projectSRCommon}、bug、版本、测试功能。";
$lang->project->mine = '我负责:';
$lang->project->other = '其他:';
$lang->project->deleted = '已删除';
@@ -126,7 +126,7 @@ $lang->project->burnByList['storyPoint'] = '按故事点查看';
$lang->project->index = "{$lang->projectCommon}主页";
$lang->project->task = '任务列表';
$lang->project->groupTask = '分组浏览任务';
$lang->project->story = "{$lang->productSRCommon}列表";
$lang->project->story = "{$lang->projectSRCommon}列表";
$lang->project->bug = 'Bug列表';
$lang->project->dynamic = '动态';
$lang->project->latestDynamic = '最新动态';
@@ -140,10 +140,10 @@ $lang->project->team = '团队成员';
$lang->project->doc = '文档列表';
$lang->project->doclib = '文档库列表';
$lang->project->manageProducts = '关联' . $lang->productCommon;
$lang->project->linkStory = "关联{$lang->productSRCommon}";
$lang->project->linkStory = "关联{$lang->projectSRCommon}";
$lang->project->linkStoryByPlan = "按照{$lang->planCommon}关联";
$lang->project->linkPlan = "关联{$lang->planCommon}";
$lang->project->unlinkStoryTasks = "未关联{$lang->productSRCommon}任务";
$lang->project->unlinkStoryTasks = "未关联{$lang->projectSRCommon}任务";
$lang->project->linkedProducts = '已关联';
$lang->project->unlinkedProducts = '未关联';
$lang->project->view = "{$lang->projectCommon}概况";
@@ -167,21 +167,21 @@ $lang->project->edit = "编辑{$lang->projectCommon}";
$lang->project->batchEdit = "批量编辑";
$lang->project->manageMembers = '团队管理';
$lang->project->unlinkMember = '移除成员';
$lang->project->unlinkStory = "移除{$lang->productSRCommon}";
$lang->project->unlinkStoryAB = "移除{$lang->productSRCommon}";
$lang->project->batchUnlinkStory = "批量移除{$lang->productSRCommon}";
$lang->project->unlinkStory = "移除{$lang->projectSRCommon}";
$lang->project->unlinkStoryAB = "移除{$lang->projectSRCommon}";
$lang->project->batchUnlinkStory = "批量移除{$lang->projectSRCommon}";
$lang->project->importTask = '转入任务';
$lang->project->importPlanStories = "按{$lang->planCommon}关联{$lang->productSRCommon}";
$lang->project->importPlanStories = "按{$lang->planCommon}关联{$lang->projectSRCommon}";
$lang->project->importBug = '导入Bug';
$lang->project->updateOrder = "{$lang->projectCommon}排序";
$lang->project->tree = '树状图';
$lang->project->treeTask = '只看任务';
$lang->project->treeStory = "只看{$lang->productSRCommon}";
$lang->project->treeStory = "只看{$lang->projectSRCommon}";
$lang->project->treeOnlyTask = '树状图只看任务';
$lang->project->treeOnlyStory = "树状图只看{$lang->productSRCommon}";
$lang->project->storyKanban = "{$lang->productSRCommon}看板";
$lang->project->storySort = "{$lang->productSRCommon}排序";
$lang->project->importPlanStory = '创建' . $lang->projectCommon . '成功!\n是否导入' . $lang->planCommon . '关联的相关' . $lang->productSRCommon . '?';
$lang->project->treeOnlyStory = "树状图只看{$lang->projectSRCommon}";
$lang->project->storyKanban = "{$lang->projectSRCommon}看板";
$lang->project->storySort = "{$lang->projectSRCommon}排序";
$lang->project->importPlanStory = '创建' . $lang->projectCommon . '成功!\n是否导入' . $lang->planCommon . '关联的相关' . $lang->projectSRCommon . '?';
$lang->project->iteration = '版本迭代';
$lang->project->iterationInfo = '迭代%s次';
$lang->project->viewAll = '查看所有';
@@ -201,7 +201,7 @@ $lang->project->statusSelects['closed'] = '已关闭';
$lang->project->statusSelects['cancel'] = '已取消';
$lang->project->groups[''] = '分组查看';
$lang->project->groups['story'] = "{$lang->productSRCommon}分组";
$lang->project->groups['story'] = "{$lang->projectSRCommon}分组";
$lang->project->groups['status'] = '状态分组';
$lang->project->groups['pri'] = '优先级分组';
$lang->project->groups['assignedTo'] = '指派给分组';
@@ -210,7 +210,7 @@ $lang->project->groups['closedBy'] = '关闭者分组';
$lang->project->groups['type'] = '类型分组';
$lang->project->groupFilter['story']['all'] = '所有';
$lang->project->groupFilter['story']['linked'] = "已关联{$lang->productSRCommon}的任务";
$lang->project->groupFilter['story']['linked'] = "已关联{$lang->projectSRCommon}的任务";
$lang->project->groupFilter['pri']['all'] = '所有';
$lang->project->groupFilter['pri']['noset'] = '未设置';
$lang->project->groupFilter['assignedTo']['undone'] = '未完成';
@@ -224,7 +224,7 @@ $lang->project->aboveAllProduct = "以上所有{$lang->productCommon}";
$lang->project->aboveAllProject = "以上所有{$lang->projectCommon}";
/* 页面提示。*/
$lang->project->linkStoryByPlanTips = "此操作会将所选{$lang->planCommon}下面的{$lang->productSRCommon}全部关联到此{$lang->projectCommon}中";
$lang->project->linkStoryByPlanTips = "此操作会将所选{$lang->planCommon}下面的{$lang->projectSRCommon}全部关联到此{$lang->projectCommon}中";
$lang->project->selectProject = "请选择{$lang->projectCommon}";
$lang->project->beginAndEnd = '起止时间';
$lang->project->begin = '开始日期';
@@ -242,9 +242,9 @@ $lang->project->groupSummaryAB = "<div>总任务 <strong>%s : </strong><spa
$lang->project->wbs = "分解任务";
$lang->project->batchWBS = "批量分解";
$lang->project->howToUpdateBurn = "<a href='https://api.zentao.net/goto.php?item=burndown&lang=zh-cn' target='_blank' title='如何更新燃尽图?' class='btn btn-link'>帮助 <i class='icon icon-help'></i></a>";
$lang->project->whyNoStories = "看起来没有{$lang->productSRCommon}可以关联。请检查下{$lang->projectCommon}关联的{$lang->productCommon}中有没有{$lang->productSRCommon},而且要确保它们已经审核通过。";
$lang->project->productStories = "{$lang->projectCommon}关联的{$lang->productSRCommon}是{$lang->productCommon}{$lang->productSRCommon}的子集,并且只有评审通过的{$lang->productSRCommon}才能关联。请<a href='%s'>关联{$lang->productSRCommon}</a>。";
$lang->project->haveDraft = "有%s条草稿状态的{$lang->productSRCommon}无法关联到该{$lang->projectCommon}";
$lang->project->whyNoStories = "看起来没有{$lang->projectSRCommon}可以关联。请检查下{$lang->projectCommon}关联的{$lang->productCommon}中有没有{$lang->projectSRCommon},而且要确保它们已经审核通过。";
$lang->project->productStories = "{$lang->projectCommon}关联的{$lang->projectSRCommon}是{$lang->productCommon}{$lang->projectSRCommon}的子集,并且只有评审通过的{$lang->projectSRCommon}才能关联。请<a href='%s'>关联{$lang->projectSRCommon}</a>。";
$lang->project->haveDraft = "有%s条草稿状态的{$lang->projectSRCommon}无法关联到该{$lang->projectCommon}";
$lang->project->doneProjects = '已结束';
$lang->project->selectDept = '选择部门';
$lang->project->selectDeptTitle = '选择一个部门的成员';
@@ -264,14 +264,14 @@ $lang->project->noMembers = '暂时没有团队成员。';
/* 交互提示。*/
$lang->project->confirmDelete = "您确定删除{$lang->projectCommon}[%s]吗?";
$lang->project->confirmUnlinkMember = "您确定从该{$lang->projectCommon}中移除该用户吗?";
$lang->project->confirmUnlinkStory = "您确定从该{$lang->projectCommon}中移除该{$lang->productSRCommon}吗?";
$lang->project->confirmUnlinkStory = "您确定从该{$lang->projectCommon}中移除该{$lang->projectSRCommon}吗?";
$lang->project->errorNoLinkedProducts = "该{$lang->projectCommon}没有关联的{$lang->productCommon},系统将转到{$lang->productCommon}关联页面";
$lang->project->errorSameProducts = "{$lang->projectCommon}不能关联多个相同的{$lang->productCommon}。";
$lang->project->accessDenied = "您无权访问该{$lang->projectCommon}!";
$lang->project->tips = '提示';
$lang->project->afterInfo = "{$lang->projectCommon}添加成功,您现在可以进行以下操作:";
$lang->project->setTeam = '设置团队';
$lang->project->linkStory = "关联{$lang->productSRCommon}";
$lang->project->linkStory = "关联{$lang->projectSRCommon}";
$lang->project->createTask = '创建任务';
$lang->project->goback = "返回任务列表";
$lang->project->noweekend = '去除周末';
@@ -310,12 +310,12 @@ $lang->project->placeholder->totalLeft = "{$lang->projectCommon}开始时的总
$lang->project->selectGroup = new stdclass();
$lang->project->selectGroup->done = '(已结束)';
$lang->project->orderList['order_asc'] = "{$lang->productSRCommon}排序正序";
$lang->project->orderList['order_desc'] = "{$lang->productSRCommon}排序倒序";
$lang->project->orderList['pri_asc'] = "{$lang->productSRCommon}优先级正序";
$lang->project->orderList['pri_desc'] = "{$lang->productSRCommon}优先级倒序";
$lang->project->orderList['stage_asc'] = "{$lang->productSRCommon}阶段正序";
$lang->project->orderList['stage_desc'] = "{$lang->productSRCommon}阶段倒序";
$lang->project->orderList['order_asc'] = "{$lang->projectSRCommon}排序正序";
$lang->project->orderList['order_desc'] = "{$lang->projectSRCommon}排序倒序";
$lang->project->orderList['pri_asc'] = "{$lang->projectSRCommon}优先级正序";
$lang->project->orderList['pri_desc'] = "{$lang->projectSRCommon}优先级倒序";
$lang->project->orderList['stage_asc'] = "{$lang->projectSRCommon}阶段正序";
$lang->project->orderList['stage_desc'] = "{$lang->projectSRCommon}阶段倒序";
$lang->project->kanban = "看板";
$lang->project->kanbanSetting = "看板设置";
@@ -352,7 +352,7 @@ $lang->project->featureBar['task']['unclosed'] = $lang->project->unclosed;
$lang->project->featureBar['task']['assignedtome'] = $lang->project->assignedToMe;
$lang->project->featureBar['task']['myinvolved'] = $lang->project->myInvolved;
$lang->project->featureBar['task']['delayed'] = '已延期';
$lang->project->featureBar['task']['needconfirm'] = "{$lang->productSRCommon}变更";
$lang->project->featureBar['task']['needconfirm'] = "{$lang->projectSRCommon}变更";
$lang->project->featureBar['task']['status'] = $lang->project->statusSelects[''];
$lang->project->featureBar['all']['all'] = $lang->project->all;
@@ -366,4 +366,4 @@ $lang->project->treeLevel = array();
$lang->project->treeLevel['all'] = '全部展开';
$lang->project->treeLevel['root'] = '全部折叠';
$lang->project->treeLevel['task'] = '全部显示';
$lang->project->treeLevel['story'] = "只看{$lang->productSRCommon}";
$lang->project->treeLevel['story'] = "只看{$lang->projectSRCommon}";
+9 -1
View File
@@ -790,6 +790,7 @@ class projectModel extends model
if(strpos($mode, 'noclosed') !== false and ($execution->status == 'done' or $execution->status == 'closed')) continue;
$pairs[$execution->id] = $execution->name;
}
if(strpos($mode, 'empty') !== false) $pairs[0] = '';
/* If the pairs is empty, to make sure there's an project in the pairs. */
@@ -994,6 +995,7 @@ class projectModel extends model
->where('project')->eq($projectID)
->beginIF($status == 'undone')->andWhere('status')->notIN('done,closed')->fi()
->beginIF($status != 'all' and $status != 'undone')->andWhere('status')->eq($status)->fi()
->beginIF(!$this->app->user->admin)->andWhere('id')->in($this->app->user->view->sprints)->fi()
->andWhere('deleted')->eq('0')
->orderBy($orderBy)
->page($pager)
@@ -1007,6 +1009,7 @@ class projectModel extends model
->andWhere('t2.project')->eq($projectID)
->beginIF($status == 'undone')->andWhere('t2.status')->notIN('done,closed')->fi()
->beginIF($status != 'all' and $status != 'undone')->andWhere('t2.status')->eq($status)->fi()
->beginIF(!$this->app->user->admin)->andWhere('t2.id')->in($this->app->user->view->sprints)->fi()
->andWhere('t2.deleted')->eq('0')
->orderBy($orderBy)
->page($pager)
@@ -1553,7 +1556,12 @@ class projectModel extends model
}
/* Build search form. */
if($type == 'projectStory') $this->config->product->search['module'] = 'projectStory';
if($type == 'projectStory')
{
$this->config->product->search['module'] = 'projectStory';
}
$this->config->product->search['fields']['title'] = str_replace($this->lang->productSRCommon, $this->lang->projectSRCommon, $this->lang->story->title);
$this->config->product->search['actionURL'] = $actionURL;
$this->config->product->search['queryID'] = $queryID;
$this->config->product->search['params']['product']['values'] = $productPairs + array('all' => $this->lang->product->allProductsOfProject);
+1 -1
View File
@@ -83,7 +83,7 @@
<td class='text-left <?php if(!empty($execution->children)) echo 'has-child';?>' title='<?php echo $execution->name?>'>
<?php
if(isset($execution->delay)) echo "<span class='label label-danger label-badge'>{$lang->project->delayed}</span> ";
echo html::a($this->createLink('project', 'view', 'project=' . $execution->id), $execution->name);
echo !empty($execution->children) ? $execution->name : html::a($this->createLink('project', 'view', 'project=' . $execution->id), $execution->name);
?>
<?php if(!empty($execution->children)):?>
<a class="plan-toggle" data-id="<?php echo $execution->id;?>"><i class="icon icon-angle-double-right"></i></a>
+10
View File
@@ -0,0 +1,10 @@
<?php
$config->release = new stdclass();
$config->release->create = new stdclass();
$config->release->edit = new stdclass();
$config->release->create->requiredFields = 'name,date';
$config->release->edit->requiredFields = 'name,date,build';
$config->release->editor = new stdclass();
$config->release->editor->create = array('id' => 'desc', 'tools' => 'simpleTools');
$config->release->editor->edit = array('id' => 'desc', 'tools' => 'simpleTools');
+604
View File
@@ -0,0 +1,604 @@
<?php
/**
* The control file of release 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 <chunsheng@cnezsoft.com>
* @package release
* @version $Id: control.php 4178 2013-01-20 09:32:11Z wwccss $
* @link http://www.zentao.net
*/
class projectrelease extends control
{
public $products = array();
/**
* Construct function, load module auto.
*
* @param string $moduleName
* @param string $methodName
* @access public
* @return void
*/
public function __construct($moduleName = '', $methodName = '')
{
parent::__construct($moduleName, $methodName);
$products = array();
$this->loadModel('product');
$this->loadModel('release');
$this->view->products = $this->products = $this->product->getProductPairsByProject($this->session->PRJ);
}
/**
* Common actions.
*
* @param int $productID
* @param int $branch
* @access public
* @return void
*/
public function commonAction($productID, $branch = 0)
{
$this->lang->product->menu = $this->lang->product->viewMenu;
$this->lang->product->switcherMenu = $this->loadModel('product')->getSwitcher($productID);
$this->loadModel('product');
$product = $this->product->getById($productID);
if(empty($product)) $this->locate($this->createLink('product', 'create'));
$this->view->product = $product;
$this->view->branch = $branch;
$this->view->branches = $product->type == 'normal' ? array() : $this->loadModel('branch')->getPairs($product->id);
$this->view->position[] = html::a($this->createLink('product', 'browse', "productID={$this->view->product->id}&branch=$branch"), $this->view->product->name);
$this->product->setMenu($this->product->getPairs(), $productID, $branch);
}
/**
* Browse releases.
*
* @param int $productID
* @param int $branch
* @param string $type
* @access public
* @return void
*/
public function browse($productID, $branch = 0, $type = 'all')
{
$this->commonAction($productID, $branch);
$this->session->set('releaseList', $this->app->getURI(true));
$this->view->title = $this->view->product->name . $this->lang->colon . $this->lang->release->browse;
$this->view->position[] = $this->lang->release->browse;
$this->view->releases = $this->projectrelease->getList($productID, $branch, $type);
$this->view->type = $type;
$this->display();
}
/**
* Create a release.
*
* @param int $productID
* @param int $branch
* @access public
* @return void
*/
public function create($productID, $branch = 0)
{
if(!empty($_POST))
{
$releaseID = $this->projectrelease->create($productID, $branch);
if(dao::isError()) $this->send(array('result' => 'fail', 'message' => dao::getError()));
$this->loadModel('action')->create('release', $releaseID, 'opened');
$this->executeHooks($releaseID);
if(isonlybody()) $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'closeModal' => true, 'callback' => "parent.loadProductBuilds($productID)"));
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => inlink('view', "releaseID=$releaseID")));
}
$builds = $this->loadModel('build')->getProductBuildPairs($productID, $branch, 'notrunk|withbranch', false);
$releaseBuilds = $this->projectrelease->getReleaseBuilds($productID, $branch);
foreach($releaseBuilds as $build) unset($builds[$build]);
unset($builds['trunk']);
$this->commonAction($productID, $branch);
$this->view->title = $this->view->product->name . $this->lang->colon . $this->lang->release->create;
$this->view->position[] = $this->lang->release->create;
$this->view->builds = $builds;
$this->view->productID = $productID;
$this->view->lastRelease = $this->projectrelease->getLast($productID, $branch);
$this->display();
}
/**
* Edit a release.
*
* @param int $releaseID
* @access public
* @return void
*/
public function edit($releaseID)
{
if(!empty($_POST))
{
$changes = $this->projectrelease->update($releaseID);
if(dao::isError()) $this->send(array('result' => 'fail', 'message' => dao::getError()));
$files = $this->loadModel('file')->saveUpload('release', $releaseID);
if($changes or $files)
{
$fileAction = '';
if(!empty($files)) $fileAction = $this->lang->addFiles . join(',', $files) . "\n" ;
$actionID = $this->loadModel('action')->create('release', $releaseID, 'Edited', $fileAction);
if(!empty($changes)) $this->action->logHistory($actionID, $changes);
}
$this->executeHooks($releaseID);
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => inlink('view', "releaseID=$releaseID")));
}
$this->loadModel('story');
$this->loadModel('bug');
$this->loadModel('build');
/* Get release and build. */
$release = $this->projectrelease->getById((int)$releaseID);
$this->commonAction($release->product, $release->branch);
$build = $this->build->getById($release->build);
$this->view->title = $this->view->product->name . $this->lang->colon . $this->lang->release->edit;
$this->view->position[] = $this->lang->release->edit;
$this->view->release = $release;
$this->view->build = $build;
$this->view->builds = $this->loadModel('build')->getProductBuildPairs($release->product, $release->branch, 'notrunk|withbranch', false);
$this->display();
}
/**
* View a release.
*
* @param int $releaseID
* @param string $type
* @param string $link
* @param string $param
* @param string $orderBy
* @param int $recTotal
* @param int $recPerPage
* @param int $pageID
* @access public
* @return void
*/
public function view($releaseID, $type = 'story', $link = 'false', $param = '', $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 100, $pageID = 1)
{
if($type == 'story') $this->session->set('storyList', $this->app->getURI(true));
if($type == 'bug' or $type == 'leftBug') $this->session->set('bugList', $this->app->getURI(true));
$this->loadModel('story');
$this->loadModel('bug');
/* Load pager. */
$this->app->loadClass('pager', $static = true);
if($this->app->getViewType() == 'mhtml') $recPerPage = 10;
$release = $this->projectrelease->getById((int)$releaseID, true);
if(!$release) die(js::error($this->lang->notFound) . js::locate('back'));
$storyPager = new pager($type == 'story' ? $recTotal : 0, $recPerPage, $type == 'story' ? $pageID : 1);
$stories = $this->dao->select('*')->from(TABLE_STORY)->where('id')->in($release->stories)->andWhere('deleted')->eq(0)
->beginIF($type == 'story')->orderBy($orderBy)->fi()
->page($storyPager)
->fetchAll('id');
$this->loadModel('common')->saveQueryCondition($this->dao->get(), 'story');
$stages = $this->dao->select('*')->from(TABLE_STORYSTAGE)->where('story')->in($release->stories)->andWhere('branch')->eq($release->branch)->fetchPairs('story', 'stage');
foreach($stages as $storyID => $stage)$stories[$storyID]->stage = $stage;
$bugPager = new pager($type == 'bug' ? $recTotal : 0, $recPerPage, $type == 'bug' ? $pageID : 1);
$bugs = $this->dao->select('*')->from(TABLE_BUG)->where('id')->in($release->bugs)->andWhere('deleted')->eq(0)
->beginIF($type == 'bug')->orderBy($orderBy)->fi()
->page($bugPager)
->fetchAll();
$this->loadModel('common')->saveQueryCondition($this->dao->get(), 'linkedBug');
$leftBugPager = new pager($type == 'leftBug' ? $recTotal : 0, $recPerPage, $type == 'leftBug' ? $pageID : 1);
$leftBugs = $this->dao->select('*')->from(TABLE_BUG)->where('id')->in($release->leftBugs)->andWhere('deleted')->eq(0)
->beginIF($type == 'leftBug')->orderBy($orderBy)->fi()
->page($leftBugPager)
->fetchAll();
$this->loadModel('common')->saveQueryCondition($this->dao->get(), 'leftBugs');
$this->commonAction($release->product);
$product = $this->product->getById($release->product);
$this->executeHooks($releaseID);
$this->view->title = "RELEASE #$release->id $release->name/" . $product->name;
$this->view->position[] = $this->lang->release->view;
$this->view->release = $release;
$this->view->stories = $stories;
$this->view->bugs = $bugs;
$this->view->leftBugs = $leftBugs;
$this->view->actions = $this->loadModel('action')->getList('release', $releaseID);
$this->view->users = $this->loadModel('user')->getPairs('noletter');
$this->view->type = $type;
$this->view->link = $link;
$this->view->param = $param;
$this->view->orderBy = $orderBy;
$this->view->branchName = $release->productType == 'normal' ? '' : $this->loadModel('branch')->getById($release->branch);
$this->view->storyPager = $storyPager;
$this->view->bugPager = $bugPager;
$this->view->leftBugPager = $leftBugPager;
$this->display();
}
/**
* Export the stories of release to HTML.
*
* @access public
* @return void
*/
public function export()
{
if(!empty($_POST))
{
$type = $this->post->type;
$html = '';
if($type == 'story' or $type == 'all')
{
$html .= "<h3>{$this->lang->release->stories}</h3>";
$this->loadModel('story');
$stories = $this->dao->select('id, title')->from(TABLE_STORY)->where($this->session->storyQueryCondition)
->beginIF($this->session->storyOrderBy != false)->orderBy($this->session->storyOrderBy)->fi()
->fetchAll('id');
foreach($stories as $story) $story->title = "<a href='" . common::getSysURL() . $this->createLink('story', 'view', "storyID=$story->id") . "' target='_blank'>$story->title</a>";
$fields = array('id' => $this->lang->story->id, 'title' => $this->lang->story->title);
$rows = $stories;
$html .= '<table><tr>';
foreach($fields as $fieldLabel) $html .= "<th><nobr>$fieldLabel</nobr></th>\n";
$html .= '</tr>';
foreach($rows as $row)
{
$html .= "<tr valign='top'>\n";
foreach($fields as $fieldName => $fieldLabel)
{
$fieldValue = isset($row->$fieldName) ? $row->$fieldName : '';
$html .= "<td><nobr>$fieldValue</nobr></td>\n";
}
$html .= "</tr>\n";
}
$html .= '</table>';
}
if($type == 'bug' or $type == 'all')
{
$html .= "<h3>{$this->lang->release->bugs}</h3>";
$this->loadModel('bug');
$bugs = $this->dao->select('id, title')->from(TABLE_BUG)->where($this->session->linkedBugQueryCondition)
->beginIF($this->session->bugOrderBy != false)->orderBy($this->session->bugOrderBy)->fi()
->fetchAll('id');
foreach($bugs as $bug) $bug->title = "<a href='" . common::getSysURL() . $this->createLink('bug', 'view', "bugID=$bug->id") . "' target='_blank'>$bug->title</a>";
$fields = array('id' => $this->lang->bug->id, 'title' => $this->lang->bug->title);
$rows = $bugs;
$html .= '<table><tr>';
foreach($fields as $fieldLabel) $html .= "<th><nobr>$fieldLabel</nobr></th>\n";
$html .= '</tr>';
foreach($rows as $row)
{
$html .= "<tr valign='top'>\n";
foreach($fields as $fieldName => $fieldLabel)
{
$fieldValue = isset($row->$fieldName) ? $row->$fieldName : '';
$html .= "<td><nobr>$fieldValue</nobr></td>\n";
}
$html .= "</tr>\n";
}
$html .= '</table>';
}
if($type == 'leftbug' or $type == 'all')
{
$html .= "<h3>{$this->lang->release->generatedBugs}</h3>";
$bugs = $this->dao->select('id, title')->from(TABLE_BUG)->where($this->session->leftBugsQueryCondition)
->beginIF($this->session->bugOrderBy != false)->orderBy($this->session->bugOrderBy)->fi()
->fetchAll('id');
foreach($bugs as $bug) $bug->title = "<a href='" . common::getSysURL() . $this->createLink('bug', 'view', "bugID=$bug->id") . "' target='_blank'>$bug->title</a>";
$fields = array('id' => $this->lang->bug->id, 'title' => $this->lang->bug->title);
$rows = $bugs;
$html .= '<table><tr>';
foreach($fields as $fieldLabel) $html .= "<th><nobr>$fieldLabel</nobr></th>\n";
$html .= '</tr>';
foreach($rows as $row)
{
$html .= "<tr valign='top'>\n";
foreach($fields as $fieldName => $fieldLabel)
{
$fieldValue = isset($row->$fieldName) ? $row->$fieldName : '';
$html .= "<td><nobr>$fieldValue</nobr></td>\n";
}
$html .= "</tr>\n";
}
$html .= '</table>';
}
$html = "<html><head><meta charset='utf-8'><title>{$this->post->fileName}</title><style>table, th, td{font-size:12px; border:1px solid gray; border-collapse:collapse;}</style></head><body>$html</body></html>";
die($this->fetch('file', 'sendDownHeader', array('fileName' => $this->post->fileName, 'html', $html)));
}
$this->display();
}
/**
* Link stories
*
* @param int $releaseID
* @param string $browseType
* @param int $param
* @param int $recTotal
* @param int $recPerPage
* @param int $pageID
* @access public
* @return void
*/
public function linkStory($releaseID = 0, $browseType = '', $param = 0, $recTotal = 0, $recPerPage = 100, $pageID = 1)
{
if(!empty($_POST['stories']))
{
$this->projectrelease->linkStory($releaseID);
die(js::locate(inlink('view', "releaseID=$releaseID&type=story"), 'parent'));
}
$this->session->set('storyList', inlink('view', "releaseID=$releaseID&type=story&link=true&param=" . helper::safe64Encode("&browseType=$browseType&queryID=$param")));
$release = $this->projectrelease->getById($releaseID);
$build = $this->loadModel('build')->getByID($release->build);
$this->commonAction($release->product);
$this->loadModel('story');
$this->loadModel('tree');
$this->loadModel('product');
/* Load pager. */
$this->app->loadClass('pager', $static = true);
$pager = new pager($recTotal, $recPerPage, $pageID);
/* Build search form. */
$queryID = ($browseType == 'bySearch') ? (int)$param : 0;
unset($this->config->product->search['fields']['product']);
unset($this->config->product->search['fields']['project']);
$this->config->product->search['actionURL'] = $this->createLink('release', 'view', "releaseID=$releaseID&type=story&link=true&param=" . helper::safe64Encode('&browseType=bySearch&queryID=myQueryID'));
$this->config->product->search['queryID'] = $queryID;
$this->config->product->search['style'] = 'simple';
$this->config->product->search['params']['plan']['values'] = $this->loadModel('productplan')->getForProducts(array($release->product => $release->product));
$this->config->product->search['params']['module']['values'] = $this->tree->getOptionMenu($release->product, $viewType = 'story', $startModuleID = 0);
$this->config->product->search['params']['status'] = array('operator' => '=', 'control' => 'select', 'values' => $this->lang->story->statusList);
if($this->session->currentProductType == 'normal')
{
unset($this->config->product->search['fields']['branch']);
unset($this->config->product->search['params']['branch']);
}
else
{
$this->config->product->search['fields']['branch'] = $this->lang->product->branch;
$branches = array('' => '') + $this->loadModel('branch')->getPairs($release->product, 'noempty');
if($release->branch) $branches = array('' => '', $release->branch => $branches[$release->branch]);
$this->config->product->search['params']['branch']['values'] = $branches;
}
$this->loadModel('search')->setSearchParams($this->config->product->search);
if($browseType == 'bySearch')
{
$allStories = $this->story->getBySearch($release->product, $release->branch, $queryID, 'id', $build->project ? $build->project : '', 'story', $release->stories, $pager);
}
else
{
$allStories = $this->story->getProjectStories($build->project, 't1.`order`_desc', 'byProduct', $release->product, 'story', $release->stories, $pager);
}
$this->view->allStories = $allStories;
$this->view->release = $release;
$this->view->releaseStories = empty($release->stories) ? array() : $this->story->getByList($release->stories);
$this->view->users = $this->loadModel('user')->getPairs('noletter');
$this->view->browseType = $browseType;
$this->view->param = $param;
$this->view->pager = $pager;
$this->display();
}
/**
* Unlink story
*
* @param int $releaseID
* @param int $storyID
* @access public
* @return void
*/
public function unlinkStory($releaseID, $storyID)
{
$this->projectrelease->unlinkStory($releaseID, $storyID);
/* 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'] = '';
}
$this->send($response);
}
die(js::reload('parent'));
}
/**
* Batch unlink story.
*
* @param int $releaseID
* @access public
* @return void
*/
public function batchUnlinkStory($releaseID)
{
$this->projectrelease->batchUnlinkStory($releaseID);
die(js::locate($this->createLink('release', 'view', "releaseID=$releaseID&type=story"), 'parent'));
}
/**
* Link bugs.
*
* @param int $releaseID
* @param string $browseType
* @param int $param
* @param string $type
* @param int $recTotal
* @param int $recPerPage
* @param int $pageID
* @access public
* @return void
*/
public function linkBug($releaseID = 0, $browseType = '', $param = 0, $type = 'bug', $recTotal = 0, $recPerPage = 100, $pageID = 1)
{
if(!empty($_POST['bugs']))
{
$this->projectrelease->linkBug($releaseID, $type);
die(js::locate(inlink('view', "releaseID=$releaseID&type=$type"), 'parent'));
}
$this->session->set('bugList', inlink('view', "releaseID=$releaseID&type=$type&link=true&param=" . helper::safe64Encode("&browseType=$browseType&queryID=$param")));
/* Set menu. */
$release = $this->projectrelease->getByID($releaseID);
$build = $this->loadModel('build')->getByID($release->build);
$this->commonAction($release->product);
/* Load pager. */
$this->app->loadClass('pager', $static = true);
$pager = new pager($recTotal, $recPerPage, $pageID);
/* Build the search form. */
$this->loadModel('bug');
$queryID = ($browseType == 'bysearch') ? (int)$param : 0;
unset($this->config->bug->search['fields']['product']);
$this->config->bug->search['actionURL'] = $this->createLink('release', 'view', "releaseID=$releaseID&type=$type&link=true&param=" . helper::safe64Encode('&browseType=bySearch&queryID=myQueryID'));
$this->config->bug->search['queryID'] = $queryID;
$this->config->bug->search['style'] = 'simple';
$this->config->bug->search['params']['plan']['values'] = $this->loadModel('productplan')->getForProducts(array($release->product => $release->product));
$this->config->bug->search['params']['module']['values'] = $this->loadModel('tree')->getOptionMenu($release->product, $viewType = 'bug', $startModuleID = 0);
$this->config->bug->search['params']['project']['values'] = $this->loadModel('product')->getExecutionPairsByProduct($release->product);
$this->config->bug->search['params']['openedBuild']['values'] = $this->loadModel('build')->getProductBuildPairs($release->product, $branch = 0, $params = '');
$this->config->bug->search['params']['resolvedBuild']['values'] = $this->config->bug->search['params']['openedBuild']['values'];
if($this->session->currentProductType == 'normal')
{
unset($this->config->bug->search['fields']['branch']);
unset($this->config->bug->search['params']['branch']);
}
else
{
$this->config->bug->search['fields']['branch'] = $this->lang->product->branch;
$branches = array('' => '') + $this->loadModel('branch')->getPairs($release->product, 'noempty');
if($release->branch) $branches = array('' => '', $release->branch => $branches[$release->branch]);
$this->config->bug->search['params']['branch']['values'] = $branches;
}
$this->loadModel('search')->setSearchParams($this->config->bug->search);
$allBugs = array();
$releaseBugs = $type == 'bug' ? $release->bugs : $release->leftBugs;
if($browseType == 'bySearch')
{
$allBugs = $this->bug->getBySearch($release->product, $release->branch, $queryID, 'id_desc', $releaseBugs, $pager);
}
elseif($build->project)
{
if($type == 'bug')
{
$allBugs = $this->bug->getReleaseBugs($build->id, $release->product, $release->branch, $releaseBugs, $pager);
}
elseif($type == 'leftBug')
{
$allBugs = $this->bug->getProductLeftBugs($build->id, $release->product, $release->branch, $releaseBugs, $pager);
}
}
$this->view->allBugs = $allBugs;
$this->view->releaseBugs = empty($releaseBugs) ? array() : $this->bug->getByList($releaseBugs);
$this->view->release = $release;
$this->view->users = $this->loadModel('user')->getPairs('noletter');
$this->view->browseType = $browseType;
$this->view->param = $param;
$this->view->type = $type;
$this->view->pager = $pager;
$this->display();
}
/**
* Unlink story
*
* @param int $releaseID
* @param int $bugID
* @param string $type
* @access public
* @return void
*/
public function unlinkBug($releaseID, $bugID, $type = 'bug')
{
$this->projectrelease->unlinkBug($releaseID, $bugID, $type);
/* 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'] = '';
}
$this->send($response);
}
die(js::reload('parent'));
}
/**
* Batch unlink story.
*
* @param int $releaseID
* @param string $type
* @access public
* @return void
*/
public function batchUnlinkBug($releaseID, $type = 'bug')
{
$this->projectrelease->batchUnlinkBug($releaseID, $type);
die(js::locate($this->createLink('release', 'view', "releaseID=$releaseID&type=$type"), 'parent'));
}
/**
* Change status.
*
* @param int $releaseID
* @param string $status
* @access public
* @return void
*/
public function changeStatus($releaseID, $status)
{
$this->projectrelease->changeStatus($releaseID, $status);
if(dao::isError()) die(js::error(dao::getError()));
$actionID = $this->loadModel('action')->create('release', $releaseID, 'changestatus', '', $status);
die(js::reload('parent'));
}
}
+2
View File
@@ -0,0 +1,2 @@
#releaseList {font-size: 13px;}
td{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap;}
+3
View File
@@ -0,0 +1,3 @@
.contentDiv { height:190px; overflow-y:auto; margin-bottom: 10px!important}
.contentDiv .panel-heading {line-height: 14px;}
.checkbox-primary{display:inline-block;}
+3
View File
@@ -0,0 +1,3 @@
.table-form > tbody > tr > td > .row > [class*="col-"] .panel-heading {line-height: 16px}
.contentDiv { height:190px; overflow-y:auto; margin-bottom: 10px!important}
.contentDiv .panel-heading {line-height: 14px;}
+11
View File
@@ -0,0 +1,11 @@
.checkbox.btn{margin-top:0px}
#releaseInfo > div {padding-top: 15px;}
.linkBox #queryBox .search-form .form-actions {padding-bottom: 5px;}
.linkBox .table-header {padding: 8px 15px; border-bottom: 1px solid #cbd0db;}
#unlinkStoryList, #unlinkBugList, #unlinkLeftBugList {border-top: 1px solid #cbd0db;}
#tabsNav .nav-tabs > li.pull-right {margin-right: 120px; margin-top: -5px}
#tabsNav .nav-tabs > li.active + li.pull-right {margin-right: 0;}
ol, ul { padding-left: 20px; }
+4
View File
@@ -0,0 +1,4 @@
$(document).ready(function()
{
$("a.preview").modalTrigger({width:1000, type:'iframe'});
})
+72
View File
@@ -0,0 +1,72 @@
function showLink(releaseID, type, param)
{
var method = type == 'story' ? 'linkStory' : 'linkBug';
if(typeof(param) == 'undefined') param = '&browseType=' + type + '&param=0';
if(type == 'leftBug') param += '&type=leftBug';
loadURL(createLink('release', method, 'releaseID=' + releaseID + param), type);
$('.actions').find("a[href*='" + type + "']").addClass('hidden');
}
/**
* Load URL.
*
* @param string $url
* @param string$type
* @access public
* @return void
*/
function loadURL(url, type)
{
$.get(url, function(data)
{
var $pane = $(type == 'story' ? '#stories' : (type == 'leftBug' ? '#leftBugs' : '#bugs'));
$pane.find('.main-table').hide();
var $linkBox = $pane.find('.linkBox');
$linkBox.html(data).removeClass('hidden');
$linkBox.find('[data-ride="table"]').table();
$linkBox.find('[data-ride="pager"]').pager();
$linkBox.find('[data-ride="pager"] li a.pager-item').click(function()
{
loadURL($(this).attr('href'), type);
return false;
});
$linkBox.find('[data-ride="pager"] .pager-size-menu a[data-size]').off('click');
$linkBox.find('[data-ride="pager"] .pager-size-menu a[data-size]').click(function()
{
line = $linkBox.find('[data-ride="pager"]').attr('data-link-creator');
line = line.replace('{recPerPage}', $(this).attr('data-size')).replace('{page}', $linkBox.find('[data-ride="pager"]').attr('data-page'));
$.cookie($linkBox.find('[data-ride="pager"]').attr('data-page-cookie'), $(this).attr('data-size'), {expires:config.cookieLife, path:config.webRoot});
loadURL(line, type);
return false;
});
$.toggleQueryBox(true, $linkBox.find('#queryBox'));
});
}
$(function()
{
if(link == 'true') showLink(releaseID, type, param);
var infoShowed = false;
$('.nav.nav-tabs a[data-toggle="tab"]').on('shown.zui.tab', function(e)
{
var href = $(e.target).attr('href');
var tabPane = $(href + '.tab-pane');
if(tabPane.size() == 0) return;
var formID = tabPane.find('.linkBox').find('form:last');
if(formID.size() == 0) formID = tabPane.find('form:last');
if(href == '#releaseInfo' && !infoShowed)
{
var $tr = $('#releaseInfo .detail-content .table-data tbody tr:first');
width = $tr.width() - $tr.find('th').width();
$('#releaseInfo img').each(function()
{
if($(this).parent().prop('tagName').toLowerCase() == 'a') $(this).unwrap();
setImageSize($(this), width, 0);
});
infoShowed = true;
}
});
})
+1
View File
@@ -0,0 +1 @@
<?php
+1
View File
@@ -0,0 +1 @@
<?php
+1
View File
@@ -0,0 +1 @@
<?php
+1
View File
@@ -0,0 +1 @@
<?php
+27
View File
@@ -0,0 +1,27 @@
<?php
/**
* The release module zh-cn file 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 <chunsheng@cnezsoft.com>
* @package release
* @version $Id: zh-cn.php 4129 2013-01-18 01:58:14Z wwccss $
* @link http://www.zentao.net
*/
$lang->projectrelease->common = '项目发布';
$lang->projectrelease->create = "创建发布";
$lang->projectrelease->edit = "编辑发布";
$lang->projectrelease->linkStory = "关联{$lang->productSRCommon}";
$lang->projectrelease->linkBug = "关联Bug";
$lang->projectrelease->delete = "删除发布";
$lang->projectrelease->deleted = '已删除';
$lang->projectrelease->view = "发布详情";
$lang->projectrelease->browse = "浏览发布";
$lang->projectrelease->changeStatus = "修改状态";
$lang->projectrelease->batchUnlink = "批量移除";
$lang->projectrelease->batchUnlinkStory = "批量移除{$lang->productSRCommon}";
$lang->projectrelease->batchUnlinkBug = "批量移除Bug";
$lang->projectrelease->unlinkStory = "移除{$lang->productSRCommon}";
$lang->projectrelease->unlinkBug = '移除Bug';
$lang->projectrelease->export = '导出HTML';
+1
View File
@@ -0,0 +1 @@
<?php
+395
View File
@@ -0,0 +1,395 @@
<?php
/**
* The model file of release 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 <chunsheng@cnezsoft.com>
* @package release
* @version $Id: model.php 4129 2013-01-18 01:58:14Z wwccss $
* @link http://www.zentao.net
*/
?>
<?php
class projectreleaseModel extends model
{
/**
* Get release by id.
*
* @param int $releaseID
* @param bool $setImgSize
* @access public
* @return object
*/
public function getByID($releaseID, $setImgSize = false)
{
$release = $this->dao->select('t1.*, t2.id as buildID, t2.filePath, t2.scmPath, t2.name as buildName, t2.project, t3.name as productName, t3.type as productType')
->from(TABLE_RELEASE)->alias('t1')
->leftJoin(TABLE_BUILD)->alias('t2')->on('t1.build = t2.id')
->leftJoin(TABLE_PRODUCT)->alias('t3')->on('t1.product = t3.id')
->where('t1.id')->eq((int)$releaseID)
->orderBy('t1.id DESC')
->fetch();
if(!$release) return false;
$this->loadModel('file');
$release = $this->file->replaceImgURL($release, 'desc');
$release->files = $this->file->getByObject('release', $releaseID);
if(empty($release->files))$release->files = $this->file->getByObject('build', $release->buildID);
if($setImgSize) $release->desc = $this->file->setImgSize($release->desc);
return $release;
}
/**
* Get list of releases.
*
* @param int $productID
* @param int $branch
* @param string $type
* @access public
* @return array
*/
public function getList($productID, $branch = 0, $type = 'all')
{
return $this->dao->select('t1.*, t2.name as productName, t3.id as buildID, t3.name as buildName, t3.project')
->from(TABLE_RELEASE)->alias('t1')
->leftJoin(TABLE_PRODUCT)->alias('t2')->on('t1.product = t2.id')
->leftJoin(TABLE_BUILD)->alias('t3')->on('t1.build = t3.id')
->where('t1.product')->eq((int)$productID)
->beginIF($branch)->andWhere('t1.branch')->eq($branch)->fi()
->beginIF($type != 'all')->andWhere('t1.status')->eq($type)->fi()
->andWhere('t1.deleted')->eq(0)
->orderBy('t1.date DESC')
->fetchAll();
}
/**
* Get last release.
*
* @param int $productID
* @param int $branch
* @access public
* @return bool | object
*/
public function getLast($productID, $branch = 0)
{
return $this->dao->select('id, name')->from(TABLE_RELEASE)
->where('product')->eq((int)$productID)
->beginIF($branch)->andWhere('branch')->eq($branch)->fi()
->orderBy('date DESC')
->limit(1)
->fetch();
}
/**
* Get release builds from product.
*
* @param int $productID
* @param int $branch
* @access public
* @return void
*/
public function getReleaseBuilds($productID, $branch = 0)
{
$releases = $this->dao->select('build')->from(TABLE_RELEASE)
->where('deleted')->eq(0)
->andWhere('product')->eq($productID)
->beginIF($branch)->andWhere('branch')->eq($branch)->fi()
->fetchAll('build');
return array_keys($releases);
}
/**
* Create a release.
*
* @param int $productID
* @param int $branch
* @access public
* @return int
*/
public function create($productID, $branch = 0)
{
$productID = (int)$productID;
$branch = (int)$branch;
$buildID = 0;
/* Check build if build is required. */
if(strpos($this->config->release->create->requiredFields, 'build') !== false and $this->post->build == false) return dao::$errors[] = sprintf($this->lang->error->notempty, $this->lang->release->build);
/* Check date must be not more than today. */
if($this->post->date > date('Y-m-d')) return dao::$errors[] = $this->lang->release->errorDate;
$release = fixer::input('post')
->add('PRJ', $this->session->PRJ)
->add('product', (int)$productID)
->add('branch', (int)$branch)
->setDefault('stories', '')
->join('stories', ',')
->join('bugs', ',')
->setIF($this->post->build == false, 'build', $buildID)
->stripTags($this->config->release->editor->create['id'], $this->config->allowedTags)
->remove('allchecker,files,labels,uid')
->get();
/* Auto create build when release is not link build. */
if(empty($release->build) and $release->name)
{
$build = $this->dao->select('*')->from(TABLE_BUILD)
->where('deleted')->eq('0')
->andWhere('name')->eq($release->name)
->andWhere('product')->eq($productID)
->andWhere('branch')->eq($branch)
->fetch();
if($build)
{
return dao::$errors['build'] = sprintf($this->lang->release->existBuild, $release->name);
}
else
{
$build = new stdclass();
$build->PRJ = $this->session->PRJ;
$build->product = (int)$productID;
$build->branch = (int)$branch;
$build->name = $release->name;
$build->date = $release->date;
$build->builder = $this->app->user->account;
$build->desc = $release->desc;
$build->project = 0;
$build = $this->loadModel('file')->processImgURL($build, $this->config->release->editor->create['id']);
$this->dao->insert(TABLE_BUILD)->data($build)
->autoCheck()
->check('name', 'unique', "product = {$productID} AND branch = {$branch} AND deleted = '0'")
->batchCheck($this->config->release->create->requiredFields, 'notempty')
->exec();
if(dao::isError()) return false;
$buildID = $this->dao->lastInsertID();
$release->build = $buildID;
}
}
if($release->build) $release->branch = $this->dao->select('branch')->from(TABLE_BUILD)->where('id')->eq($release->build)->fetch('branch');
$release = $this->loadModel('file')->processImgURL($release, $this->config->release->editor->create['id'], $this->post->uid);
$this->dao->insert(TABLE_RELEASE)->data($release)
->autoCheck()
->batchCheck($this->config->release->create->requiredFields, 'notempty')
->check('name', 'unique', "product = {$release->product} AND branch = {$release->branch} AND deleted = '0'");
if(dao::isError())
{
if(!empty($buildID)) $this->dao->delete()->from(TABLE_BUILD)->where('id')->eq($buildID)->exec();
return false;
}
$this->dao->exec();
if(dao::isError())
{
if(!empty($buildID)) $this->dao->delete()->from(TABLE_BUILD)->where('id')->eq($buildID)->exec();
}
else
{
$releaseID = $this->dao->lastInsertID();
$this->file->updateObjectID($this->post->uid, $releaseID, 'release');
$this->file->saveUpload('release', $releaseID);
$this->loadModel('score')->create('release', 'create', $releaseID);
return $releaseID;
}
return false;
}
/**
* Update a release.
*
* @param int $releaseID
* @access public
* @return void
*/
public function update($releaseID)
{
$releaseID = (int)$releaseID;
$oldRelease = $this->dao->select('*')->from(TABLE_RELEASE)->where('id')->eq($releaseID)->fetch();
$branch = $this->dao->select('branch')->from(TABLE_BUILD)->where('id')->eq((int)$this->post->build)->fetch('branch');
$release = fixer::input('post')->stripTags($this->config->release->editor->edit['id'], $this->config->allowedTags)
->add('branch', (int)$branch)
->setIF(!$this->post->marker, 'marker', 0)
->cleanInt('product')
->remove('files,labels,allchecker,uid')
->get();
$release = $this->loadModel('file')->processImgURL($release, $this->config->release->editor->edit['id'], $this->post->uid);
$this->dao->update(TABLE_RELEASE)->data($release)
->autoCheck()
->batchCheck($this->config->release->edit->requiredFields, 'notempty')
->check('name', 'unique', "id != '$releaseID' AND product = '{$release->product}' AND branch = '$branch' AND deleted = '0'")
->where('id')->eq((int)$releaseID)
->exec();
if(!dao::isError())
{
$this->file->updateObjectID($this->post->uid, $releaseID, 'release');
return common::createChanges($oldRelease, $release);
}
}
/**
* Link stories
*
* @param int $releaseID
* @access public
* @return void
*/
public function linkStory($releaseID)
{
$release = $this->getByID($releaseID);
$product = $this->loadModel('product')->getByID($release->product);
foreach($this->post->stories as $i => $storyID)
{
if(strpos(",{$release->stories},", ",{$storyID},") !== false) unset($_POST['stories'][$i]);
}
$release->stories .= ',' . join(',', $this->post->stories);
$this->dao->update(TABLE_RELEASE)->set('stories')->eq($release->stories)->where('id')->eq((int)$releaseID)->exec();
if($release->stories)
{
$this->loadModel('story');
$this->loadModel('action');
foreach($this->post->stories as $storyID)
{
/* Reset story stagedBy field for auto compute stage. */
$this->dao->update(TABLE_STORY)->set('stagedBy')->eq('')->where('id')->eq($storyID)->exec();
if($product->type != 'normal') $this->dao->update(TABLE_STORYSTAGE)->set('stagedBy')->eq('')->where('story')->eq($storyID)->andWhere('branch')->eq($release->branch)->exec();
$this->story->setStage($storyID);
$this->action->create('story', $storyID, 'linked2release', '', $releaseID);
}
}
}
/**
* Unlink story
*
* @param int $releaseID
* @param int $storyID
* @access public
* @return void
*/
public function unlinkStory($releaseID, $storyID)
{
$release = $this->getByID($releaseID);
$release->stories = trim(str_replace(",$storyID,", ',', ",$release->stories,"), ',');
$this->dao->update(TABLE_RELEASE)->set('stories')->eq($release->stories)->where('id')->eq((int)$releaseID)->exec();
$this->loadModel('action')->create('story', $storyID, 'unlinkedfromrelease', '', $releaseID);
}
/**
* Batch unlink story.
*
* @param int $releaseID
* @access public
* @return void
*/
public function batchUnlinkStory($releaseID)
{
$storyList = $this->post->storyIdList;
if(empty($storyList)) return true;
$release = $this->getByID($releaseID);
$release->stories = ",$release->stories,";
foreach($storyList as $storyID) $release->stories = str_replace(",$storyID,", ',', $release->stories);
$release->stories = trim($release->stories, ',');
$this->dao->update(TABLE_RELEASE)->set('stories')->eq($release->stories)->where('id')->eq((int)$releaseID)->exec();
$this->loadModel('action');
foreach($this->post->storyIdList as $unlinkStoryID) $this->action->create('story', $unlinkStoryID, 'unlinkedfromrelease', '', $releaseID);
}
/**
* Link bugs.
*
* @param int $releaseID
* @param string $type
* @access public
* @return void
*/
public function linkBug($releaseID, $type = 'bug')
{
$release = $this->getByID($releaseID);
$field = $type == 'bug' ? 'bugs' : 'leftBugs';
foreach($this->post->bugs as $i => $bugID)
{
if(strpos(",{$release->$field},", ",{$bugID},") !== false) unset($_POST['bugs'][$i]);
}
$release->$field .= ',' . join(',', $this->post->bugs);
$this->dao->update(TABLE_RELEASE)->set($field)->eq($release->$field)->where('id')->eq((int)$releaseID)->exec();
$this->loadModel('action');
foreach($this->post->bugs as $bugID) $this->action->create('bug', $bugID, 'linked2release', '', $releaseID);
}
/**
* Unlink bug.
*
* @param int $releaseID
* @param int $bugID
* @param string $type
* @access public
* @return void
*/
public function unlinkBug($releaseID, $bugID, $type = 'bug')
{
$release = $this->getByID($releaseID);
$field = $type == 'bug' ? 'bugs' : 'leftBugs';
$release->{$field} = trim(str_replace(",$bugID,", ',', ",{$release->$field},"), ',');
$this->dao->update(TABLE_RELEASE)->set($field)->eq($release->$field)->where('id')->eq((int)$releaseID)->exec();
$this->loadModel('action')->create('bug', $bugID, 'unlinkedfromrelease', '', $releaseID);
}
/**
* Batch unlink bug.
*
* @param int $releaseID
* @param string $type
* @access public
* @return void
*/
public function batchUnlinkBug($releaseID, $type = 'bug')
{
$bugList = $this->post->unlinkBugs;
if(empty($bugList)) return true;
$release = $this->getByID($releaseID);
$field = $type == 'bug' ? 'bugs' : 'leftBugs';
$release->$field = ",{$release->$field},";
foreach($bugList as $bugID) $release->$field = str_replace(",$bugID,", ',', $release->$field);
$release->$field = trim($release->$field, ',');
$this->dao->update(TABLE_RELEASE)->set($field)->eq($release->$field)->where('id')->eq((int)$releaseID)->exec();
$this->loadModel('action');
foreach($this->post->unlinkBugs as $unlinkBugID) $this->action->create('bug', $unlinkBugID, 'unlinkedfromrelease', '', $releaseID);
}
/**
* Change status.
*
* @param int $releaseID
* @param string $status
* @access public
* @return bool
*/
public function changeStatus($releaseID, $status)
{
$this->dao->update(TABLE_RELEASE)->set('status')->eq($status)->where('id')->eq($releaseID)->exec();
return dao::isError();
}
}
+106
View File
@@ -0,0 +1,106 @@
<?php
/**
* The browse view file of release 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 Yuchun Li <liyuchun@cnezsoft.com>
* @package release
* @version $Id: browse.html.php 4129 2020-11-25 11:58:14Z wwccss $
* @link http://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/tablesorter.html.php';?>
<?php js::set('confirmDelete', $lang->release->confirmDelete)?>
<div id="mainMenu" class="clearfix">
<div class="btn-toolbar pull-left">
<?php
echo html::a(inlink('browse', "productID={$product->id}&branch=$branch&type=all"), "<span class='text'>{$lang->release->all}</span>" . ($type == 'all' ? ' <span class="label label-light label-badge">' . count($releases) . '</span>' : ''), '', "id='allTab' class='btn btn-link" . ('all' == $type ? ' btn-active-text' : '') . "'");
echo html::a(inlink('browse', "productID={$product->id}&branch=$branch&type=normal"), "<span class='text'>{$lang->release->statusList['normal']}</span>" . ($type == 'normal' ? ' <span class="label label-light label-badge">' . count($releases) . '</span>' : ''), '', "id='normalTab' class='btn btn-link" . ('normal' == $type ? ' btn-active-text' : '') . "'");
echo html::a(inlink('browse', "productID={$product->id}&branch=$branch&type=terminate"), "<span class='text'>{$lang->release->statusList['terminate']}</span>" . ($type == 'terminate' ? ' <span class="label label-light label-badge">' . count($releases) . '</span>' : ''), '', "id='terminateTab' class='btn btn-link" . ('terminate' == $type ? ' btn-active-text' : '') . "'");
?>
</div>
<div class="btn-toolbar pull-right">
<?php if(common::canModify('product', $product)):?>
<?php common::printLink('projectrelease', 'create', "productID=$product->id&branch=$branch", "<i class='icon icon-plus'></i> {$lang->release->create}", '', "class='btn btn-primary'");?>
<?php endif;?>
</div>
</div>
<div id="mainContent" class='main-table'>
<?php if(empty($releases)):?>
<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 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>
</div>
<?php else:?>
<table class="table" id='releaseList'>
<thead>
<tr>
<th class='w-id'><?php echo $lang->release->id;?></th>
<th><?php echo $lang->release->name;?></th>
<th><?php echo $lang->release->build;?></th>
<?php if($product->type != 'normal'):?>
<th class='text-center w-100px'><?php echo $lang->product->branch;?></th>
<?php endif;?>
<th class='c-date text-center'><?php echo $lang->release->date;?></th>
<th class='text-center w-90px'><?php echo $lang->release->status;?></th>
<?php
$extendFields = $this->projectrelease->getFlowExtendFields();
foreach($extendFields as $extendField) echo "<th>{$extendField->name}</th>";
?>
<th class='c-actions-5 text-center'><?php echo $lang->actions;?></th>
</tr>
</thead>
<tbody>
<?php foreach($releases as $release):?>
<?php $canBeChanged = common::canBeChanged('release', $release);?>
<tr>
<td><?php echo html::a(inlink('view', "releaseID=$release->id"), sprintf('%03d', $release->id));?></td>
<td>
<?php
$flagIcon = $release->marker ? "<icon class='icon icon-flag-alt' title='{$lang->release->marker}'></icon> " : '';
echo html::a(inlink('view', "release=$release->id"), $release->name) . $flagIcon;
?>
</td>
<td title='<?php echo $release->buildName?>'><?php echo empty($release->project) ? $release->buildName : html::a($this->createLink('build', 'view', "buildID=$release->buildID"), $release->buildName);?></td>
<?php if($product->type != 'normal'):?>
<td class='text-center' title='<?php echo zget($branches, $release->branch, '');?>'><?php echo $branches[$release->branch];?></td>
<?php endif;?>
<td class='text-center'><?php echo $release->date;?></td>
<?php $status = $this->processStatus('release', $release);?>
<td class='c-status text-center' title='<?php echo $status;?>'>
<span class="status-release status-<?php echo $release->status?>"><?php echo $status;?></span>
</td>
<?php foreach($extendFields as $extendField) echo "<td>" . $this->loadModel('flow')->getFieldValue($extendField, $release) . "</td>";?>
<td class='c-actions'>
<?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))
{
$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]}'");
}
common::printIcon('projectrelease', 'edit', "release=$release->id", $release, 'list');
if(common::hasPriv('release', 'delete', $release))
{
$deleteURL = $this->createLink('release', '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}'");
}
}
?>
</td>
</tr>
<?php endforeach;?>
</tbody>
</table>
<?php endif;?>
</div>
<?php include '../../common/view/footer.html.php';?>
@@ -0,0 +1,73 @@
<?php
/**
* The create view of release 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 <chunsheng@cnezsoft.com>
* @package release
* @version $Id: create.html.php 4728 2013-05-03 06:14:34Z chencongzhi520@gmail.com $
* @link http://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/kindeditor.html.php';?>
<div id='mainContent' class='main-content'>
<div class='center-block'>
<div class='main-header'>
<h2><?php echo $lang->release->create;?></h2>
</div>
<form class='load-indicator main-form form-ajax' id='dataform' method='post' enctype='multipart/form-data'>
<table class='table table-form'>
<tbody>
<tr>
<th><?php echo $lang->release->name;?></th>
<td><?php echo html::input('name', '', "class='form-control' required");?></td>
<td class='muted'>
<div class='checkbox-primary'>
<input id='marker' name='marker' value='1' type='checkbox' />
<label for='marker'><?php echo $lang->release->marker;?></label>
</div>
<?php if($lastRelease) echo '(' . $lang->release->last . ': ' . $lastRelease->name . ')';?>
</td>
</tr>
<tr>
<th><?php echo $lang->release->build;?></th>
<td><?php echo html::select('build', $builds, '', "class='form-control chosen'");?></td><td></td>
</tr>
<tr>
<th><?php echo $lang->release->date;?></th>
<td><?php echo html::input('date', helper::today(), "class='form-control form-date' required");?></td><td></td>
</tr>
<tr class='hide'>
<th><?php echo $lang->release->status;?></th>
<td><?php echo html::hidden('status', 'normal', "disabled");?></td>
<td></td>
</tr>
<?php $this->printExtendFields('', 'table');?>
<tr>
<th><?php echo $lang->release->desc;?></th>
<td colspan='2'><?php echo html::textarea('desc', '', "rows='10' class='form-control kindeditor' hidefocus='true'");?></td>
</tr>
<tr>
<th><?php echo $lang->files;?></th>
<td colspan='2'><?php echo $this->fetch('file', 'buildform');?></td>
</tr>
<tr>
<td colspan='3' class='text-center form-actions'>
<?php echo html::submitButton();?>
<?php echo html::backButton();?>
</td>
</tr>
</tbody>
</table>
</form>
</div>
</div>
<script>
$(function()
{
$(".form-date").datetimepicker('setEndDate', '<?php echo date(DT_DATE1)?>');
});
</script>
<?php include '../../common/view/footer.html.php';?>
+71
View File
@@ -0,0 +1,71 @@
<?php
/**
* The edit view of release 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 <chunsheng@cnezsoft.com>
* @package release
* @version $Id: edit.html.php 4728 2013-05-03 06:14:34Z chencongzhi520@gmail.com $
* @link http://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/kindeditor.html.php';?>
<div id='mainContent' class='main-content'>
<div class='center-block'>
<div class='main-header'>
<h2>
<span class='prefix'><?php echo html::icon($lang->icons['release']);?> <strong><?php echo $release->id;?></strong></span>
<strong><?php echo html::a(inlink('view', "release=$release->id"), $release->name);?></strong>
<small><?php echo $lang->arrow . ' ' . $lang->release->edit;?></small>
</h2>
</div>
<form class='load-indicator main-form form-ajax' method='post' target='hiddenwin' id='dataform' enctype='multipart/form-data'>
<table class='table table-form'>
<tbody>
<tr>
<th><?php echo $lang->release->name;?></th>
<td><?php echo html::input('name', $release->name, "class='form-control' required");?></td>
<td>
<?php $checked = !empty($release->marker) ? "checked='checked'" : '';?>
<div class='checkbox-primary'>
<input id='marker' name='marker' value='1' type='checkbox' <?php echo $checked;?> />
<label for='marker'><?php echo $lang->release->marker;?></label>
</div>
</td>
</tr>
<tr>
<th><?php echo $lang->release->build;?></th>
<td><?php echo html::select('build', $builds, $release->build, "class='form-control chosen' required"); ?></td><td></td>
</tr>
<tr>
<th><?php echo $lang->release->date;?></th>
<td><?php echo html::input('date', $release->date, "class='form-control form-date' required");?></td><td></td>
</tr>
<tr>
<th><?php echo $lang->release->status;?></th>
<td><?php echo html::select('status', $lang->release->statusList, $release->status, "class='form-control'");?></td><td></td>
</tr>
<?php $this->printExtendFields($release, 'table');?>
<tr>
<th><?php echo $lang->release->desc;?></th>
<td colspan='2'><?php echo html::textarea('desc', htmlspecialchars($release->desc), "rows=10 class='form-control kindeditor' hidefocus='true'");?></td>
</tr>
<tr>
<th><?php echo $lang->files;?></th>
<td colspan='2'><?php echo $this->fetch('file', 'buildform');?></td>
</tr>
<tr>
<td colspan='3' class='text-center form-actions'>
<?php echo html::submitButton();?>
<?php echo html::backButton();?>
<?php echo html::hidden('product', $release->product);?>
</td>
</tr>
</tbody>
</table>
</form>
</div>
</div>
<?php include '../../common/view/footer.html.php';?>
+55
View File
@@ -0,0 +1,55 @@
<?php
/**
* The export stories or bugs to html view file of release 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 Congzhi Chen <congzhi@cnezsoft.com>
* @package file
* @version $Id$
* @link http://www.zentao.net
*/
?>
<?php include '../../common/view/header.lite.html.php';?>
<script>
function setDownloading()
{
if(navigator.userAgent.toLowerCase().indexOf("opera") > -1) return true; // Opera don't support, omit it.
$.cookie('downloading', 0);
time = setInterval("closeWindow()", 300);
return true;
}
function closeWindow()
{
if($.cookie('downloading') == 1 || i >= 30)
{
parent.$.closeModal();
$.cookie('downloading', null);
clearInterval(time);
}
i ++;
}
</script>
<div id='mainContent' class='main-content'>
<div class='main-header'>
<h2><?php echo $lang->export;?></h2>
</div>
<form method='post' target='hiddenwin' onsubmit='setDownloading();' style='padding: 10px 5%'>
<table class='w-p100'>
<tr>
<td>
<div class='input-group'>
<span class='input-group-addon'><?php echo $lang->setFileName;?></span>
<?php echo html::input('fileName', '', "class='form-control'");?>
<span class='input-group-addon'>.html</span>
<?php echo html::select('type', $lang->release->exportTypeList, 'all', "class='form-control'")?>
</div>
</td>
<td><?php echo html::submitButton($lang->export, '', 'btn btn-primary');?></td>
</tr>
</table>
</form>
</div>
<?php include '../../common/view/footer.lite.html.php';?>
@@ -0,0 +1,81 @@
<?php
/**
* The link bug view of release 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 Yidong Wang <yidong@cnezsoft.com>
* @package release
* @version $Id: linkbug.html.php 5096 2013-07-11 07:02:43Z chencongzhi520@gmail.com $
* @link http://www.zentao.net
*/
?>
<div id='queryBox' data-module='bug' class='show'></div>
<?php
$releaseBugs = $type == 'bug' ? $release->bugs : $release->leftBugs;
$formID = $type == 'leftBug' ? 'unlinkedLeftBugsForm' : 'unlinkedBugsForm';
?>
<div id='<?php echo $type == 'bug' ? 'unlinkBugList' : 'unlinkLeftBugList';?>'>
<form class='main-table' method='post' target='hiddenwin' id='<?php echo $formID?>' action='<?php echo $this->createLink('release', 'linkBug', "releaseID=$release->id&browseType=$browseType&param=$param&type=$type")?>' data-ride='table'>
<div class='table-header hl-primary text-primary strong'>
<?php echo html::icon('unlink');?> <?php echo $lang->productplan->unlinkedBugs;?>
</div>
<table class='table tablesorter'>
<thead>
<tr class='text-center'>
<th class='c-id text-left'>
<?php if($allBugs):?>
<div class="checkbox-primary check-all" title="<?php echo $lang->selectAll?>">
<label></label>
</div>
<?php endif;?>
<?php echo $lang->idAB;?>
</th>
<th class='c-pri'><?php echo $lang->priAB;?></th>
<th class='text-left'><?php echo $lang->bug->title;?></th>
<th class='c-user'><?php echo $lang->openedByAB;?></th>
<th class='c-user'><?php echo $lang->bug->resolvedBy;?></th>
<th class='w-80px'><?php echo $lang->statusAB;?></th>
</tr>
</thead>
<tbody class='text-center'>
<?php $unlinkedCount = 0;?>
<?php foreach($allBugs as $bug):?>
<tr>
<td class='c-id text-left'>
<?php echo html::checkbox('bugs', array($bug->id => sprintf('%03d', $bug->id)), ($type == 'leftBug' or $bug->status == 'resolved' or $bug->status == 'closed') ? $bug->id : '');?>
</td>
<td><span class='label-pri label-pri-<?php echo $bug->pri;?>' title='<?php echo zget($lang->bug->priList, $bug->pri, $bug->pri)?>'><?php echo zget($lang->bug->priList, $bug->pri, $bug->pri)?></span></td>
<td class='text-left nobr' title='<?php echo $bug->title?>'><?php echo html::a($this->createLink('bug', 'view', "bugID=$bug->id", '', true), $bug->title, '', "data-toggle='modal' data-type='iframe' data-width='90%'");?></td>
<td><?php echo zget($users, $bug->openedBy);?></td>
<td><?php echo zget($users, $bug->resolvedBy);?></td>
<td>
<span class='status-bug status-<?php echo $bug->status?>'><?php echo $this->processStatus('bug', $bug);?></span>
</td>
</tr>
<?php $unlinkedCount++;?>
<?php endforeach;?>
</tbody>
</table>
<div class='table-footer'>
<?php if($unlinkedCount):?>
<div class="checkbox-primary check-all"><label><?php echo $lang->selectAll?></label></div>
<div class="table-actions btn-toolbar">
<?php echo html::submitButton($lang->release->linkBug, '', 'btn btn-secondary');?>
</div>
<?php endif;?>
<div class="btn-toolbar">
<?php echo html::a(inlink('view', "releaseID=$release->id&type=$type"), $lang->goback, '', "class='btn'");?>
</div>
<div class='table-statistic'></div>
<?php $pager->show('right', 'pagerjs');?>
</div>
</form>
</div>
<script>
$(function()
{
$('#<?php echo $formID;?> .tablesorter').sortTable();
setForm()
});
</script>
@@ -0,0 +1,88 @@
<?php
/**
* The link story view of release 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 Yidong Wang <yidong@cnezsoft.com>
* @package release
* @version $Id: linkstory.html.php 5096 2013-07-11 07:02:43Z chencongzhi520@gmail.com $
* @link http://www.zentao.net
*/
?>
<div id='queryBox' data-module='story' class='show'></div>
<div id='unlinkStoryList'>
<form class='main-table' method='post' target='hiddenwin' id='unlinkedStoriesForm' action='<?php echo $this->createLink('release', 'linkStory', "releaseID=$release->id&browseType=$browseType&param=$param")?>' data-ride='table'>
<div class='table-header hl-primary text-primary strong'>
<?php echo html::icon('unlink');?> <?php echo $lang->productplan->unlinkedStories;?>
</div>
<table class='table tablesorter'>
<thead>
<tr class='text-center'>
<th class='c-id text-left'>
<?php if($allStories):?>
<div class="checkbox-primary check-all" title="<?php echo $lang->selectAll?>">
<label></label>
</div>
<?php endif;?>
<?php echo $lang->idAB;?>
</th>
<th class='c-pri'><?php echo $lang->priAB;?></th>
<th class='text-left'><?php echo $lang->story->title;?></th>
<th class='c-user'> <?php echo $lang->openedByAB;?></th>
<th class='c-user'> <?php echo $lang->assignedToAB;?></th>
<th class='w-50px'> <?php echo $lang->story->estimateAB;?></th>
<th class='c-status'><?php echo $lang->statusAB;?></th>
<th class='w-80px'><?php echo $lang->story->stageAB;?></th>
</tr>
</thead>
<tbody class='text-center'>
<?php $unlinkedCount = 0;?>
<?php foreach($allStories as $story):?>
<tr>
<td class='c-id text-left'>
<div class="checkbox-primary">
<input type='checkbox' name='stories[]' value='<?php echo $story->id;?>' <?php if($story->stage == 'developed' or $story->status == 'closed') echo 'checked';?> />
<label></label>
</div>
<?php printf('%03d', $story->id);?>
</td>
<td><span class='label-pri <?php echo 'label-pri-' . $story->pri;?>' title='<?php echo zget($lang->story->priList, $story->pri)?>'><?php echo zget($lang->story->priList, $story->pri)?></span></td>
<td class='text-left nobr' title='<?php echo $story->title?>'>
<?php
if($story->parent > 0) echo "<span class='label'>{$lang->story->childrenAB}</span>";
echo html::a($this->createLink('story', 'view', "storyID=$story->id", '', true), $story->title, '', "data-toggle='modal' data-type='iframe' data-width='90%'");
?>
</td>
<td><?php echo zget($users, $story->openedBy);?></td>
<td><?php echo zget($users, $story->assignedTo);?></td>
<td><?php echo $story->estimate;?></td>
<td><span class='status-story status-<?php echo $story->status?>'><?php echo $this->processStatus('story', $story);?></span></td>
<td><?php echo zget($lang->story->stageList, $story->stage);?></td>
</tr>
<?php $unlinkedCount++;?>
<?php endforeach;?>
</tbody>
</table>
<div class='table-footer'>
<?php if($unlinkedCount):?>
<div class="checkbox-primary check-all"><label><?php echo $lang->selectAll?></label></div>
<div class='table-actions btn-toolbar'>
<?php echo html::submitButton($lang->release->linkStory, '', 'btn btn-secondary');?>
</div>
<?php endif;?>
<div class="btn-toolbar">
<?php echo html::a(inlink('view', "releaseID=$release->id&type=story"), $lang->goback, '', "class='btn'");?>
</div>
<div class='table-statistic'></div>
<?php $pager->show('right', 'pagerjs');?>
</div>
</form>
</div>
<script>
$(function()
{
$('#unlinkStoryList .tablesorter').sortTable();
setForm();
});
</script>
+410
View File
@@ -0,0 +1,410 @@
<?php
/**
* The view file of release module's view method 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 <chunsheng@cnezsoft.com>
* @package release
* @version $Id: view.html.php 4386 2013-02-19 07:37:45Z chencongzhi520@gmail.com $
* @link http://www.zentao.net
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/tablesorter.html.php';?>
<?php js::set('confirmUnlinkStory', $lang->release->confirmUnlinkStory)?>
<?php js::set('confirmUnlinkBug', $lang->release->confirmUnlinkBug)?>
<div id='mainMenu' class='clearfix'>
<div class='btn-toolbar pull-left'>
<?php $browseLink = $this->session->releaseList ? $this->session->releaseList : inlink('browse', "productID=$release->product");?>
<?php common::printBack($browseLink, 'btn btn-primary');?>
<div class='divider'></div>
<div class='page-title'>
<span class='label label-id'><?php echo $release->id;?></span>
<span class='text' title='<?php echo $release->name;?>'><?php echo $release->name;?></span>
<?php $flagIcon = $release->marker ? "<icon class='icon icon-flag-alt' title='{$lang->release->marker}'></icon> " : '';?>
<?php echo $flagIcon;?>
<?php if($release->deleted):?>
<span class='label label-danger'><?php echo $lang->release->deleted;?></span>
<?php endif; ?>
</div>
</div>
<div class='btn-toolbar pull-right'>
<?php
$canBeChanged = common::canBeChanged('release', $release);
if(!$release->deleted and $canBeChanged)
{
echo $this->buildOperateMenu($release, 'view');
if(common::hasPriv('release', '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'");
}
?>
</div>
</div>
<div id='mainContent' class='main-content'>
<div class='main-col'>
<div class='main'>
<div class='tabs' id='tabsNav'>
<?php $countStories = count($stories); $countBugs = count($bugs); $countLeftBugs = count($leftBugs);?>
<ul class='nav nav-tabs'>
<li <?php if($type == 'story') echo "class='active'"?>><a href='#stories' data-toggle='tab'><?php echo html::icon($lang->icons['story'], 'text-green') . ' ' . $lang->release->stories;?></a></li>
<li <?php if($type == 'bug') echo "class='active'"?>><a href='#bugs' data-toggle='tab'><?php echo html::icon($lang->icons['bug'], 'text-green') . ' ' . $lang->release->bugs;?></a></li>
<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>
<?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):?>
<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');
$canBatchClose = common::hasPriv('story', 'batchClose');
?>
<?php $vars = "releaseID={$release->id}&type=story&link=$link&param=$param&orderBy=%s";?>
<thead>
<tr class='text-center'>
<th class='c-id text-left'>
<?php if(($canBatchUnlink or $canBatchClose) and $canBeChanged):?>
<div class="checkbox-primary check-all" title="<?php echo $lang->selectAll?>">
<label></label>
</div>
<?php endif;?>
<?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?>
</th>
<th class='c-pri'> <?php common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);?></th>
<th class="text-left"><?php common::printOrderLink('title', $orderBy, $vars, $lang->story->title);?></th>
<th class='c-user'> <?php common::printOrderLink('openedBy', $orderBy, $vars, $lang->openedByAB);?></th>
<th class='w-80px'> <?php common::printOrderLink('estimate', $orderBy, $vars, $lang->story->estimateAB);?></th>
<th class='w-90px'> <?php common::printOrderLink('status', $orderBy, $vars, $lang->statusAB);?></th>
<th class='w-100px'> <?php common::printOrderLink('stage', $orderBy, $vars, $lang->story->stageAB);?></th>
<th class='c-actions-1'> <?php echo $lang->actions?></th>
</tr>
</thead>
<tbody class='text-center'>
<?php foreach($stories as $storyID => $story):?>
<?php $storyLink = $this->createLink('story', 'view', "storyID=$story->id", '', true);?>
<tr>
<td class='c-id text-left'>
<?php if(($canBatchUnlink or $canBatchClose) and $canBeChanged):?>
<div class="checkbox-primary">
<input type='checkbox' name='storyIdList[]' value='<?php echo $story->id;?>'/>
<label></label>
</div>
<?php endif;?>
<?php echo sprintf('%03d', $story->id);?>
</td>
<td><span class='label-pri <?php echo 'label-pri-' . $story->pri;?>' title='<?php echo zget($lang->story->priList, $story->pri, $story->pri);?>'><?php echo zget($lang->story->priList, $story->pri, $story->pri);?></span></td>
<td class='text-left nobr' title='<?php echo $story->title?>'>
<?php
if($story->parent > 0) echo "<span class='label'>{$lang->story->childrenAB}</span>";
echo html::a($storyLink,$story->title, '', "class='preview'");
?>
</td>
<td><?php echo zget($users, $story->openedBy);?></td>
<td><?php echo $story->estimate;?></td>
<td>
<span class='status-story status-<?php echo $story->status;?>'><?php echo $this->processStatus('story', $story);?></span>
</td>
<td><?php echo $lang->story->stageList[$story->stage];?></td>
<td class='c-actions'>
<?php
if(common::hasPriv('release', 'unlinkStory') and $canBeChanged)
{
$unlinkURL = $this->createLink('release', '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}'");
}
?>
</td>
</tr>
<?php endforeach;?>
</tbody>
</table>
<div class='table-footer'>
<?php if($countStories and ($canBatchUnlink or $canBatchClose) and $canBeChanged):?>
<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'))
{
$unlinkURL = inlink('batchUnlinkStory', "release=$release->id");
echo html::a('###', $lang->release->batchUnlink, '', "onclick='setFormAction(\"$unlinkURL\", \"hiddenwin\", this)' class='btn'");
}
if(common::hasPriv('story', 'batchClose'))
{
$closeURL = $this->createLink('story', 'batchClose', "productID=$release->product");
echo html::a("###", $lang->story->batchClose, '', "onclick='setFormAction(\"$closeURL\", \"\", this)' class='btn'");
}
?>
</div>
<div class='table-statistic'><?php echo sprintf($lang->release->finishStories, $countStories);?></div>
<?php endif;?>
<?php
$this->app->rawParams['type'] = 'story';
$storyPager->show('right', 'pagerjs');
$this->app->rawParams['type'] = $type;
?>
</div>
</form>
</div>
<div class='tab-pane <?php if($type == 'bug') echo 'active'?>' id='bugs'>
<?php if(common::hasPriv('release', '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 $vars = "releaseID={$release->id}&type=bug&link=$link&param=$param&orderBy=%s";?>
<thead>
<tr class='text-center'>
<th class='c-id text-left'>
<?php if($canBatchUnlink and $canBeChanged):?>
<div class="checkbox-primary check-all" title="<?php echo $lang->selectAll?>">
<label></label>
</div>
<?php endif;?>
<?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?>
</th>
<th class='text-left'><?php common::printOrderLink('title', $orderBy, $vars, $lang->bug->title);?></th>
<th class='w-100px'> <?php common::printOrderLink('status', $orderBy, $vars, $lang->bug->status);?></th>
<th class='c-user'> <?php common::printOrderLink('openedBy', $orderBy, $vars, $lang->openedByAB);?></th>
<th class='w-date'> <?php common::printOrderLink('openedDate', $orderBy, $vars, $lang->bug->openedDateAB);?></th>
<th class='c-user'> <?php common::printOrderLink('resolvedBy', $orderBy, $vars, $lang->bug->resolvedByAB);?></th>
<th class='w-100px'> <?php common::printOrderLink('resolvedDate', $orderBy, $vars, $lang->bug->resolvedDateAB);?></th>
<th class='w-50px'> <?php echo $lang->actions;?></th>
</tr>
</thead>
<tbody class='text-center'>
<?php foreach($bugs as $bug):?>
<?php $bugLink = $this->createLink('bug', 'view', "bugID=$bug->id", '', true);?>
<tr>
<td class='c-id text-left'>
<?php if($canBatchUnlink and $canBeChanged):?>
<div class="checkbox-primary">
<input type='checkbox' name='unlinkBugs[]' value='<?php echo $bug->id;?>'/>
<label></label>
</div>
<?php endif;?>
<?php echo sprintf('%03d', $bug->id);?>
</td>
<td class='text-left nobr' title='<?php echo $bug->title?>'><?php echo html::a($bugLink, $bug->title, '', "class='preview'");?></td>
<td>
<span class='status-bug status-<?php echo $bug->status?>'><?php echo $this->processStatus('bug', $bug);?></span>
</td>
<td><?php echo zget($users, $bug->openedBy);?></td>
<td><?php echo substr($bug->openedDate, 5, 11)?></td>
<td><?php echo zget($users, $bug->resolvedBy);?></td>
<td><?php echo substr($bug->resolvedDate, 5, 11)?></td>
<td class='c-actions'>
<?php
if(common::hasPriv('release', 'unlinkBug') and $canBeChanged)
{
$unlinkURL = $this->createLink('release', '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}'");
}
?>
</td>
</tr>
<?php endforeach;?>
</tbody>
</table>
<div class='table-footer'>
<?php if($countBugs and $canBatchUnlink and $canBeChanged):?>
<div class="checkbox-primary check-all"><label><?php echo $lang->selectAll?></label></div>
<div class="table-actions btn-toolbar">
<?php echo html::submitButton($lang->release->batchUnlink, '', 'btn');?>
</div>
<div class='table-statistic'><?php echo sprintf($lang->release->resolvedBugs, $countBugs);?></div>
<?php endif;?>
<?php
$this->app->rawParams['type'] = 'bug';
$bugPager->show('right', 'pagerjs');
$this->app->rawParams['type'] = $type;
?>
</div>
</form>
</div>
<div class='tab-pane <?php if($type == 'leftBug') echo 'active'?>' id='leftBugs'>
<?php if(common::hasPriv('release', '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 $vars = "releaseID={$release->id}&type=leftBug&link=$link&param=$param&orderBy=%s";?>
<thead>
<tr class='text-center'>
<th class='c-id text-left'>
<?php if($canBatchUnlink and $canBeChanged):?>
<div class="checkbox-primary check-all" title="<?php echo $lang->selectAll?>">
<label></label>
</div>
<?php endif;?>
<?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?>
</th>
<th class='w-80px'> <?php common::printOrderLink('severity', $orderBy, $vars, $lang->bug->severityAB);?></th>
<th class='text-left'> <?php common::printOrderLink('title', $orderBy, $vars, $lang->bug->title);?></th>
<th class='w-100px'> <?php common::printOrderLink('status', $orderBy, $vars, $lang->bug->status);?></th>
<th class='c-user'> <?php common::printOrderLink('openedBy', $orderBy, $vars, $lang->openedByAB);?></th>
<th class='w-150px'> <?php common::printOrderLink('openedDate', $orderBy, $vars, $lang->bug->openedDateAB);?></th>
<th class='w-50px'> <?php echo $lang->actions;?></th>
</tr>
</thead>
<?php
$hasCustomSeverity = false;
foreach($lang->bug->severityList as $severityKey => $severityValue)
{
if(!empty($severityKey) and (string)$severityKey != (string)$severityValue)
{
$hasCustomSeverity = true;
break;
}
}
?>
<tbody class='text-center'>
<?php foreach($leftBugs as $bug):?>
<?php $bugLink = $this->createLink('bug', 'view', "bugID=$bug->id", '', true);?>
<tr>
<td class='c-id text-left'>
<?php if($canBatchUnlink and $canBeChanged):?>
<div class="checkbox-primary">
<input type='checkbox' name='unlinkBugs[]' value='<?php echo $bug->id;?>'/>
<label></label>
</div>
<?php endif;?>
<?php echo sprintf('%03d', $bug->id);?>
</td>
<td class='c-severity'>
<?php if($hasCustomSeverity):?>
<span class='<?php echo 'label-severity-custom';?>' title='<?php echo zget($lang->bug->severityList, $bug->severity);?>' data-severity='<?php echo $bug->severity;?>'><?php echo zget($lang->bug->severityList, $bug->severity, $bug->severity);?></span>
<?php else:?>
<span class='label-severity' data-severity='<?php echo $bug->severity;?>' title='<?php echo zget($lang->bug->severityList, $bug->severity, $bug->severity);?>'></span>
<?php endif;?>
</td>
<td class='text-left nobr' title='<?php echo $bug->title?>'><?php echo html::a($bugLink, $bug->title, '', "class='preview'");?></td>
<td><span class='status-<?php echo $bug->status?>'> <?php echo $this->processStatus('bug', $bug);?></span></td>
<td><?php echo zget($users, $bug->openedBy);?></td>
<td><?php echo $bug->openedDate?></td>
<td class='c-actions'>
<?php
if(common::hasPriv('release', 'unlinkBug') and $canBeChanged)
{
$unlinkURL = $this->createLink('release', '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}'");
}
?>
</td>
</tr>
<?php endforeach;?>
</tbody>
</table>
<div class='table-footer'>
<?php if($countLeftBugs and $canBatchUnlink and $canBeChanged):?>
<div class="checkbox-primary check-all"><label><?php echo $lang->selectAll?></label></div>
<div class="table-actions btn-toolbar">
<?php echo html::submitButton($lang->release->batchUnlink, '', 'btn');?>
</div>
<div class='table-statistic'><?php echo sprintf($lang->release->createdBugs, $countLeftBugs);?></div>
<?php endif;?>
<?php
$this->app->rawParams['type'] = 'leftBug';
$leftBugPager->show('right', 'pagerjs');
$this->app->rawParams['type'] = $type;
?>
</div>
</form>
</div>
<div class='tab-pane <?php if($type == 'releaseInfo') echo 'active'?>' id='releaseInfo'>
<div class='cell'>
<div class='detail'>
<div class='detail-title'><?php echo $lang->release->basicInfo?></div>
<div class='detail-content'>
<table class='table table-data'>
<tr>
<th class='w-90px'><?php echo $lang->release->product;?></th>
<td><?php echo $release->productName;?></td>
</tr>
<?php if($release->productType != 'normal'):?>
<tr>
<th><?php echo $lang->product->branch;?></th>
<td><?php echo $branchName;?></td>
</tr>
<?php endif;?>
<tr>
<th><?php echo $lang->release->name;?></th>
<td><?php echo $release->name;?></td>
</tr>
<tr>
<th><?php echo $lang->release->build;?></th>
<td title='<?php echo $release->buildName?>'>
<?php echo ($release->project) ? html::a($this->createLink('build', 'view', "buildID=$release->buildID"), $release->buildName, '_blank') : $release->buildName;?>
</td>
</tr>
<tr>
<th><?php echo $lang->release->status;?></th>
<td><?php echo $this->processStatus('release', $release);?></td>
</tr>
<tr>
<th><?php echo $lang->release->date;?></th>
<td><?php echo $release->date;?></td>
</tr>
<?php $this->printExtendFields($release, 'table', 'inForm=0');?>
<tr>
<th><?php echo $lang->release->desc;?></th>
<td><?php echo $release->desc;?></td>
</tr>
</table>
</div>
</div>
<div class='detail'>
<div class='detail-title'><?php echo $lang->files?></div>
<div class='detail-content article-content'>
<?php
if($release->files)
{
echo $this->fetch('file', 'printFiles', array('files' => $release->files, 'fieldset' => 'false'));
}
elseif($release->filePath)
{
echo $lang->release->filePath . html::a($release->filePath, $release->filePath, '_blank');
}
elseif($release->scmPath)
{
echo $lang->release->scmPath . html::a($release->scmPath, $release->scmPath, '_blank');
}
?>
</div>
</div>
<?php include '../../common/view/action.html.php';?>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<style>
.tabs .tab-content .tab-pane .action{position: absolute; right: <?php echo ($countStories or $countBugs or $countLeftBugs) ? '100px' : '-1px'?>; top: 0px;}
</style>
<?php js::set('param', helper::safe64Decode($param))?>
<?php js::set('link', $link)?>
<?php js::set('releaseID', $release->id)?>
<?php js::set('type', $type)?>
<?php include '../../common/view/footer.html.php';?>
+18
View File
@@ -10,6 +10,24 @@
*/
class projectStory extends control
{
public $products = array();
public function __construct($moduleName = '', $methodName = '')
{
parent::__construct($moduleName, $methodName);
$this->products = $this->loadModel('product')->getProductPairsByProject($this->session->PRJ);
if(empty($this->products)) die($this->locate($this->createLink('product', 'showErrorNone', "fromModule=projectStory")));
}
public function requirement($projectID = 0, $productID = 0, $branch = 0)
{
$this->projectstory->setMenu($this->products, $productID, $branch);
$this->display();
}
public function story()
{
$this->display();
}
}
+1 -1
View File
@@ -1,2 +1,2 @@
<?php
$lang->projectstory->index = '需求主页';
+20 -3
View File
@@ -6,10 +6,27 @@
* @license ZPL (http://zpl.pub/page/zplv12.html)
* @author Chunsheng Wang <chunsheng@cnezsoft.com>
* @package projectStory
* @version $Id: model.php 5118 2013-07-12 07:41:41Z chencongzhi520@gmail.com $
* @version $Id
* @link http://www.zentao.net
*/
class projectStory extends model()
class projectstoryModel extends model
{
/**
* Set the menu.
*
* @param array $products
* @param int $productID
* @param int $branch
* @access public
* @return void
*/
public function setMenu($products = array(), $productID = 0, $branch = 0)
{
if(empty($productID)) $productID = key($products);
$this->loadModel('product')->setMenu($products, $productID, $branch);
$selectHtml = $this->product->select($products, $productID, 'projectstory', 'requirement', '', $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;
}
}
@@ -0,0 +1,16 @@
<?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';?>
+16
View File
@@ -0,0 +1,16 @@
<?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';?>
+11 -3
View File
@@ -1315,10 +1315,12 @@ class story extends control
* Story track.
*
* @param int $productID
* @param int $recPerPage
* @param int $pageID
* @access public
* @return void
*/
public function track($productID)
public function track($productID, $recPerPage = 10, $pageID = 1)
{
$this->lang->product->menu = $this->lang->product->viewMenu;
$this->lang->product->switcherMenu = $this->product->getSwitcher($productID);
@@ -1326,11 +1328,17 @@ class story extends control
$products = $this->product->getPairs();
$productID = $this->product->saveState($productID, $products);
$this->product->setMenu($products, $productID, 0, 0, '');
$tracks = $this->story->getTracks($productID);
$this->view->tracks = $tracks;
/* Load pager and get tracks. */
$this->app->loadClass('pager', $static = true);
$pager = new pager(0, $recPerPage, $pageID);
$tracks = $this->story->getTracks($productID, $pager);
$this->view->title = $this->lang->story->track;
$this->view->posision[] = $this->lang->story->track;
$this->view->tracks = $tracks;
$this->view->pager = $pager;
$this->display();
}
+4 -4
View File
@@ -81,7 +81,7 @@ $lang->story->convertRelations = 'Convert Relations';
$lang->story->skipStory = '%s is a parent story. It cannot be closed.';
$lang->story->closedStory = 'Story %s is closed and will not be closed.';
$lang->story->batchToTaskTips = "This action will create a task with the same name as the selected {$lang->productSRCommon} and link {$lang->productSRCommon} to the task. The closed {$lang->productSRCommon} will not be converted into tasks.";
$lang->story->batchToTaskTips = "This action will create a task with the same name as the selected {$lang->projectSRCommon} and link {$lang->projectSRCommon} to the task. The closed {$lang->projectSRCommon} will not be converted into tasks.";
$lang->story->successToTask = "Converted to task.";
$lang->story->common = 'Story';
@@ -128,7 +128,7 @@ $lang->story->version = 'Version';
$lang->story->plan = 'Plan';
$lang->story->planAB = 'Plan';
$lang->story->comment = 'Kommentar';
$lang->story->children = "Child {$lang->productSRCommon}";
$lang->story->children = "Child {$lang->projectSRCommon}";
$lang->story->childrenAB = "C";
$lang->story->linkStories = 'Story verknüpfen';
$lang->story->childStories = 'Story aufteilen';
@@ -262,8 +262,8 @@ $lang->story->mustChooseResult = 'Ergebnis wählen';
$lang->story->mustChoosePreVersion = 'Version wählen um es umzukhren.';
$lang->story->noStory = 'Keine Storys. ';
$lang->story->ignoreChangeStage = 'Story %s is in Draft or Closed status. Please review it..';
$lang->story->cannotDeleteParent = "Can not delete parent {$lang->productSRCommon}";
$lang->story->moveChildrenTips = "Its Child {$lang->productSRCommon} will be moved to the selected product when editing the linked product of Parent {$lang->productSRCommon}.";
$lang->story->cannotDeleteParent = "Can not delete parent {$lang->projectSRCommon}";
$lang->story->moveChildrenTips = "Its Child {$lang->projectSRCommon} will be moved to the selected product when editing the linked product of Parent {$lang->projectSRCommon}.";
$lang->story->changeTips = 'The story associated with the requirements to change, click "Cancel" ignore this change, click "Confirm" to change the story.';
$lang->story->form = new stdclass();
+4 -4
View File
@@ -81,7 +81,7 @@ $lang->story->convertRelations = 'Convert Relations';
$lang->story->skipStory = '%s is a parent story. It cannot be closed.';
$lang->story->closedStory = 'Story %s is closed and will not be closed.';
$lang->story->batchToTaskTips = "This action will create a task with the same name as the selected {$lang->productSRCommon} and link {$lang->productSRCommon} to the task. The closed {$lang->productSRCommon} will not be converted into tasks.";
$lang->story->batchToTaskTips = "This action will create a task with the same name as the selected {$lang->projectSRCommon} and link {$lang->projectSRCommon} to the task. The closed {$lang->projectSRCommon} will not be converted into tasks.";
$lang->story->successToTask = "Converted to task.";
$lang->story->common = 'Story';
@@ -128,7 +128,7 @@ $lang->story->version = 'Version';
$lang->story->plan = 'Linked Plan';
$lang->story->planAB = 'Plan';
$lang->story->comment = 'Comment';
$lang->story->children = "Child {$lang->productSRCommon}";
$lang->story->children = "Child {$lang->projectSRCommon}";
$lang->story->childrenAB = "C";
$lang->story->linkStories = 'Linked Stories';
$lang->story->childStories = 'Decomposed Stories';
@@ -262,8 +262,8 @@ $lang->story->mustChooseResult = 'Select Result';
$lang->story->mustChoosePreVersion = 'Select a version to revert to.';
$lang->story->noStory = 'No stories yet. ';
$lang->story->ignoreChangeStage = 'Story %s is in Draft or Closed status. Please review it..';
$lang->story->cannotDeleteParent = "Can not delete parent {$lang->productSRCommon}";
$lang->story->moveChildrenTips = "Its Child {$lang->productSRCommon} will be moved to the selected product when editing the linked product of Parent {$lang->productSRCommon}.";
$lang->story->cannotDeleteParent = "Can not delete parent {$lang->projectSRCommon}";
$lang->story->moveChildrenTips = "Its Child {$lang->projectSRCommon} will be moved to the selected product when editing the linked product of Parent {$lang->projectSRCommon}.";
$lang->story->changeTips = 'The story associated with the requirements to change, click "Cancel" ignore this change, click "Confirm" to change the story.';
$lang->story->form = new stdclass();
+4 -4
View File
@@ -81,7 +81,7 @@ $lang->story->convertRelations = 'Convert Relations';
$lang->story->skipStory = '%s is a parent story. It cannot be closed.';
$lang->story->closedStory = 'Story %s is closed and will not be closed.';
$lang->story->batchToTaskTips = "This action will create a task with the same name as the selected {$lang->productSRCommon} and link {$lang->productSRCommon} to the task. The closed {$lang->productSRCommon} will not be converted into tasks.";
$lang->story->batchToTaskTips = "This action will create a task with the same name as the selected {$lang->projectSRCommon} and link {$lang->projectSRCommon} to the task. The closed {$lang->projectSRCommon} will not be converted into tasks.";
$lang->story->successToTask = "Converted to task.";
$lang->story->common = 'Story';
@@ -128,7 +128,7 @@ $lang->story->version = 'Version';
$lang->story->plan = 'Intégrée Plans';
$lang->story->planAB = 'Plan';
$lang->story->comment = 'Commentaire';
$lang->story->children = "Enfant {$lang->productSRCommon}";
$lang->story->children = "Enfant {$lang->projectSRCommon}";
$lang->story->childrenAB = "C";
$lang->story->linkStories = 'Stories Liées';
$lang->story->childStories = 'Stories Décomposées';
@@ -262,8 +262,8 @@ $lang->story->mustChooseResult = 'Sélect Résultat';
$lang->story->mustChoosePreVersion = 'Sélect une version pour revenir en arrière.';
$lang->story->noStory = "Aucune story pour l'instant. ";
$lang->story->ignoreChangeStage = 'Story %s is in Draft or Closed status. Please review it..';
$lang->story->cannotDeleteParent = "Impossible de supprimer {$lang->productSRCommon} parent";
$lang->story->moveChildrenTips = "Its Child {$lang->productSRCommon} will be moved to the selected product when editing the linked product of Parent {$lang->productSRCommon}.";
$lang->story->cannotDeleteParent = "Impossible de supprimer {$lang->projectSRCommon} parent";
$lang->story->moveChildrenTips = "Its Child {$lang->projectSRCommon} will be moved to the selected product when editing the linked product of Parent {$lang->projectSRCommon}.";
$lang->story->changeTips = 'The story associated with the requirements to change, click "Cancel" ignore this change, click "Confirm" to change the story.';
$lang->story->form = new stdclass();
+4 -4
View File
@@ -81,7 +81,7 @@ $lang->story->convertRelations = 'Convert Relations';
$lang->story->skipStory = '%s is a parent story. It cannot be closed.';
$lang->story->closedStory = 'Story %s is closed and will not be closed.';
$lang->story->batchToTaskTips = "This action will create a task with the same name as the selected {$lang->productSRCommon} and link {$lang->productSRCommon} to the task. The closed {$lang->productSRCommon} will not be converted into tasks.";
$lang->story->batchToTaskTips = "This action will create a task with the same name as the selected {$lang->projectSRCommon} and link {$lang->projectSRCommon} to the task. The closed {$lang->projectSRCommon} will not be converted into tasks.";
$lang->story->successToTask = "Converted to task.";
$lang->story->common = 'Câu chuyện';
@@ -128,7 +128,7 @@ $lang->story->version = 'Phiên bản';
$lang->story->plan = 'Kế hoạch liên kết';
$lang->story->planAB = 'Kế hoạch';
$lang->story->comment = 'Nhận xét';
$lang->story->children = "$lang->productSRCommon} con";
$lang->story->children = "$lang->projectSRCommon} con";
$lang->story->childrenAB = "C";
$lang->story->linkStories = 'Câu chuyện liên kết';
$lang->story->childStories = 'Câu chuyện được phân rã';
@@ -262,8 +262,8 @@ $lang->story->mustChooseResult = 'Chọn kết quả';
$lang->story->mustChoosePreVersion = 'Chọn một phiên bản để chuyển thành.';
$lang->story->noStory = 'Không có câu chuyện nào';
$lang->story->ignoreChangeStage = 'Story %s is in Draft or Closed status. Please review it..';
$lang->story->cannotDeleteParent = "Không thể xóa {$lang->productSRCommon} mẹ";
$lang->story->moveChildrenTips = "Its Child {$lang->productSRCommon} will be moved to the selected product when editing the linked product of Parent {$lang->productSRCommon}.";
$lang->story->cannotDeleteParent = "Không thể xóa {$lang->projectSRCommon} mẹ";
$lang->story->moveChildrenTips = "Its Child {$lang->projectSRCommon} will be moved to the selected product when editing the linked product of Parent {$lang->projectSRCommon}.";
$lang->story->changeTips = 'The story associated with the requirements to change, click "Cancel" ignore this change, click "Confirm" to change the story.';
$lang->story->form = new stdclass();
+23 -17
View File
@@ -3586,13 +3586,20 @@ class storyModel extends model
/**
* Get tracks.
*
* @param int $productID
* @param int $productID
* @param object $pager
* @access public
* @return bool|array
*/
public function getTracks($productID)
public function getTracks($productID, $pager = null)
{
$requirements = $this->getProductStories($productID, 0, 0, 'all', 'requirement', 'id_desc');
$sourcePageID = $pager->pageID;
$requirements = $this->getProductStories($productID, 0, 0, 'all', 'requirement', 'id_desc', true, '', $pager);
if($pager->pageID != $sourcePageID)
{
$requirements = array();
$pager->pageID = $sourcePageID;
}
foreach($requirements as $requirement)
{
@@ -3612,24 +3619,23 @@ class storyModel extends model
}
/* Get no requirements story. */
$stories = $this->getProductStories($productID, 0, 0, 'all', 'story', 'id_desc');
foreach($stories as $id => $story)
$subdividedStories = $this->dao->select('BID')->from(TABLE_RELATION)->where('AType')->eq('requirement')->andWhere('BType')->eq('story')->andWhere('relation')->eq('subdivideinto')->andWhere('product')->eq($productID)->fetchPairs('BID', 'BID');
$stories = $this->getProductStories($productID, 0, 0, 'all', 'story', 'id_desc', true, $subdividedStories);
if($stories) $pager->recTotal += 1;
if(count($requirements) < $pager->recPerPage)
{
$counts = $this->getStoryRelationCounts($story->id, 'story');
if($counts != 0)
foreach($stories as $id => $story)
{
unset($stories[$id]);
continue;
$stories[$id] = new stdclass();
$stories[$id]->title = $story->title;
$stories[$id]->case = $this->loadModel('testcase')->getStoryCases($id);
$stories[$id]->bug = $this->loadModel('bug')->getStoryBugs($id);
$stories[$id]->design = $this->dao->select('id, name')->from(TABLE_DESIGN)->where('story')->eq($id)->fetchAll('id');
$stories[$id]->revision = $this->dao->select('BID, extra')->from(TABLE_RELATION)->where('AType')->eq('design')->andWhere('BType')->eq('commit')->andWhere('AID')->in(array_keys($stories[$id]->design))->fetchPairs();
}
$title = $stories[$id]->title;
$stories[$id] = new stdclass();
$stories[$id]->title = $title;
$stories[$id]->case = $this->loadModel('testcase')->getStoryCases($id);
$stories[$id]->bug = $this->loadModel('bug')->getStoryBugs($id);
$stories[$id]->design = $this->dao->select('id, name')->from(TABLE_DESIGN)->where('story')->eq($id)->fetchAll('id');
$stories[$id]->revision = $this->dao->select('BID, extra')->from(TABLE_RELATION)->where('AType')->eq('design')->andWhere('BType')->eq('commit')->andWhere('AID')->in(array_keys($stories[$id]->design))->fetchPairs();
$requirements['noRequirement'] = $stories;
}
$requirements['noRequirement'] = $stories;
return $requirements;
}
+2 -1
View File
@@ -1,7 +1,7 @@
<?php include '../../common/view/header.html.php';?>
<?php js::set('storyType', 'track');?>
<style>
.table td{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;}
.table td{white-space:nowrap;text-overflow:ellipsis;overflow:hidden;position:unset !important;border-bottom-color:#ddd !important;}
.requirement{background: #fff}
.main-table tbody>tr:hover { background-color: #fff; }
.main-table tbody>tr:nth-child(odd):hover { background-color: #f5f5f5; }
@@ -79,6 +79,7 @@
<?php endforeach;?>
</tbody>
</table>
<div class='table-footer'><?php $pager->show('right', 'pagerjs');?></div>
</div>
<?php endif;?>
</div>
+1 -3
View File
@@ -381,9 +381,6 @@ class task extends control
}
}
$noclosedProjects = $this->project->getExecutionPairs($this->session->PRJ, 'all', 'noclosed,nocode');
unset($noclosedProjects[$this->view->project->id]);
$this->view->projects = array($this->view->project->id => $this->view->project->name) + $noclosedProjects;
$tasks = $this->task->getParentTaskPairs($this->view->project->id, $this->view->task->parent);
if(isset($tasks[$taskID])) unset($tasks[$taskID]);
@@ -398,6 +395,7 @@ class task extends control
$this->view->users = $this->loadModel('user')->getPairs('nodeleted', "{$this->view->task->openedBy},{$this->view->task->canceledBy},{$this->view->task->closedBy}");
$this->view->showAllModule = isset($this->config->project->task->allModule) ? $this->config->project->task->allModule : '';
$this->view->modules = $this->tree->getTaskOptionMenu($this->view->task->project, 0, 0, $this->view->showAllModule ? 'allModule' : '');
$this->view->projects = $this->loadModel('project')->getExecutionsByProject($this->session->PRJ, 'all', 0, true);
$this->display();
}
+37 -37
View File
@@ -118,44 +118,44 @@
</ul>
<input type="hidden" class="colorpicker" id="color" name="color" value="" data-icon="color" data-wrapper="input-control-icon-right" data-update-color="#title" data-provide="colorpicker">
</div>
<?php if(strpos(",$showFields,", ',pri,') !== false): // begin print pri selector?>
<span class="input-group-addon fix-border br-0"><?php echo $lang->testcase->pri;?></span>
<?php
$hasCustomPri = false;
foreach($lang->testcase->priList as $priKey => $priValue)
{
if(!empty($priKey) and (string)$priKey != (string)$priValue)
{
$hasCustomPri = true;
break;
}
}
$priList = $lang->testcase->priList;
if(end($priList)) unset($priList[0]);
if(!isset($priList[$pri]))
{
reset($priList);
$pri = key($priList);
}
?>
<?php if($hasCustomPri):?>
<?php echo html::select('pri', (array)$priList, $pri, "class='form-control'");?>
<?php else: ?>
<?php ksort($priList);?>
<div class="input-group-btn pri-selector" data-type="pri">
<button type="button" class="btn dropdown-toggle br-0" data-toggle="dropdown">
<span class="pri-text"><span class="label-pri label-pri-<?php echo empty($pri) ? '0' : $pri?>" title="<?php echo $pri?>"><?php echo $pri?></span></span> &nbsp;<span class="caret"></span>
</button>
<div class='dropdown-menu pull-right'>
<?php echo html::select('pri', (array)$priList, $pri, "class='form-control' data-provide='labelSelector' data-label-class='label-pri'");?>
</div>
</div>
<?php endif; ?>
<?php endif; // end print pri selector ?>
<?php if(!$this->testcase->forceNotReview()):?>
<span class="input-group-addon"><?php echo html::checkbox('forceNotReview', $lang->testcase->forceNotReview, '', "id='forceNotReview0'");?></span>
<?php endif;?>
</div>
<?php if(strpos(",$showFields,", ',pri,') !== false): // begin print pri selector?>
<span class="input-group-addon fix-border br-0"><?php echo $lang->testcase->pri;?></span>
<?php
$hasCustomPri = false;
foreach($lang->testcase->priList as $priKey => $priValue)
{
if(!empty($priKey) and (string)$priKey != (string)$priValue)
{
$hasCustomPri = true;
break;
}
}
$priList = $lang->testcase->priList;
if(end($priList)) unset($priList[0]);
if(!isset($priList[$pri]))
{
reset($priList);
$pri = key($priList);
}
?>
<?php if($hasCustomPri):?>
<?php echo html::select('pri', (array)$priList, $pri, "class='form-control'");?>
<?php else: ?>
<?php ksort($priList);?>
<div class="input-group-btn pri-selector" data-type="pri">
<button type="button" class="btn dropdown-toggle br-0" data-toggle="dropdown">
<span class="pri-text"><span class="label-pri label-pri-<?php echo empty($pri) ? '0' : $pri?>" title="<?php echo $pri?>"><?php echo $pri?></span></span> &nbsp;<span class="caret"></span>
</button>
<div class='dropdown-menu pull-right'>
<?php echo html::select('pri', (array)$priList, $pri, "class='form-control' data-provide='labelSelector' data-label-class='label-pri'");?>
</div>
</div>
<?php endif; ?>
<?php endif; // end print pri selector ?>
<?php if(!$this->testcase->forceNotReview()):?>
<span class="input-group-addon"><?php echo html::checkbox('forceNotReview', $lang->testcase->forceNotReview, '', "id='forceNotReview0'");?></span>
<?php endif;?>
</div>
</td>
</tr>
+2 -2
View File
File diff suppressed because one or more lines are too long