* adjust the UI of productplan.
* log action when link and unlink a story to or from a plan.
This commit is contained in:
@@ -60,20 +60,24 @@ $lang->action->desc->diff1 = '修改了 <strong><i>%s</i></strong>,旧值
|
||||
$lang->action->desc->diff2 = '修改了 <strong><i>%s</i></strong>,区别为:<blockquote>%s</blockquote>';
|
||||
|
||||
/* 用来显示动态信息。*/
|
||||
$lang->action->label->opened = '创建了';
|
||||
$lang->action->label->changed = '变更了';
|
||||
$lang->action->label->edited = '编辑了';
|
||||
$lang->action->label->closed = '关闭了';
|
||||
$lang->action->label->deleted = '删除了';
|
||||
$lang->action->label->undeleted = '还原了';
|
||||
$lang->action->label->commented = '评论了';
|
||||
$lang->action->label->activated = '激活了';
|
||||
$lang->action->label->resolved = '解决了';
|
||||
$lang->action->label->reviewed = '评审了';
|
||||
$lang->action->label->moved = '移动了';
|
||||
$lang->action->label->confirmed = '确认了需求,';
|
||||
$lang->action->label->login = '登录系统';
|
||||
$lang->action->label->logout = "退出登录";
|
||||
$lang->action->label->opened = '创建了';
|
||||
$lang->action->label->changed = '变更了';
|
||||
$lang->action->label->edited = '编辑了';
|
||||
$lang->action->label->closed = '关闭了';
|
||||
$lang->action->label->deleted = '删除了';
|
||||
$lang->action->label->undeleted = '还原了';
|
||||
$lang->action->label->commented = '评论了';
|
||||
$lang->action->label->activated = '激活了';
|
||||
$lang->action->label->resolved = '解决了';
|
||||
$lang->action->label->reviewed = '评审了';
|
||||
$lang->action->label->moved = '移动了';
|
||||
$lang->action->label->confirmed = '确认了需求,';
|
||||
$lang->action->label->linked2plan = '关联计划';
|
||||
$lang->action->label->unlinkedfromplan = '移除计划';
|
||||
$lang->action->label->linked2prj = '关联项目';
|
||||
$lang->action->label->unlinkedfromprj = '移除项目';
|
||||
$lang->action->label->login = '登录系统';
|
||||
$lang->action->label->logout = "退出登录";
|
||||
|
||||
/* 用来生成相应对象的链接。*/
|
||||
$lang->action->label->product = '产品|product|view|productID=%s';
|
||||
|
||||
@@ -108,7 +108,7 @@ class productplan extends control
|
||||
$this->view->products = $this->product->getPairs();
|
||||
$this->view->plan = $plan;
|
||||
$this->view->actions = $this->loadModel('action')->getList('productplan', $planID);
|
||||
$this->view->users = $this->loadModel('user')->getPairs();
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter');
|
||||
$this->display();
|
||||
}
|
||||
|
||||
@@ -128,6 +128,7 @@ class productplan extends control
|
||||
$this->view->products = $this->product->getPairs();
|
||||
$this->view->plan = $plan;
|
||||
$this->view->plans = $this->dao->select('id, end')->from(TABLE_PRODUCTPLAN)->fetchPairs();
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter');
|
||||
$this->display();
|
||||
}
|
||||
|
||||
|
||||
@@ -76,9 +76,11 @@ class productplanModel extends model
|
||||
public function linkStory($planID)
|
||||
{
|
||||
$this->loadModel('story');
|
||||
$this->loadModel('action');
|
||||
foreach($this->post->stories as $storyID)
|
||||
{
|
||||
$this->dao->update(TABLE_STORY)->set('plan')->eq((int)$planID)->where('id')->eq((int)$storyID)->exec();
|
||||
$this->action->create('story', $storyID, 'linked2plan', '', $planID);
|
||||
$this->story->setStage($storyID);
|
||||
}
|
||||
}
|
||||
@@ -86,7 +88,9 @@ class productplanModel extends model
|
||||
/* 移除需求。*/
|
||||
public function unlinkStory($storyID)
|
||||
{
|
||||
$planID = $this->dao->findByID($storyID)->from(TABLE_STORY)->fields('plan')->fetch('plan');
|
||||
$this->dao->update(TABLE_STORY)->set('plan')->eq(0)->where('id')->eq((int)$storyID)->exec();
|
||||
$this->loadModel('story')->setStage($storyID);
|
||||
$this->loadModel('action')->create('story', $storyID, 'unlinkedfromplan', '', $planID);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,28 +25,30 @@
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php include '../../common/view/tablesorter.html.php';?>
|
||||
<div class='yui-d0'>
|
||||
<table class='table-1 tablesorter'>
|
||||
<caption>
|
||||
<table class='table-1 tablesorter fixed'>
|
||||
<caption class='caption-tr'>
|
||||
<div class='f-left'><?php echo $lang->productplan->browse;?></div>
|
||||
<div class='f-right'><?php common::printLink('productplan', 'create', "productID=$product->id", $lang->productplan->create);?></div>
|
||||
</caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<tr class='colhead'>
|
||||
<th class='w-id'><?php echo $lang->idAB;?></th>
|
||||
<th class='w-100px'><?php echo $lang->productplan->begin;?></th>
|
||||
<th class='w-100px'><?php echo $lang->productplan->end;?></th>
|
||||
<th><?php echo $lang->productplan->title;?></th>
|
||||
<th><?php echo $lang->productplan->begin;?></th>
|
||||
<th><?php echo $lang->productplan->end;?></th>
|
||||
<th><?php echo $lang->productplan->desc;?></th>
|
||||
<th class="{sorter: false}"><?php echo $lang->actions;?></th>
|
||||
<th class='w-p50'><?php echo $lang->productplan->desc;?></th>
|
||||
<th class="w-120px {sorter: false}"><?php echo $lang->actions;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($plans as $plan):?>
|
||||
<tr class='a-center'>
|
||||
<td><?php echo html::a(inlink('view', "id=$plan->id"), $plan->title);?></td>
|
||||
<td><?php echo html::a(inlink('view', "id=$plan->id"), $plan->id);?></td>
|
||||
<td><?php echo $plan->begin;?></td>
|
||||
<td><?php echo $plan->end;?></td>
|
||||
<td class='a-left'><?php echo nl2br($plan->desc);?></td>
|
||||
<td class='nobr'>
|
||||
<td class='a-left nobr'><?php echo html::a(inlink('view', "id=$plan->id"), $plan->title);?></td>
|
||||
<td class='a-left nobr'><?php echo nl2br($plan->desc);?></td>
|
||||
<td>
|
||||
<?php
|
||||
common::printLink('productplan', 'edit', "planID=$plan->id", $lang->edit);
|
||||
common::printLink('productplan', 'linkstory', "planID=$plan->id", $lang->productplan->linkStory);
|
||||
|
||||
@@ -26,17 +26,19 @@
|
||||
<?php include '../../common/view/tablesorter.html.php';?>
|
||||
<div class='yui-d0'>
|
||||
<form method='post'>
|
||||
<table align='center' class='table-1 tablesorter a-center'>
|
||||
<caption><?php echo $plan->title .$lang->colon . $lang->productplan->unlinkedStories;?></caption>
|
||||
<table class='table-1 tablesorter a-center'>
|
||||
<caption class='caption-tl'><?php echo $plan->title .$lang->colon . $lang->productplan->unlinkedStories;?></caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class='w-p5'><?php echo $lang->story->id;?></th>
|
||||
<th class='w-p5'><?php echo $lang->story->pri;?></th>
|
||||
<th class='w-p10'><?php echo $lang->story->product;?></th>
|
||||
<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->story->plan;?></th>
|
||||
<th><?php echo $lang->story->title;?></th>
|
||||
<th><?php echo $lang->story->status;?></th>
|
||||
<th class='w-p10'><?php echo $lang->story->linkStory;?></th>
|
||||
<th><?php echo $lang->openedByAB;?></th>
|
||||
<th><?php echo $lang->assignedToAB;?></th>
|
||||
<th><?php echo $lang->story->estimateAB;?></th>
|
||||
<th><?php echo $lang->statusAB;?></th>
|
||||
<th class='w-40px {sorter: false}'><?php echo $lang->link;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -48,9 +50,11 @@
|
||||
<tr>
|
||||
<td><?php echo html::a($this->createLink('story', 'view', "storyID=$story->id"), $story->id);?></td>
|
||||
<td><?php echo $story->pri;?></td>
|
||||
<td><?php echo html::a($this->createLink('product', 'browse', "productID=$story->product"), $products[$story->product], '_blank');?></td>
|
||||
<td><?php echo $story->planTitle;?></td>
|
||||
<td class='a-left nobr'><?php echo html::a($this->createLink('story', 'view', "storyID=$story->id"), $story->title);?></td>
|
||||
<td><?php echo $users[$story->openedBy];?></td>
|
||||
<td><?php echo $users[$story->assignedTo];?></td>
|
||||
<td><?php echo $story->estimate;?></td>
|
||||
<td><?php echo $lang->story->statusList[$story->status];?></td>
|
||||
<td><input type='checkbox' name='stories[]' value='<?php echo $story->id;?>' /></td>
|
||||
</tr>
|
||||
@@ -58,21 +62,25 @@
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan='5'><?php echo html::submitButton();?></td>
|
||||
<td colspan='9'><?php echo html::submitButton($lang->story->linkStory);?></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</form>
|
||||
|
||||
<table align='center' class='table-1 tablesorter a-center'>
|
||||
<caption><?php echo $plan->title .$lang->colon . $lang->productplan->linkedStories;?></caption>
|
||||
<table class='table-1 tablesorter a-center'>
|
||||
<caption class='caption-tl'><?php echo $plan->title .$lang->colon . $lang->productplan->linkedStories;?></caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class='w-p5'><?php echo $lang->story->id;?></th>
|
||||
<th class='w-p5'><?php echo $lang->story->pri;?></th>
|
||||
<th class='w-p10'><?php echo $lang->story->product;?></th>
|
||||
<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->story->title;?></th>
|
||||
<th class='w-p10'><?php echo $lang->actions?></th>
|
||||
<th><?php echo $lang->openedByAB;?></th>
|
||||
<th><?php echo $lang->assignedToAB;?></th>
|
||||
<th><?php echo $lang->story->estimateAB;?></th>
|
||||
<th><?php echo $lang->statusAB;?></th>
|
||||
<th><?php echo $lang->story->stageAB;?></th>
|
||||
<th class='w-p10 {sorter:false}'><?php echo $lang->actions?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -80,8 +88,12 @@
|
||||
<tr>
|
||||
<td><?php echo html::a($this->createLink('story', 'view', "storyID=$story->id"), $story->id);?></td>
|
||||
<td><?php echo $story->pri;?></td>
|
||||
<td><?php echo html::a($this->createLink('product', 'browse', "productID=$story->product"), $products[$story->product], '_blank');?></td>
|
||||
<td class='a-left nobr'><?php echo html::a($this->createLink('story', 'view', "storyID=$story->id"), $story->title);?></td>
|
||||
<td><?php echo $users[$story->openedBy];?></td>
|
||||
<td><?php echo $users[$story->assignedTo];?></td>
|
||||
<td><?php echo $story->estimate;?></td>
|
||||
<td><?php echo $lang->story->statusList[$story->status];?></td>
|
||||
<td><?php echo $lang->story->stageList[$story->stage];?></td>
|
||||
<td><?php common::printLink('productplan', 'unlinkStory', "story=$story->id", $lang->productplan->unlinkStory, 'hiddenwin');?></td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
|
||||
@@ -49,25 +49,28 @@
|
||||
$browseLink = $this->session->productPlanList ? $this->session->productPlanList : inlink('browse', "planID=$plan->id");
|
||||
if(!$plan->deleted)
|
||||
{
|
||||
common::printLink('productplan', 'edit', "planID=$plan->id", $lang->edit);
|
||||
common::printLink('productplan', 'delete', "planID=$plan->id", $lang->delete, 'hiddenwin');
|
||||
common::printLink('productplan', 'edit', "planID=$plan->id", $lang->edit);
|
||||
common::printLink('productplan', 'linkstory',"planID=$plan->id", $lang->productplan->linkStory);
|
||||
common::printLink('productplan', 'delete', "planID=$plan->id", $lang->delete, 'hiddenwin');
|
||||
}
|
||||
echo html::a($browseLink, $lang->goback);
|
||||
?>
|
||||
</div>
|
||||
<?php include '../../common/view/action.html.php';?>
|
||||
|
||||
<table align='center' class='table-1 tablesorter a-center'>
|
||||
<caption><?php echo $plan->title .$lang->colon . $lang->productplan->linkedStories;?></caption>
|
||||
<table class='table-1 tablesorter a-center'>
|
||||
<caption class='caption-tl'><?php echo $plan->title .$lang->colon . $lang->productplan->linkedStories;?></caption>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class='w-p5'><?php echo $lang->story->id;?></th>
|
||||
<th class='w-p5'><?php echo $lang->story->pri;?></th>
|
||||
<th class='w-p10'><?php echo $lang->story->product;?></th>
|
||||
<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->story->title;?></th>
|
||||
<th><?php echo $lang->story->status;?></th>
|
||||
<th><?php echo $lang->story->stage;?></th>
|
||||
<th class='w-p10'><?php echo $lang->actions?></th>
|
||||
<th><?php echo $lang->openedByAB;?></th>
|
||||
<th><?php echo $lang->assignedToAB;?></th>
|
||||
<th><?php echo $lang->story->estimateAB;?></th>
|
||||
<th><?php echo $lang->statusAB;?></th>
|
||||
<th><?php echo $lang->story->stageAB;?></th>
|
||||
<th class='w-p10 {sorter:false}'><?php echo $lang->actions?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -75,8 +78,10 @@
|
||||
<tr>
|
||||
<td><?php echo html::a($this->createLink('story', 'view', "storyID=$story->id"), $story->id);?></td>
|
||||
<td><?php echo $story->pri;?></td>
|
||||
<td><?php echo html::a($this->createLink('product', 'browse', "productID=$story->product"), $products[$story->product], '_blank');?></td>
|
||||
<td class='a-left nobr'><?php echo html::a($this->createLink('story', 'view', "storyID=$story->id"), $story->title);?></td>
|
||||
<td><?php echo $users[$story->openedBy];?></td>
|
||||
<td><?php echo $users[$story->assignedTo];?></td>
|
||||
<td><?php echo $story->estimate;?></td>
|
||||
<td><?php echo $lang->story->statusList[$story->status];?></td>
|
||||
<td><?php echo $lang->story->stageList[$story->stage];?></td>
|
||||
<td><?php common::printLink('productplan', 'unlinkStory', "story=$story->id", $lang->productplan->unlinkStory, 'hiddenwin');?></td>
|
||||
|
||||
Reference in New Issue
Block a user