* [task#123700,done,1h,0h] add roadmap in story view.

This commit is contained in:
tanghucheng
2024-07-24 08:59:24 +08:00
committed by 王怡栋
parent a5673a483d
commit 2c86e0fc44
2 changed files with 11 additions and 0 deletions
+10
View File
@@ -79,6 +79,7 @@ class storyBasicInfo extends wg
$statusText = $this->prop('statusText', $story->status);
$users = $this->prop('users', data('users'));
$gradePairs = $this->prop('gradePairs', data('gradePairs'));
$roadmaps = $this->prop('roadmaps', data('roadmaps'));
$showGrade = $this->prop('showGrade', data('showGrade'));
$items = array();
@@ -110,6 +111,15 @@ class storyBasicInfo extends wg
'content' => zget($gradePairs, $story->grade)
);
}
if($config->edition == 'ipd' && $story->type != 'story')
{
$items[$lang->story->roadmap] = hasPriv('roadmap', 'view') ? array
(
'control' => 'link',
'url' => createLink('roadmap', 'view', "roadmapID=$story->roadmap"),
'content' => zget($roadmaps, $story->roadmap)
) : zget($roadmaps, $story->roadmap, '');
}
if(!$hiddenPlan)
{
$planTitleItems = array();
+1
View File
@@ -589,6 +589,7 @@ class story extends control
$this->view->product = $product;
$this->view->maxGradeGroup = $this->story->getMaxGradeGroup();
$this->view->gradePairs = $this->story->getGradePairs($story->type, 'all');
$this->view->roadmaps = $this->config->edition == 'ipd' ? $this->loadModel('roadmap')->getPairs() : array();
$this->view->showGrade = $this->config->edition == 'ipd';
$this->view->actions = $this->action->getList('story', $storyID);
$this->view->branch = $story->branch;