From 2c86e0fc44b409d2de16263714e5873498ec927a Mon Sep 17 00:00:00 2001 From: tanghucheng Date: Mon, 22 Jul 2024 14:53:33 +0800 Subject: [PATCH] * [task#123700,done,1h,0h] add roadmap in story view. --- lib/zin/wg/storybasicinfo/v1.php | 10 ++++++++++ module/story/control.php | 1 + 2 files changed, 11 insertions(+) diff --git a/lib/zin/wg/storybasicinfo/v1.php b/lib/zin/wg/storybasicinfo/v1.php index b8d90e2092..6bceff3399 100644 --- a/lib/zin/wg/storybasicinfo/v1.php +++ b/lib/zin/wg/storybasicinfo/v1.php @@ -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(); diff --git a/module/story/control.php b/module/story/control.php index c061fdffde..8b55311e3a 100755 --- a/module/story/control.php +++ b/module/story/control.php @@ -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;