* code for task#1589.

This commit is contained in:
xia0ta0
2013-07-29 15:10:06 +08:00
parent b4d7729478
commit 8734221200
5 changed files with 81 additions and 30 deletions
+10 -9
View File
@@ -140,15 +140,16 @@ class productplan extends control
$plan = $this->productplan->getByID($planID, true);
if(!$plan) die(js::error($this->lang->notFound) . js::locate('back'));
$this->commonAction($plan->product);
$products = $this->product->getPairs();
$this->view->title = "PLAN #$plan->id $plan->title/" . $products[$plan->product];
$this->view->position[] = $this->lang->productplan->view;
$this->view->planStories= $this->loadModel('story')->getPlanStories($planID);
$this->view->products = $products;
$this->view->summary = $this->product->summary($this->view->planStories);
$this->view->plan = $plan;
$this->view->actions = $this->loadModel('action')->getList('productplan', $planID);
$this->view->users = $this->loadModel('user')->getPairs('noletter');
$products = $this->product->getPairs();
$this->view->title = "PLAN #$plan->id $plan->title/" . $products[$plan->product];
$this->view->position[] = $this->lang->productplan->view;
$this->view->planStories = $this->loadModel('story')->getPlanStories($planID);
$this->view->planBugs = $this->loadModel('bug')->getPlanBugs($planID);
$this->view->products = $products;
$this->view->summary = $this->product->summary($this->view->planStories);
$this->view->plan = $plan;
$this->view->actions = $this->loadModel('action')->getList('productplan', $planID);
$this->view->users = $this->loadModel('user')->getPairs('noletter');
$this->display();
}
+10 -9
View File
@@ -9,13 +9,16 @@
* @version $Id: en.php 4659 2013-04-17 06:45:08Z chencongzhi520@gmail.com $
* @link http://www.zentao.net
*/
$lang->productplan->common = 'Plan';
$lang->productplan->browse = "Browse";
$lang->productplan->index = "Index";
$lang->productplan->create = "Create";
$lang->productplan->edit = "Edit";
$lang->productplan->delete = "Delete";
$lang->productplan->view = "Info";
$lang->productplan->common = 'Plan';
$lang->productplan->browse = "Browse";
$lang->productplan->index = "Index";
$lang->productplan->create = "Create";
$lang->productplan->edit = "Edit";
$lang->productplan->delete = "Delete";
$lang->productplan->view = "Info";
$lang->productplan->bugSummary = "Total %s bugs in this page";
$lang->productplan->basicInfo = 'Basic Info';
$lang->productplan->batchUnlink = "Batch Remove";
$lang->productplan->linkStory = "Link story";
$lang->productplan->unlinkStory = "Remove story";
@@ -33,8 +36,6 @@ $lang->productplan->confirmDelete = "Are you sure to delete this plan?";
$lang->productplan->confirmUnlinkStory = "Are you sure to remove this story?";
$lang->productplan->confirmUnlinkBug = "Are you sure to remove this bug?";
$lang->productplan->basicInfo ='Basic Info';
$lang->productplan->id = 'ID';
$lang->productplan->product = 'Product';
$lang->productplan->title = 'Title';
+10 -9
View File
@@ -9,13 +9,16 @@
* @version $Id: zh-cn.php 4659 2013-04-17 06:45:08Z chencongzhi520@gmail.com $
* @link http://www.zentao.net
*/
$lang->productplan->common = '产品计划';
$lang->productplan->browse = "浏览计划";
$lang->productplan->index = "计划列表";
$lang->productplan->create = "创建计划";
$lang->productplan->edit = "编辑计划";
$lang->productplan->delete = "删除计划";
$lang->productplan->view = "计划详情";
$lang->productplan->common = '产品计划';
$lang->productplan->browse = "浏览计划";
$lang->productplan->index = "计划列表";
$lang->productplan->create = "创建计划";
$lang->productplan->edit = "编辑计划";
$lang->productplan->delete = "删除计划";
$lang->productplan->view = "计划详情";
$lang->productplan->bugSummary = "本页共 <strong>%s</strong> 个Bug";
$lang->productplan->basicInfo = '基本信息';
$lang->productplan->batchUnlink = "批量移除";
$lang->productplan->linkStory = "关联需求";
$lang->productplan->unlinkStory = "移除需求";
@@ -33,8 +36,6 @@ $lang->productplan->confirmDelete = "您确认删除该计划吗?";
$lang->productplan->confirmUnlinkStory = "您确认移除该需求吗?";
$lang->productplan->confirmUnlinkBug = "您确认移除该Bug吗?";
$lang->productplan->basicInfo ='基本信息';
$lang->productplan->id = '编号';
$lang->productplan->product = '产品';
$lang->productplan->title = '名称';
+1 -1
View File
@@ -37,8 +37,8 @@
<td><?php echo $plan->end;?></td>
<td class='a-center'>
<?php
common::printIcon('productplan', 'linkBug', "planID=$plan->id", '', 'list');
common::printIcon('productplan', 'linkStory', "planID=$plan->id", '', 'list');
common::printIcon('productplan', 'linkBug', "planID=$plan->id", '', 'list');
common::printIcon('productplan', 'edit', "planID=$plan->id", '', 'list');
common::printIcon('productplan', 'delete', "planID=$plan->id", '', 'list', '', 'hiddenwin');
?>
+50 -2
View File
@@ -27,8 +27,8 @@
$browseLink = $this->session->productPlanList ? $this->session->productPlanList : inlink('browse', "planID=$plan->id");
if(!$plan->deleted)
{
common::printIcon('productplan', 'linkBug', "planID=$plan->id");
common::printIcon('productplan', 'linkStory',"planID=$plan->id");
common::printIcon('productplan', 'linkBug', "planID=$plan->id");
common::printIcon('productplan', 'edit', "planID=$plan->id");
common::printIcon('productplan', 'delete', "planID=$plan->id", '', 'button', '', 'hiddenwin');
}
@@ -109,7 +109,7 @@
if(count($planStories) and $canBatchUnlink)
{
echo html::selectAll() . html::selectReverse();
echo html::submitButton($lang->productplan->batchUnlinkStory);
echo html::submitButton($lang->productplan->batchUnlink);
}
?>
</div>
@@ -119,4 +119,52 @@
</tfoot>
</table>
</form>
<form method='post' target='hiddenwin' action="<?php echo inLink('batchUnlinkBug');?>">
<table class='table-1 tablesorter a-center fixed'>
<caption class='caption-tl'><?php echo $plan->title .$lang->colon . $lang->productplan->linkedBugs;?></caption>
<thead>
<tr class='colhead'>
<th class='w-id'> <?php echo $lang->idAB;?></th>
<th class='w-pri'> <?php echo $lang->priAB;?></th>
<th> <?php echo $lang->bug->title;?></th>
<th class='w-user'> <?php echo $lang->openedByAB;?></th>
<th class='w-user'> <?php echo $lang->assignedToAB;?></th>
<th class='w-status'><?php echo $lang->statusAB;?></th>
<th class='w-50px {sorter:false}'><?php echo $lang->actions?></th>
</tr>
</thead>
<tbody>
<?php $canBatchUnlink = common::hasPriv('productPlan', 'batchUnlinkBug');?>
<?php foreach($planBugs as $bug):?>
<tr>
<td class='a-center'>
<?php if($canBatchUnlink):?>
<input class='ml-10px' type='checkbox' name='unlinkBugs[]' value='<?php echo $bug->id;?>'/>
<?php endif;?>
<?php echo html::a($this->createLink('bug', 'view', "bugID=$bug->id"), sprintf("%03d", $bug->id));?>
</td>
<td><span class='<?php echo 'pri' . $bug->pri?>'><?php echo $bug->pri;?></span></td>
<td class='a-left nobr'><?php echo html::a($this->createLink('bug', 'view', "bugID=$bug->id"), $bug->title);?></td>
<td><?php echo $users[$bug->openedBy];?></td>
<td><?php echo $users[$bug->assignedTo];?></td>
<td><?php echo $lang->bug->statusList[$bug->status];?></td>
<td><?php common::printIcon('productplan', 'unlinkBug', "bug=$bug->id", '', 'list', '', 'hiddenwin');?></td>
</tr>
<?php endforeach;?>
</tbody>
<tfoot>
<tr>
<td colspan='7'>
<div class='f-left'>
<?php
echo html::selectAll('linkedBugsForm') . html::selectReverse('linkedBugsForm');
echo html::submitButton($lang->productplan->batchUnlink);
?>
</div>
<div class='f-right'><?php echo sprintf($lang->productplan->bugSummary, count($planStories));?> </div>
</td>
</tr>
</tfoot>
</table>
</form>
<?php include '../../common/view/footer.html.php';?>