From 63b510bbf881a71a37a9c409e1976d18d90a8584 Mon Sep 17 00:00:00 2001 From: wangchunsheng Date: Wed, 10 Feb 2010 02:13:28 +0000 Subject: [PATCH] * story #89. --- trunk/module/story/lang/zh-cn.php | 2 +- trunk/module/story/model.php | 7 ++++--- trunk/module/story/view/review.html.php | 6 +++++- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/trunk/module/story/lang/zh-cn.php b/trunk/module/story/lang/zh-cn.php index 2a0cbcabfb..e11b18f71b 100644 --- a/trunk/module/story/lang/zh-cn.php +++ b/trunk/module/story/lang/zh-cn.php @@ -129,5 +129,5 @@ $lang->story->duplicateStory = '重复需求'; $lang->story->reviewResult = '评审结果'; $lang->story->preVersion = '之前版本'; -$lang->story->action->reviewed = array('main' => '$date, 由 $actor 评审,结果为 $extra。', 'extra' => $lang->story->reviewResultList); +$lang->story->action->reviewed = array('main' => '$date, 由 $actor 记录评审结果,结果为 $extra。', 'extra' => $lang->story->reviewResultList); $lang->story->action->closed = array('main' => '$date, 由 $actor 关闭,原因为 $extra。', 'extra' => $lang->story->reasonList); diff --git a/trunk/module/story/model.php b/trunk/module/story/model.php index 1870640e91..4f8ed45e93 100644 --- a/trunk/module/story/model.php +++ b/trunk/module/story/model.php @@ -108,8 +108,8 @@ class storyModel extends model ->setIF($specChanged, 'reviewedBy', '') ->setIF($specChanged, 'closedBy', '') ->setIF($specChanged, 'closedReason', '') - ->setIF($specChanged and $oldStory->reviewedBy, 'reviewedDate', '') - ->setIF($specChanged and $oldStory->closedBy, 'closedDate', '') + ->setIF($specChanged and $oldStory->reviewedBy, 'reviewedDate', '0000-00-00') + ->setIF($specChanged and $oldStory->closedBy, 'closedDate', '0000-00-00') ->remove('files,labels,spec,comment') ->get(); $this->dao->update(TABLE_STORY) @@ -187,9 +187,10 @@ class storyModel extends model $oldStory = $this->dao->findById($storyID)->from(TABLE_STORY)->fetch(); $now = date('Y-m-d H:i:s'); + $date = date('Y-m-d'); $story = fixer::input('post') ->remove('result,preVersion,comment') - ->add('reviewedDate', $now) + ->setDefault('reviewedDate', $date) ->add('lastEditedBy', $this->app->user->account) ->add('lastEditedDate', $now) ->setIF($this->post->result == 'pass' and $oldStory->status == 'draft', 'status', 'active') diff --git a/trunk/module/story/view/review.html.php b/trunk/module/story/view/review.html.php index fdfe9aa8e9..e47a42fa16 100644 --- a/trunk/module/story/view/review.html.php +++ b/trunk/module/story/view/review.html.php @@ -72,7 +72,11 @@ function setStory(reason) - + + + + +
title;?>
story->reviewResult;?>story->reviewedDate;?>
story->reviewResult;?> story->reviewResultList, '', 'class=select-3 onchange="switchShow(this.value)"');?>