From 2f2d5305f9bb84e88ae333b9ef8be5b2d3232b0f Mon Sep 17 00:00:00 2001 From: tanghucheng Date: Thu, 6 Jun 2024 15:26:49 +0800 Subject: [PATCH] * [task#118853,0.5h,2h] add confirmdemandretract for story view. --- module/story/ui/view.html.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/module/story/ui/view.html.php b/module/story/ui/view.html.php index 98c9a1c7fb..f938886051 100644 --- a/module/story/ui/view.html.php +++ b/module/story/ui/view.html.php @@ -182,6 +182,7 @@ $hasRepo = $this->loadModel('repo')->getListByProduct($story->product, 'Gitla $actions = $story->deleted ? array() : $this->loadModel('common')->buildOperateMenu($story); $hasDivider = !empty($actions['mainActions']) && !empty($actions['suffixActions']); if(!empty($actions)) $actions = array_merge($actions['mainActions'], array(array('type' => 'divider')), $actions['suffixActions']); + foreach($actions as $key => $action) { if(!$hasDivider && isset($action['type']) && $action['type'] == 'divider') @@ -203,6 +204,15 @@ foreach($actions as $key => $action) } } +if($this->config->edition == 'ipd' and $story->type == 'story') $story = $this->story->getAffectObject(array(), $story->type, $story); +if($config->edition == 'ipd' && $story->type == 'story' && !empty($story->confirmeObject)) +{ + $actions = array(); + $method = $story->confirmeObject['type'] == 'confirmedretract' ? 'confirmDemandRetract' : 'confirmDemandUnlink'; + $url = helper::createLink('story', $method, "objectID=$story->id&object=story&extra={$story->confirmeObject['id']}"); + $actions[] = array('name' => $method, 'text' => $lang->story->$method, 'icon' => 'search', 'hint' => $lang->story->$method, 'url' => $url, 'data-toggle' => 'modal'); +} + detail ( set::urlFormatter(array('{id}' => $story->id, '{type}' => $story->type, '{product}' => $story->product, '{branch}' => $story->branch, '{module}' => $story->module, '{execution}' => isset($executionID) ? $executionID : (isset($projectID) ? $projectID : 0))),