* 1.added story verify in task view.

* 2.put story spec, verify and file together.
This commit is contained in:
chenfeiCF
2016-03-14 11:59:34 +08:00
parent b2d49204b8
commit 8bbad78ec1
4 changed files with 18 additions and 31 deletions

View File

@@ -455,8 +455,8 @@ class task extends control
else
{
$story = $this->story->getById($task->story);
$task->storySpec = empty($story) ? '' : $story->spec;
$task->storyComments = empty($story) ? array() : $this->task->getStoryComments($task->story);
$task->storySpec = empty($story) ? '' : $this->loadModel('file')->setImgSize($story->spec);
$task->storyVerify = empty($story) ? '' : $this->loadModel('file')->setImgSize($story->verify);
$task->storyFiles = $this->loadModel('file')->getByObject('story', $task->story);
}

View File

@@ -39,10 +39,9 @@ $lang->task->module = 'Module';
$lang->task->story = 'Story';
$lang->task->storySpec = 'Story desc';
$lang->task->storyFiles = 'Story Files';
$lang->task->storyComment = 'Story comment';
$lang->task->storyVerify = 'Story Verify';
$lang->task->name = 'Name';
$lang->task->type = 'Type';
$lang->task->taskFiles = 'Task files';
$lang->task->pri = 'Pri';
$lang->task->mailto = 'Mailto';
$lang->task->estimate = 'Estimate';

View File

@@ -39,10 +39,9 @@ $lang->task->module = '所属模块';
$lang->task->story = '相关需求';
$lang->task->storySpec = '需求描述';
$lang->task->storyFiles = '需求附件';
$lang->task->storyComment = '需求备注';
$lang->task->storyVerify = '验收标准';
$lang->task->name = '任务名称';
$lang->task->type = '任务类型';
$lang->task->taskFiles = '任务附件';
$lang->task->pri = '优先级';
$lang->task->mailto = '抄送给';
$lang->task->estimate = '最初预计';

View File

@@ -71,10 +71,7 @@
<legend><?php echo $lang->task->legendDesc;?></legend>
<div class='article-content'><?php echo $task->desc;?></div>
</fieldset>
<fieldset>
<legend><?php echo $lang->task->taskFiles;?></legend>
<?php echo $this->fetch('file', 'printFiles', array('files' => $task->files, 'fieldset' => 'false'));?>
</fieldset>
<?php echo $this->fetch('file', 'printFiles', array('files' => $task->files, 'fieldset' => 'true'));?>
<?php if($task->fromBug != 0):?>
<fieldset>
<legend><?php echo $lang->bug->steps;?></legend>
@@ -82,27 +79,19 @@
</fieldset>
<?php else:?>
<fieldset>
<legend><?php echo $lang->task->storySpec;?></legend>
<div class='article-content'><?php echo $task->storySpec;?></div>
</fieldset>
<fieldset>
<legend><?php echo $lang->task->storyFiles;?></legend>
<?php echo $this->fetch('file', 'printFiles', array('files' => $task->storyFiles, 'fieldset' => 'false'));?>
</fieldset>
<fieldset class='actionbox'>
<legend><?php echo $lang->task->storyComment;?></legend>
<?php
foreach($task->storyComments as $item => $commentAction)
{
if(isset($users[$commentAction->actor])) $commentAction->actor = $users[$commentAction->actor];
if(strpos($commentAction->actor, ':') !== false) $commentAction->actor = substr($commentAction->actor, strpos($commentAction->actor, ':') + 1);
printf($lang->task->commentActions, $item + 1, $commentAction->date, $commentAction->actor);
echo "<div class='history article-content'>";
echo strip_tags($commentAction->comment) == $commentAction->comment ? nl2br($commentAction->comment) : $commentAction->comment;
echo "</div>";
}
?>
<legend><?php echo $lang->task->story;?></legend>
<fieldset>
<legend><?php echo $lang->task->storySpec;?></legend>
<div class='article-content'><?php echo $task->storySpec;?></div>
</fieldset>
<fieldset>
<legend><?php echo $lang->task->storyVerify;?></legend>
<div class='article-content'><?php echo $task->storyVerify;?></div>
</fieldset>
<fieldset>
<legend><?php echo $lang->task->storyFiles;?></legend>
<?php echo $this->fetch('file', 'printFiles', array('files' => $task->storyFiles, 'fieldset' => 'false'));?>
</fieldset>
</fieldset>
<?php endif;?>
<?php include '../../common/view/action.html.php';?>