+ add the feature of history.

* rewrite model by DAO.
This commit is contained in:
wangchunsheng
2009-10-27 07:43:06 +00:00
parent 3ed82d3852
commit f4d3e885cf
6 changed files with 215 additions and 59 deletions
+12 -14
View File
@@ -24,7 +24,7 @@
?>
<?php include '../../common/header.html.php';?>
<div id='doc3'>
<form method='post'>
<form method='post' target='hiddenwin'>
<table align='center' class='table-1 a-left'>
<caption><?php echo $lang->task->create;?></caption>
<tr>
@@ -33,28 +33,26 @@
</tr>
<tr>
<th class='rowhead'><?php echo $lang->task->story;?></th>
<td><?php echo html::select('storyID', $stories, $storyID, 'class=select-3');?>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->task->owner;?></th>
<td><?php echo html::select('owner', $members, '', 'class=select-3');?>
<td><?php echo html::select('story', $stories, $storyID, 'class=select-1');?>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->task->name;?></th>
<td><input type='text' name='name' class='text-3' /></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->task->estimate;?></th>
<td><input type='text' name='estimate' class='text-3' /></td>
<td><input type='text' name='name' class='text-1' /></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->task->desc;?></th>
<td><textarea name='desc' rows='5' class='area-1'></textarea>
</tr>
<tr>
<td colspan='2' class='a-center'>
<?php echo html::submitButton() . html::resetButton();?>
</td>
<th class='rowhead'><?php echo $lang->task->owner;?></th>
<td><?php echo html::select('owner', $members, '', 'class=select-3');?>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->task->estimate;?></th>
<td><input type='text' name='estimate' class='text-3' /></td>
</tr>
<tr>
<td colspan='2' class='a-center'><?php echo html::submitButton() . html::resetButton();?></td>
</tr>
</table>
</form>
+13 -10
View File
@@ -24,7 +24,7 @@
?>
<?php include '../../common/header.html.php';?>
<div id='doc3'>
<form method='post'>
<form method='post' target='hiddenwin'>
<table align='center' class='table-1 a-left'>
<caption><?php echo $header['title'];?></caption>
<tr>
@@ -33,16 +33,20 @@
</tr>
<tr>
<th class='rowhead'><?php echo $lang->task->story;?></th>
<td><?php echo html::select('storyID', $stories, $task->story, 'class=select-3');?>
<td><?php echo html::select('story', $stories, $task->story, 'class=select-1');?>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->task->name;?></th>
<td><input type='text' name='name' value='<?php echo $task->name;?>' class='text-1' /></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->task->desc;?></th>
<td><textarea name='desc' rows='5' class='area-1'><?php echo $task->desc;?></textarea>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->task->owner;?></th>
<td><?php echo html::select('owner', $members, $task->owner, 'class=select-3');?>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->task->name;?></th>
<td><input type='text' name='name' value='<?php echo $task->name;?>' class='text-3' /></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->task->estimate;?></th>
<td><input type='text' name='estimate' value='<?php echo $task->estimate;?>' class='text-3' /></td>
@@ -59,13 +63,12 @@
<th class='rowhead'><?php echo $lang->task->status;?></th>
<td><?php echo html::select('status', (array)$lang->task->statusList, $task->status, 'class=select-3');?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->task->desc;?></th>
<td><textarea name='desc' rows='5' class='area-1'><?php echo $task->desc;?></textarea>
<th class='rowhead'><?php echo $lang->comment;?></th>
<td><textarea name='comment' rows='5' class='area-1'></textarea>
</tr>
<tr>
<td colspan='2' class='a-center'><input type='submit' name='submit' value='<?php echo $lang->save;?>' class='button-s' /></td>
<td colspan='2' class='a-center'><?php echo html::submitButton() . html::resetButton();?></td>
</tr>
</table>
</form>
+91
View File
@@ -0,0 +1,91 @@
<?php
/**
* The view file of task module of ZenTaoMS.
*
* ZenTaoMS is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* ZenTaoMS is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with ZenTaoMS. If not, see <http://www.gnu.org/licenses/>.
*
* @copyright Copyright: 2009 Chunsheng Wang
* @author Chunsheng Wang <wwccss@263.net>
* @package task
* @version $Id$
* @link http://www.zentao.cn
*/
?>
<?php include '../../common/header.html.php';?>
<div class='yui-d0'>
<div id='titlebar'>
<div id='main'>TASK #<?php echo $task->id . $lang->colon . $task->name;?></div>
<div>
<?php
if(common::hasPriv('task', 'edit')) echo html::a($this->createLink('task', 'edit', "taskID=$task->id"), $lang->task->buttonEdit);
if(common::hasPriv('project', 'task')) echo html::a($app->session->taskList, $lang->task->buttonBackToList);
?>
</div>
</div>
</div>
</div>
<div class='yui-d0'>
<fieldset>
<legend><?php echo $lang->task->legendBasic;?></legend>
<table align='center' class='table-1 a-left'>
<tr>
<th class='rowhead'><?php echo $lang->task->project;?></th>
<td><?php echo $project->name;?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->task->story;?></th>
<td><?php echo $task->storyTitle;?>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->task->owner;?></th>
<td><?php echo $task->ownerRealName;?>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->task->estimate;?></th>
<td><?php echo $task->estimate;?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->task->consumed;?></th>
<td><?php echo $task->consumed;?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->task->left;?></th>
<td><?php echo $task->left;?></td>
</tr>
<tr>
<th class='rowhead'><?php echo $lang->task->status;?></th>
<td><?php $lang->show($lang->task->statusList, $task->status);?></td>
</tr>
</table>
</fieldset>
<fieldset>
<legend><?php echo $lang->task->legendDesc;?></legend>
<div><?php echo nl2br($task->desc);?></div>
</fieldset>
<fieldset>
<legend><?php echo $lang->task->legendAction;?></legend>
<div class='a-center' style='font-size:16px; font-weight:bold'>
<?php
if(common::hasPriv('task', 'edit')) echo html::a($this->createLink('task', 'edit', "taskID=$task->id"), $lang->task->buttonEdit);
if(common::hasPriv('project', 'task')) echo html::a($app->session->taskList, $lang->task->buttonBackToList);
?>
</div>
</fieldset>
<?php include '../../common/action.html.php';?>
</div>
<?php include '../../common/footer.html.php';?>