* finish the task #726.

This commit is contained in:
shiyangyangwork@yahoo.cn
2012-02-26 02:43:40 +00:00
parent a50e348935
commit 3acefe6060
5 changed files with 17 additions and 3 deletions
+5
View File
@@ -49,6 +49,11 @@ class story extends control
$actionID = $this->action->create('story', $storyID, 'Frombug', '', $bugID);
}
$this->sendMail($storyID, $actionID);
if($this->post->newStory)
{
echo js::alert($this->lang->story->successSaved . $this->lang->story->newStory);
die(js::locate($this->createLink('story', 'create', "productID=$productID&moduleID=$moduleID&story=$storyID&projectID=$projectID&bugID=$bugID"), 'parent'));
}
if($projectID == 0)
{
die(js::locate($this->createLink('story', 'view', "storyID=$storyID"), 'parent'));
+3
View File
@@ -70,6 +70,7 @@ $lang->story->duplicateStory = 'Duplicate story';
$lang->story->reviewResult = 'Reviewed result';
$lang->story->preVersion = 'Pre version';
$lang->story->keywords = 'Keyword';
$lang->story->newStory = 'Continue to add story.';
$lang->story->same = 'The same as above';
@@ -160,6 +161,8 @@ $lang->story->affectedCases = 'Affected cases';
$lang->story->specTemplate = "Recommend template::As <<i class='red'>a type of user</i>>,I want <<i class='red'>some goals</i>>,so that <<i class='red'>some reason</i>>.";
$lang->story->notes = "(notes:if the title is empty, it is no use)";
$lang->story->needNotReview = "needn't review";
$lang->story->afterSubmit = "After created";
$lang->story->successSaved = "Successfully saved";
$lang->story->confirmDelete = "Are you sure to delete this story?";
$lang->story->errorFormat = 'Error format';
$lang->story->errorEmptyTitle = "Title can't be empty";
+3
View File
@@ -70,6 +70,7 @@ $lang->story->duplicateStory = '重复需求';
$lang->story->reviewResult = '评审结果';
$lang->story->preVersion = '之前版本';
$lang->story->keywords = '关键词';
$lang->story->newStory = '继续添加需求';
$lang->story->same = '同上';
@@ -160,6 +161,8 @@ $lang->story->affectedCases = '影响的用例';
$lang->story->specTemplate = "建议参考的模板:作为一名<<i class='red'>某种类型的用户</i>>,我希望<<i class='red'>达成某些目的</i>>,这样可以<<i class='red'>开发的价值</i>>。";
$lang->story->notes = '(注:如果“需求标题”为空,则表示不使用此行)';
$lang->story->needNotReview = '不需要评审';
$lang->story->afterSubmit = "添加之后";
$lang->story->successSaved = "需求成功添加,";
$lang->story->confirmDelete = "您确认删除该需求吗?";
$lang->story->errorFormat = '需求数据有误';
$lang->story->errorEmptyTitle = '标题不能为空';
+1 -1
View File
@@ -116,7 +116,7 @@ class storyModel extends model
->setIF($this->post->plan > 0, 'stage', 'planned')
->setIF($projectID > 0, 'stage', 'projected')
->setIF($bugID > 0, 'fromBug', $bugID)
->remove('files,labels,spec,verify,needNotReview')
->remove('files,labels,spec,verify,needNotReview,newStory')
->get();
$this->dao->insert(TABLE_STORY)->data($story)->autoCheck()->batchCheck($this->config->story->create->requiredFields, 'notempty')->exec();
+5 -2
View File
@@ -58,15 +58,18 @@
<th class='rowhead'><nobr><?php echo $lang->story->mailto;?></nobr></th>
<td><?php echo html::input('mailto', $mailto, 'class="text-1"');?></td>
</tr>
<tr>
<th class='rowhead'><nobr><?php echo $lang->story->keywords;?></nobr></th>
<td><?php echo html::input('keywords', $keywords, 'class="text-1"');?></td>
</tr>
<tr>
<tr>
<th class='rowhead'><?php echo $lang->story->legendAttatch;?></th>
<td><?php echo $this->fetch('file', 'buildform');?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->story->afterSubmit;?></th>
<td><?php echo html::checkbox('newStory', $lang->story->newStory);?></td>
</tr>
<tr><td colspan='2' class='a-center'><?php echo html::submitButton() . html::resetButton();?></td></tr>
</table>
</form>