* finish task#1558.

This commit is contained in:
chencongzhi520@gmail.com
2013-07-12 06:37:48 +00:00
parent 0c461470dd
commit 40dc579bb6
4 changed files with 53 additions and 9 deletions
+1 -1
View File
@@ -140,7 +140,7 @@ $lang->my->menu->todo = array('link' => 'Todo|my|todo|', 'subModule' =
$lang->my->menu->task = array('link' => 'Task|my|task|', 'subModule' => 'task');
$lang->my->menu->bug = array('link' => 'Bug|my|bug|', 'subModule' => 'bug');
$lang->my->menu->testtask = array('link' => 'Test|my|testtask|', 'subModule' => 'testcase,testtask', 'alias' => 'testcase');
$lang->my->menu->story = 'Story|my|story|';
$lang->my->menu->story = array('link' => 'Story|my|story|', 'subModule' => 'story');
$lang->my->menu->myProject = 'Project|my|project|';
$lang->my->menu->dynamic = 'Dynamic|my|dynamic|';
$lang->my->menu->profile = array('link' => 'Profile|my|profile|', 'alias' => 'editprofile');
+1 -1
View File
@@ -140,7 +140,7 @@ $lang->my->menu->todo = array('link' => '待办|my|todo|', 'subModule'
$lang->my->menu->task = array('link' => '任务|my|task|', 'subModule' => 'task');
$lang->my->menu->bug = array('link' => 'Bug|my|bug|', 'subModule' => 'bug');
$lang->my->menu->testtask = array('link' => '测试|my|testtask|', 'subModule' => 'testcase,testtask', 'alias' => 'testcase');
$lang->my->menu->story = '需求|my|story|';
$lang->my->menu->story = array('link' => '需求|my|story|', 'subModule' => 'story');
$lang->my->menu->myProject = '项目|my|project|';
$lang->my->menu->dynamic = '动态|my|dynamic|';
$lang->my->menu->profile = array('link' => '档案|my|profile|', 'alias' => 'editprofile');
+40 -4
View File
@@ -22,6 +22,7 @@
?>
</div>
</div>
<form method='post' id='myStoryForm'>
<table class='table-1 tablesorter fixed colored'>
<?php $vars = "type=$type&orderBy=%s&recTotal=$recTotal&recPerPage=$recPerPage&pageID=$pageID"; ?>
<thead>
@@ -39,10 +40,19 @@
</tr>
</thead>
<tbody>
<?php
$canBatchEdit = common::hasPriv('story', 'batchEdit');
$canBatchClose = common::hasPriv('story', 'batchClose') and strtolower($type) != 'closedbyme';
?>
<?php foreach($stories as $key => $story):?>
<?php $storyLink = $this->createLink('story', 'view', "id=$story->id");?>
<tr class='a-center'>
<td><?php echo html::a($storyLink, sprintf('%03d', $story->id));?></td>
<?php $storyLink = $this->createLink('story', 'view', "id=$story->id");?>
<tr class='a-center'>
<td>
<?php if($canBatchEdit or $canBatchClose):?>
<input type='checkbox' name='storyIDList[<?php echo $story->id;?>]' value='<?php echo $story->id;?>' />
<?php endif;?>
<?php echo html::a($storyLink, sprintf('%03d', $story->id));?>
</td>
<td><span class='<?php echo 'pri' . $story->pri;?>'><?php echo $story->pri?></span></td>
<td><?php echo $story->productTitle;?></td>
<td class='a-left nobr'><?php echo html::a($storyLink, $story->title);?></td>
@@ -63,7 +73,33 @@
</tr>
<?php endforeach;?>
</tbody>
<tfoot><tr><td colspan='10'><?php echo $pager->show();?></td></tr></tfoot>
<tfoot>
<tr>
<td colspan='10' class='a-right'>
<div class='f-left'>
<?php
if(count($stories))
{
if($canBatchEdit or $canBatchClose) echo html::selectAll() . html::selectReverse();
if($canBatchEdit)
{
$actionLink = $this->createLink('story', 'batchEdit');
echo html::commonButton($lang->edit, "onclick=\"changeAction('myStoryForm', 'batchEdit', '$actionLink')\"");
}
if($canBatchClose)
{
$actionLink = $this->createLink('story', 'batchClose');
echo html::commonButton($lang->close, "onclick=\"changeAction('myStoryForm', 'batchClose', '$actionLink')\"");
}
}
?>
</div>
<?php $pager->show();?>
</td>
</tr>
</tfoot>
</table>
</form>
<script language='javascript'>$("#<?php echo $type;?>Tab").addClass('active');</script>
<?php include '../../common/view/footer.html.php';?>
+11 -3
View File
@@ -319,7 +319,7 @@ class story extends control
$stories = $this->dao->select('*')->from(TABLE_STORY)->where('id')->in($storyIDList)->fetchAll('id');
/* The stories of a product. */
if(!$projectID)
if($productID and !$projectID)
{
$this->product->setMenu($this->product->getPairs('nodeleted'), $productID);
$product = $this->product->getByID($productID);
@@ -327,7 +327,7 @@ class story extends control
}
/* The stories of a project. */
else
elseif($productID and $projectID)
{
$this->lang->story->menu = $this->lang->project->menu;
$this->project->setMenu($this->project->getPairs('nodeleted'), $projectID);
@@ -336,6 +336,15 @@ class story extends control
$project = $this->project->getByID($projectID);
$this->view->title = $project->name . $this->lang->colon . $this->lang->story->batchEdit;
}
/* The stories of my. */
elseif(!$productID and !$projectID)
{
$this->lang->story->menu = $this->lang->my->menu;
$this->lang->set('menugroup.story', 'my');
$this->lang->story->menuOrder = $this->lang->my->menuOrder;
$this->loadModel('my')->setMenu();
$this->view->title = $this->lang->story->batchEdit;
}
/* Get the module and productplan of edited stories. */
$moduleOptionMenus = array();
@@ -361,7 +370,6 @@ class story extends control
$this->view->productID = $productID;
$this->view->storyIDList = $storyIDList;
$this->view->stories = $stories;
$this->display();
}