From b3d4163c110f707187b8d53d8a26673440282860 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E6=80=A1=E6=A0=8B?= Date: Thu, 13 Jan 2022 10:30:49 +0800 Subject: [PATCH] * code for task #47151. --- extension/lite/story/ext/lang/zh-cn/lite.php | 2 + extension/lite/story/ext/view/view.html.php | 376 +++++++++++++++++++ 2 files changed, 378 insertions(+) create mode 100644 extension/lite/story/ext/view/view.html.php diff --git a/extension/lite/story/ext/lang/zh-cn/lite.php b/extension/lite/story/ext/lang/zh-cn/lite.php index db1710919a..e152653301 100644 --- a/extension/lite/story/ext/lang/zh-cn/lite.php +++ b/extension/lite/story/ext/lang/zh-cn/lite.php @@ -3,3 +3,5 @@ $lang->story->module = '所属目录'; $lang->story->parent = '父目标'; $lang->story->legendSpec = '目标描述'; $lang->story->children = '子目标'; + +$lang->story->legendProjectAndTask = '看板任务'; diff --git a/extension/lite/story/ext/view/view.html.php b/extension/lite/story/ext/view/view.html.php new file mode 100644 index 0000000000..cb6a296bc2 --- /dev/null +++ b/extension/lite/story/ext/view/view.html.php @@ -0,0 +1,376 @@ + + * @package story + * @version $Id: view.html.php 4952 2013-07-02 01:14:58Z chencongzhi520@gmail.com $ + * @link http://www.zentao.net + */ +?> +app->getModuleRoot() . 'common/view/header.html.php';?> +app->getModuleRoot() . 'common/view/kindeditor.html.php';?> +session->storyList ? $app->session->storyList : $this->createLink('product', 'browse', "productID=$story->product");?> + + + +app->getViewType() == 'xhtml'):?> +
+ + +
+
+
+
+
story->legendSpec;?>
+
spec;?>
+
+ fetch('file', 'printFiles', array('files' => $story->files, 'fieldset' => 'true', 'object' => $story));?> + createLink('action', 'comment', "objectType=story&objectID=$story->id"); + ?> + children)):?> +
+
lang->story->children;?>
+
+ + + + + + + + + + + + + + children as $child):?> + + + + + + + + + + + +
story->id;?> priAB;?> story->title;?>story->assignedTo;?> story->estimate;?> story->status;?>actions;?>
id;?> + pri . "'>"; + echo $child->pri == '0' ? '' : zget($this->lang->story->priList, $child->pri, $child->pri); + echo ""; + ?> + id", '', true); ?>">title;?>assignedTo);?>estimate . $config->hourUnit;?>processStatus('story', $child);?> + id", $child, 'list', 'alter'); + common::printIcon('story', 'review', "storyID=$child->id", $child, 'list', 'search', '', 'iframe showinonlybody', true); + common::printIcon('story', 'assignTo', "storyID=$child->id", $child, 'list', '', '', 'iframe showinonlybody', true); + common::printIcon('story', 'close', "storyID=$child->id", $child, 'list', '', '', 'iframe showinonlybody', true); + common::printIcon('story', 'activate', "storyID=$child->id", $child, 'list', '', '', 'iframe showinonlybody', true); + common::printIcon('story', 'edit', "storyID=$child->id", $child, 'list'); + ?> +
+
+
+ +
+ printExtendFields($story, 'div', "position=left&inForm=0&inCell=1");?> + app->getViewType() != 'xhtml'):?> +
app->getModuleRoot() . 'common/view/action.html.php';?>
+ +
+
+ +
";?> + deleted):?> + id", $story, 'button', 'alter', '', 'showinonlybody'); + common::printIcon('story', 'review', "storyID=$story->id", $story, 'button', 'search', '', 'showinonlybody'); + if($story->status == 'active' and $story->stage == 'wait' and $story->parent <= 0 and !isonlybody()) + { + $divideLang = $lang->story->subdivide; + $misc = "class='btn divideStory' data-toggle='modal' data-type='iframe' data-width='95%'"; + $link = $this->createLink('story', 'batchCreate', "productID=$story->product&branch=$story->branch&moduleID=$story->module&storyID=$story->id", '', true); + if(common::hasPriv('story', 'batchCreate', $story)) echo html::a($link, " " . $divideLang, '', $misc); + } + + common::printIcon('story', 'assignTo', "storyID=$story->id", $story, 'button', '', '', 'iframe showinonlybody', true); + common::printIcon('story', 'close', "storyID=$story->id", $story, 'button', '', '', 'iframe showinonlybody', true); + common::printIcon('story', 'activate', "storyID=$story->id", $story, 'button', '', '', 'iframe showinonlybody', true); + if(isset($this->config->maxVersion) and $this->app->tab == 'project' and common::hasPriv('story', 'importToLib')) echo html::a('#importToLib', " " . $this->lang->story->importToLib, '', 'class="btn" data-toggle="modal"'); + + if($from == 'execution' and strpos('draft,closed', $story->status) === false) common::printIcon('task', 'create', "execution=$param&storyID=$story->id&moduleID=$story->module", $story, 'button', 'plus', '', 'showinonlybody'); + + echo $this->buildOperateMenu($story, 'view'); + + echo "
"; + common::printIcon('story', 'edit', "storyID=$story->id", $story); + common::printIcon('story', 'create', "productID=$story->product&branch=$story->branch&moduleID=$story->module&storyID=$story->id&executionID=0&bugID=0&planID=0&todoID=0&extra=&type=$story->type", $story, 'button', 'copy', '', '', '', "data-width='1050'"); + common::printIcon('story', 'delete', "storyID=$story->id", $story, 'button', 'trash', 'hiddenwin'); + ?> + +
+
+
+
+
+
+ +
+
+ + + + + branch and isset($branches[$storyModule->branch])) + { + $moduleTitle .= $branches[$storyModule->branch] . '/'; + echo $branches[$storyModule->branch] . $lang->arrow; + } + + foreach($modulePath as $key => $module) + { + $moduleTitle .= $module->name; + if(!common::printLink('projectstory', 'story', "projectID={$this->session->project}&productID=$story->product&branch=$story->branch&browseType=byModule¶m=$module->id", $module->name, '', "data-app='project'")) echo $module->name; + if(isset($modulePath[$key + 1])) + { + $moduleTitle .= '/'; + echo $lang->arrow; + } + } + } + $printModule = ob_get_contents(); + ob_end_clean(); + ?> + + + + + + + type != 'requirement'):?> + + + + + + + + + + + + + + + + + + + + + + +
story->module;?>
story->status;?> processStatus('story', $story);?>
story->stage;?> + stages and $branches) + { + foreach($story->stages as $branch => $stage) if(isset($branches[$branch])) echo $branches[$branch] . ' : ' . $lang->story->stageList[$stage] . '
'; + } + else + { + echo $lang->story->stageList[$story->stage]; + } + ?> +
story->pri;?>pri;?>' title='story->priList, $story->pri)?>'>story->priList, $story->pri)?>
story->estimate;?>estimate . $config->hourUnit;?>
story->keywords;?>keywords;?>
story->legendMailto;?>mailto); foreach($mailto as $account) {if(empty($account)) continue; echo "" . zget($users, trim($account)) . '  '; }?>
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
story->openedBy;?>openedBy) . $lang->at . $story->openedDate;?>
story->assignedTo;?>assignedTo) echo zget($users, $story->assignedTo) . $lang->at . $story->assignedDate;?>
story->reviewers;?> + $result) + { + echo !empty($result) ? ' ' . zget($users, $reviewer) . '' : ' ' . zget($users, $reviewer) . ''; + } + } + ?> +
story->reviewedDate;?>reviewedBy) echo $story->reviewedDate;?>
story->closedBy;?>closedBy) echo zget($users, $story->closedBy) . $lang->at . $story->closedDate;?>
story->closedReason;?> + closedReason) echo $lang->story->reasonList[$story->closedReason]; + if(isset($story->extraStories[$story->duplicateStory])) + { + echo html::a(inlink('view', "storyID=$story->duplicateStory"), '#' . $story->duplicateStory . ' ' . $story->extraStories[$story->duplicateStory]); + } + ?> +
story->lastEditedBy;?>lastEditedBy) echo zget($users, $story->lastEditedBy) . $lang->at . $story->lastEditedDate;?>
+
+
+
+
+
+
+ +
+
+
    + tasks as $executionTasks) + { + foreach($executionTasks as $task) + { + if(!isset($executions[$task->execution])) continue; + $executionName = $executions[$task->execution]; + $taskInfo = $task->id . ' ' . $this->lang->task->statusList[$task->status] . ' ' . $task->name; + $class = isonlybody() ? 'showinonlybody' : 'iframe'; + echo "
  • " . html::a($this->createLink('task', 'view', "taskID=$task->id", '', true), $taskInfo, '', "class=$class data-width='80%'"); + echo html::a($this->createLink('execution', 'browse', "executionID=$task->execution"), $executionName, '', "class='text-muted'") . '
  • '; + } + } + if(count($story->tasks) == 0) + { + foreach($story->executions as $executionID => $execution) + { + echo "
  • " . html::a($this->createLink('execution', 'browse', "executionID=$executionID"), $execution->name, '', "class='text-muted'") . '
  • '; + } + } + ?> +
+
+
+
+
+ printExtendFields($story, 'div', "position=right&inForm=0&inCell=1");?> +
+
+app->getViewType() == 'xhtml'):?> + + + +
+ +
+story->create); +js::set('productID', $story->product); +js::set('branch', $story->branch); +js::set('moduleID', $story->module); +js::set('storyType', $story->type); +js::set('unlink', $lang->story->unlink); +js::set('cancel', $lang->cancel); +js::set('rawModule', $this->app->rawModule); +?> + +app->getModuleRoot() . 'common/view/syntaxhighlighter.html.php';?> +app->getModuleRoot() . 'common/view/footer.html.php';?>