Finish task#3287 看板分组按钮合并到左侧排序菜单里面,需求ID排序去掉,增加需求默认排序,cost:1 left:0

This commit is contained in:
wangyidong
2017-11-02 15:20:29 +08:00
parent 8f2b8be0e1
commit 80b14f7c04
6 changed files with 25 additions and 14 deletions
+1 -1
View File
@@ -1254,7 +1254,7 @@ class project extends control
* @access public
* @return void
*/
public function kanban($projectID, $type = 'story', $orderBy = 'pri_asc')
public function kanban($projectID, $type = 'story', $orderBy = 'order_asc')
{
/* Save to session. */
$uri = $this->app->getURI(true);
+3
View File
@@ -86,6 +86,9 @@ table th.col-closed {width:14%}
.board-story.stage-tested.inverse {background-color:#827717;}
.board-story.stage-released.inverse {background-color:#9C27B0;}
.board-assignedTo {color:#D2322D; background-color: #FFEBEE;}
.board-finishedBy {color:#229F24; background-color: #E8F5E9;}
.bug-pri,.task-pri {display: inline-block; width: 16px; height: 16px; text-align: center; border-radius: 8px; border: 1px solid #ddd; font-size: 12px; line-height: 14px;}
.affix {position:fixed; top:0px; width:95%;z-index:1030;}
+2 -2
View File
@@ -238,10 +238,10 @@ $lang->project->placeholder->totalLeft = 'Total man-hour remained when start Pro
$lang->project->selectGroup = new stdclass();
$lang->project->selectGroup->done = '(Done)';
$lang->project->orderList['order_asc'] = "Order Asc";
$lang->project->orderList['order_desc'] = "Order Desc";
$lang->project->orderList['pri_asc'] = "Priority Asc";
$lang->project->orderList['pri_desc'] = "Priority Desc";
$lang->project->orderList['id_asc'] = "ID Asc";
$lang->project->orderList['id_desc'] = "ID Desc";
$lang->project->orderList['stage_asc'] = "Stage Asc";
$lang->project->orderList['stage_desc'] = "Stage Desc";
+2 -2
View File
@@ -238,10 +238,10 @@ $lang->project->placeholder->totalLeft = '项目开始时的总预计工时';
$lang->project->selectGroup = new stdclass();
$lang->project->selectGroup->done = '(已结束)';
$lang->project->orderList['order_asc'] = "需求排序正序";
$lang->project->orderList['order_desc'] = "需求排序倒序";
$lang->project->orderList['pri_asc'] = "需求优先级正序";
$lang->project->orderList['pri_desc'] = "需求优先级倒序";
$lang->project->orderList['id_asc'] = "需求ID正序";
$lang->project->orderList['id_desc'] = "需求ID倒序";
$lang->project->orderList['stage_asc'] = "需求阶段正序";
$lang->project->orderList['stage_desc'] = "需求阶段倒序";
+13 -8
View File
@@ -27,18 +27,23 @@ $account = $this->app->user->account
<?php $hasGroupCol = (($type == 'story' and count($stories) > 0) or $type != 'story');?>
<?php if($hasGroupCol):?>
<th class='w-p15 col-story'>
<?php if($type == 'story'):?>
<div class='dropdown inline-block'>
<a data-toggle='dropdown' href='javascript:;'><?php echo $lang->project->orderList[$orderBy]?> <span class='icon-caret-down'></span> </a>
<a data-toggle='dropdown' href='javascript:;'>
<?php if($type == 'story'):?>
<?php echo $lang->project->orderList[$orderBy]?>
<?php else:?>
<?php echo $lang->task->$type;?>
<?php endif;?>
<span class='icon-caret-down'></span>
</a>
<ul class='dropdown-menu text-left'>
<?php foreach ($lang->project->orderList as $key => $value):?>
<li <?php echo $orderBy == $key ? " class='active'" : '' ?>><?php echo html::a($this->createLink('project', 'kanban', "projectID=$projectID&type=story&orderBy=$key"), $value);?></li>
<?php endforeach;?>
<?php foreach ($lang->project->orderList as $key => $value):?>
<li <?php echo ($type == 'story' and $orderBy == $key) ? " class='active'" : '' ?>><?php echo html::a($this->createLink('project', 'kanban', "projectID=$projectID&type=story&orderBy=$key"), $value);?></li>
<?php endforeach;?>
<?php echo "<li" . ($type == 'assignedTo' ? " class='active'" : '') . ">" . html::a(inlink('kanban', "project=$projectID&type=assignedTo"), $lang->project->groups['assignedTo']) . "</li>";?>
<?php echo "<li" . ($type == 'finishedBy' ? " class='active'" : '') . ">" . html::a(inlink('kanban', "project=$projectID&type=finishedBy"), $lang->project->groups['finishedBy']) . "</li>";?>
</ul>
</div>
<?php else:?>
<?php echo $lang->task->$type;?>
<?php endif;?>
</th>
<?php endif;?>
<?php $endCol = array_pop($taskCols);?>
+4 -1
View File
@@ -1802,7 +1802,10 @@ class upgradeModel extends model
*/
public function initProjectStoryOrder()
{
$storyGroup = $this->dao->select('*')->from(TABLE_PROJECTSTORY)->orderBy('story_asc')->fetchGroup('project', 'story');
$storyGroup = $this->dao->select('t1.*')->from(TABLE_PROJECTSTORY)->alias('t1')
->leftJoin(TABLE_STORY)->alias('t2')->on('t1.story=t2.id')
->orderBy('t2.pri_desc,t1.story_asc')
->fetchGroup('project', 'story');
foreach($storyGroup as $projectID => $stories)
{