diff --git a/module/product/lang/de.php b/module/product/lang/de.php index 9acbd9b49e..913c2c6eda 100644 --- a/module/product/lang/de.php +++ b/module/product/lang/de.php @@ -37,8 +37,8 @@ $lang->product->addWhitelist = 'Add Whitelist'; $lang->product->unbindWhitelist = 'Remove Whitelist'; $lang->product->track = 'View Stories Matrix'; $lang->product->checkedProducts = '%s products selected'; -$lang->product->pageProducts = 'Total products: %s.'; -$lang->product->pageLines = 'Total product lines: %s, Total products: %s.'; +$lang->product->pageSummary = 'Total products: %s.'; +$lang->product->lineSummary = 'Total product lines: %s, Total products: %s.'; $lang->product->indexAction = "All {$lang->productCommon}"; $lang->product->closeAction = "Close {$lang->productCommon}"; diff --git a/module/product/lang/en.php b/module/product/lang/en.php index 0af7d531d3..bf6a91a961 100644 --- a/module/product/lang/en.php +++ b/module/product/lang/en.php @@ -37,8 +37,8 @@ $lang->product->addWhitelist = 'Add Whitelist'; $lang->product->unbindWhitelist = 'Unbind Whitelist'; $lang->product->track = 'View Stories Matrix'; $lang->product->checkedProducts = '%s products selected'; -$lang->product->pageProducts = 'Total products: %s.'; -$lang->product->pageLines = 'Total product lines: %s, Total products: %s.'; +$lang->product->pageSummary = 'Total products: %s.'; +$lang->product->lineSummary = 'Total product lines: %s, Total products: %s.'; $lang->product->indexAction = "All {$lang->productCommon}"; $lang->product->closeAction = "Close {$lang->productCommon}"; diff --git a/module/product/lang/fr.php b/module/product/lang/fr.php index 6ba1e4179a..6154559fac 100644 --- a/module/product/lang/fr.php +++ b/module/product/lang/fr.php @@ -37,8 +37,8 @@ $lang->product->addWhitelist = 'Add Whitelist'; $lang->product->unbindWhitelist = 'Remove Whitelist'; $lang->product->track = 'Consulter Stories Matrice'; $lang->product->checkedProducts = '%s produits s électionnés'; -$lang->product->pageProducts = 'Total products: %s.'; -$lang->product->pageLines = 'Total product lines: %s, Total products: %s.'; +$lang->product->pageSummary = 'Total products: %s.'; +$lang->product->lineSummary = 'Total product lines: %s, Total products: %s.'; $lang->product->indexAction = "All {$lang->productCommon}"; $lang->product->closeAction = "Fermer {$lang->productCommon}"; diff --git a/module/product/lang/zh-cn.php b/module/product/lang/zh-cn.php index 336926a768..6d33a54d1f 100644 --- a/module/product/lang/zh-cn.php +++ b/module/product/lang/zh-cn.php @@ -37,8 +37,8 @@ $lang->product->addWhitelist = '添加白名单'; $lang->product->unbindWhitelist = '移除白名单'; $lang->product->track = "查看需求矩阵"; $lang->product->checkedProducts = '已选择%s项产品'; -$lang->product->pageProducts = '本页共%s个产品。'; -$lang->product->pageLines = '本页共%s个产品线,%s个产品。'; +$lang->product->pageSummary = '本页共%s个产品。'; +$lang->product->lineSummary = '本页共%s个产品线,%s个产品。'; $lang->product->indexAction = "所有{$lang->productCommon}仪表盘"; $lang->product->closeAction = "关闭{$lang->productCommon}"; diff --git a/module/product/view/all.html.php b/module/product/view/all.html.php index 1d85479802..88462b928b 100644 --- a/module/product/view/all.html.php +++ b/module/product/view/all.html.php @@ -253,8 +253,8 @@
product->pageProducts, count($productStats)) : sprintf($lang->product->pageLines, count($lineNames), count($productStats)); - echo "
$content
"; + $summary = empty($productLines) ? sprintf($lang->product->pageSummary, count($productStats)) : sprintf($lang->product->lineSummary, count($lineNames), count($productStats)); + echo "
$summary
"; ?>
name} ({$this->lang->project->{$project->model}})'"; + $title = "title='{$project->name}" . ($this->config->vision == 'lite' ? "'" : "({$this->lang->project->{$project->model}})'"); } if($id == 'end') diff --git a/module/task/control.php b/module/task/control.php index 2f077c93b0..f3efbc6931 100755 --- a/module/task/control.php +++ b/module/task/control.php @@ -1112,10 +1112,11 @@ class task extends control * * @param int $taskID * @param string $from + * @param string $orderBy * @access public * @return void */ - public function recordEstimate($taskID, $from = '') + public function recordEstimate($taskID, $from = '', $orderBy = '') { $this->commonAction($taskID); @@ -1174,12 +1175,14 @@ class task extends control $this->session->set('estimateList', $uri, 'execution'); if(isonlybody()) $this->session->set('estimateList', $uri . (strpos($uri, '?') === false ? '?' : '&') . 'onlybody=yes', 'execution'); - $task = $this->task->getById($taskID); - $orderBy = 'date,id'; - if(!empty($task->team) and $task->mode == 'linear') $orderBy = 'order,date,id'; + $task = $this->task->getById($taskID); + if(!empty($task->team) and $task->mode == 'linear' and !$orderBy) $orderBy = 'order_asc'; + if(!$orderBy) $orderBy = 'date_asc'; $this->view->title = $this->lang->task->record; $this->view->task = $task; + $this->view->from = $from; + $this->view->orderBy = $orderBy; $this->view->efforts = $this->task->getTaskEstimate($taskID, '', '', $orderBy); $this->view->users = $this->loadModel('user')->getPairs('noclosed|noletter'); $this->display(); diff --git a/module/task/css/recordestimate.css b/module/task/css/recordestimate.css index 1bf2b838aa..df6eb85fc4 100644 --- a/module/task/css/recordestimate.css +++ b/module/task/css/recordestimate.css @@ -18,3 +18,6 @@ .main-header ul.hours:after{content:")"} .body-modal .main-header>h2 { max-width: 70% !important; margin-right:0px;} .table-record .form-date {border-right: none;} + +.table.has-sort-head thead>tr>th>a:after, .table.has-sort-head thead>tr>th>a:before {top: -7px;} +.table.has-sort-head thead>tr>th>a:hover, .table.has-sort-head thead>tr>th>a:hover:after, .table.has-sort-head thead>tr>th>a:hover:before {color: #000;} diff --git a/module/task/js/recordestimate.js b/module/task/js/recordestimate.js index 0ae15d69f2..e10c2adf66 100644 --- a/module/task/js/recordestimate.js +++ b/module/task/js/recordestimate.js @@ -1,5 +1,24 @@ $(function() { + /* Set default tab. */ + if($.cookie('recordEstimateType') == 'all') + { + $('#recordForm').addClass('hidden'); + $('.my-effort, #legendMyEffort').removeClass('active'); + $('.all-effort, #legendAllEffort').addClass('active'); + } + else + { + $('.my-effort, #legendMyEffort').addClass('active'); + $('#recordForm').removeClass('hidden'); + } + $.cookie('recordEstimateType', null); + + $('.order-btn').on('click', function() + { + $.cookie('recordEstimateType', 'all'); + }); + /* Hide creation logs when displaying team logs. */ $('#linearefforts .tabs ul > li').click(function() { @@ -7,7 +26,6 @@ $(function() $('#recordForm').toggleClass('hidden', tab == '#legendAllEffort'); }); - $('.form-date').datetimepicker('setEndDate', today); $("#recordForm #submit").click(function(e, confirmed) diff --git a/module/task/view/lineareffort.html.php b/module/task/view/lineareffort.html.php index f9f6ad8aaf..2cc191da53 100644 --- a/module/task/view/lineareffort.html.php +++ b/module/task/view/lineareffort.html.php @@ -16,33 +16,45 @@ foreach($task->team as $team) $teamOrders[$team->order] = $team->account; $myOrders = array(); $allEfforts = array(); $recorders = array(); -foreach($efforts as $effort) +$index = 0; +$allOrders = array(); +$efforts = array_values($efforts); +foreach($efforts as $key => $effort) { - $order = $effort->order; - $account = $effort->account; - $allEfforts[$order][] = $effort; + $prevEffort = $key > 0 ? $efforts[$key - 1] : null; + $order = (!$prevEffort or $prevEffort->order == $effort->order) ? $index : ++$index; + $account = $effort->account; + + $allEfforts[$order][] = $effort; $recorders[$order][$account] = $account; if($app->user->account == $account) { if(!isset($myOrders[$order])) $myOrders[$order] = 0; $myOrders[$order] += 1; } + $allOrders[$order] = $effort->order + 1; } ?>
-
+
- +
- - + id&from=$from&orderBy=%s"; + $sort = explode(',', $orderBy); + $orderBy = zget($sort, '0', ''); + if(!strpos($orderBy, '_')) $orderBy .= '_asc'; + ?> + + @@ -58,7 +70,7 @@ foreach($efforts as $effort) account != $this->app->user->account) continue;?> - + @@ -84,11 +96,12 @@ foreach($efforts as $effort)
-
task->teamOrder;?>task->date;?>task->teamOrder);?>task->date);?> task->recordedBy;?> task->work;?> task->consumedAB;?>
date;?>
+
- - + id&from=$from&orderBy=%s";?> + + @@ -103,7 +116,7 @@ foreach($efforts as $effort) - + diff --git a/module/task/view/recordestimate.html.php b/module/task/view/recordestimate.html.php index 7742bc7b1b..404b281ae2 100644 --- a/module/task/view/recordestimate.html.php +++ b/module/task/view/recordestimate.html.php @@ -59,10 +59,11 @@ if(!empty($members) && $task->mode == 'linear') team) and $task->mode == 'linear'):?> -
task->teamOrder;?>task->date;?>task->teamOrder);?>task->date);?> task->recordedBy;?> task->work;?> task->consumedAB;?>
date;?>
+
- + id&from=$from&orderBy=%s";?> + @@ -103,7 +104,7 @@ if(!empty($members) && $task->mode == 'linear') - +
task->date;?>task->date);?> task->recordedBy;?> task->work;?> task->consumed;?>