diff --git a/module/task/control.php b/module/task/control.php index a8d68942dc..bed70fe795 100755 --- a/module/task/control.php +++ b/module/task/control.php @@ -1181,9 +1181,9 @@ class task extends control $orderBy = 'date,id'; if(!empty($task->team) and $task->mode == 'linear') $orderBy = 'order,date,id'; + $this->view->title = $this->lang->task->record; $this->view->task = $task; $this->view->estimates = $this->task->getTaskEstimate($taskID, '', '', $orderBy); - $this->view->title = $this->lang->task->record; $this->view->users = $this->loadModel('user')->getPairs('noclosed|noletter'); $this->display(); } diff --git a/module/task/js/recordestimate.js b/module/task/js/recordestimate.js index e64667d31d..8f0f0c86ee 100644 --- a/module/task/js/recordestimate.js +++ b/module/task/js/recordestimate.js @@ -6,9 +6,9 @@ $(function() { $('#recordForm .left').each(function() { - if($(this).val() !== '') left = $(this).val(); + if($(this).val() !== '' && !$(this).prop('readonly')) left = $(this).val(); }); - if(left == '0') + if(typeof(left) != 'undefined' && left == '0') { var confirmMsg = confirm(confirmRecord); if(confirmMsg == false) diff --git a/module/task/lang/de.php b/module/task/lang/de.php index 1cbd6b7491..bdd5c22349 100644 --- a/module/task/lang/de.php +++ b/module/task/lang/de.php @@ -56,6 +56,9 @@ $lang->task->copy = 'Aufgabe kopieren'; $lang->task->waitTask = 'Waiting Task'; $lang->task->allModule = 'All Module'; $lang->task->replace = 'Replace'; +$lang->task->myEffort = 'My Effort'; +$lang->task->allEffort = 'All Effort'; +$lang->task->teamOrder = 'Order'; $lang->task->common = 'Aufgabe'; $lang->task->id = 'ID'; diff --git a/module/task/lang/en.php b/module/task/lang/en.php index aedaa34ef6..da41923356 100755 --- a/module/task/lang/en.php +++ b/module/task/lang/en.php @@ -56,6 +56,9 @@ $lang->task->copy = 'Copy Task'; $lang->task->waitTask = 'Waiting Task'; $lang->task->allModule = 'All Module'; $lang->task->replace = 'Replace'; +$lang->task->myEffort = 'My Effort'; +$lang->task->allEffort = 'All Effort'; +$lang->task->teamOrder = 'Order'; $lang->task->common = 'Task'; $lang->task->id = 'ID'; diff --git a/module/task/lang/fr.php b/module/task/lang/fr.php index 2eab1df9e2..6630d0228c 100644 --- a/module/task/lang/fr.php +++ b/module/task/lang/fr.php @@ -56,6 +56,9 @@ $lang->task->copy = 'Copier Tâche'; $lang->task->waitTask = 'Tâche en attente'; $lang->task->allModule = 'Tous Modules'; $lang->task->replace = 'Replace'; +$lang->task->myEffort = 'My Effort'; +$lang->task->allEffort = 'All Effort'; +$lang->task->teamOrder = 'Order'; $lang->task->common = 'Tâche'; $lang->task->id = 'ID'; diff --git a/module/task/lang/zh-cn.php b/module/task/lang/zh-cn.php index 943a5b1862..33bd84ee8d 100755 --- a/module/task/lang/zh-cn.php +++ b/module/task/lang/zh-cn.php @@ -56,6 +56,9 @@ $lang->task->copy = '复制任务'; $lang->task->waitTask = '未开始的任务'; $lang->task->allModule = '所有模块'; $lang->task->replace = '替换'; +$lang->task->myEffort = '我的日志'; +$lang->task->allEffort = '所有日志'; +$lang->task->teamOrder = '工序'; $lang->task->common = '任务'; $lang->task->id = '编号'; diff --git a/module/task/model.php b/module/task/model.php index 310dfd84d2..8b223277a1 100755 --- a/module/task/model.php +++ b/module/task/model.php @@ -1907,7 +1907,7 @@ class taskModel extends model { $teamStatus = $estimate->left == 0 ? 'done' : 'doing'; $this->dao->update(TABLE_TASKTEAM)->set('left')->eq($estimate->left)->set("consumed = consumed + {$estimate->consumed}")->set('status')->eq($teamStatus)->where('id')->eq($currentTeam->id)->exec(); - if($task->mode == 'linear') $this->updateEstimateOrder($estimateID, $currentTeam->order); + if($task->mode == 'linear' and empty($estimate->order)) $this->updateEstimateOrder($estimateID, $currentTeam->order); $currentTeam->consumed += $estimate->consumed; $currentTeam->left = $estimate->left; $currentTeam->status = $teamStatus; diff --git a/module/task/view/lineareffort.html.php b/module/task/view/lineareffort.html.php new file mode 100644 index 0000000000..5ff730e48a --- /dev/null +++ b/module/task/view/lineareffort.html.php @@ -0,0 +1,111 @@ +team) and $task->mode == 'linear'):?> + +team as $team) $teamOrders[$team->order] = $team->account; + +$myOrders = array(); +$allEfforts = array(); +$recorders = array(); +foreach($estimates as $estimate) +{ + $order = $estimate->order; + $account = $estimate->account; + $allEfforts[$order][] = $estimate; + $recorders[$order][$account] = $account; + if($app->user->account == $account) $myOrders[$order] = $order; +} +?> + +
+ +
+
+ +
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + +
task->date;?>task->recordedBy;?>comment;?>task->consumed;?>task->left;?>actions;?>
date;?>account);?>work;?>consumed . ' ' . $lang->execution->workHourUnit;?>left . ' ' . $lang->execution->workHourUnit;?> + task->canOperateEffort($task, $estimate); + common::printIcon('task', 'editEstimate', "estimateID=$estimate->id", '', 'list', 'edit', '', 'showinonlybody', true, $canOperateEffort ? '' : 'disabled'); + common::printIcon('task', 'deleteEstimate', "estimateID=$estimate->id", '', 'list', 'trash', 'hiddenwin', 'showinonlybody', false, ($canOperateEffort and $estimate->left > 0) ? '' : 'disabled'); + ?> +
+ +
+
+ + $accounts):?> +
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + +
task->date;?>task->recordedBy;?>comment;?>task->consumed;?>task->left;?>actions;?>
date;?>account);?>work;?>consumed . ' ' . $lang->execution->workHourUnit;?>left . ' ' . $lang->execution->workHourUnit;?> + task->canOperateEffort($task, $estimate); + common::printIcon('task', 'editEstimate', "estimateID=$estimate->id", '', 'list', 'edit', '', 'showinonlybody', true, $canOperateEffort ? '' : 'disabled'); + common::printIcon('task', 'deleteEstimate', "estimateID=$estimate->id", '', 'list', 'trash', 'hiddenwin', 'showinonlybody', false, ($canOperateEffort and $estimate->left > 0) ? '' : 'disabled'); + ?> +
+ + +
+
+
+ + diff --git a/module/task/view/recordestimate.html.php b/module/task/view/recordestimate.html.php index 8a02c027bc..9ce13b6e80 100644 --- a/module/task/view/recordestimate.html.php +++ b/module/task/view/recordestimate.html.php @@ -34,57 +34,73 @@ arrow . $lang->task->logEfforts;?> -
- - - - - - - - - - - - - - - - - - - - - - - - -
task->date;?>task->recordedBy;?>comment;?>task->consumed;?>task->left;?>actions;?>
date;?>account);?>work;?>consumed . ' ' . $lang->execution->workHourUnit;?>left . ' ' . $lang->execution->workHourUnit;?> - task->canOperateEffort($task, $estimate); - common::printIcon('task', 'editEstimate', "estimateID=$estimate->id", '', 'list', 'edit', '', 'showinonlybody', true, $canOperateEffort ? '' : 'disabled'); - common::printIcon('task', 'deleteEstimate', "estimateID=$estimate->id", '', 'list', 'trash', 'hiddenwin', 'showinonlybody', false, ($canOperateEffort and ($task->mode != 'linear' or ($task->mode == 'linear' and $estimate->left > 0))) ? '' : 'disabled'); - ?> -
- - task->canOperateEffort($task)):?> -
- -
- status) !== false):?> -

task->deniedStatusNotice, '' . zget($this->lang->task->statusList, $task->status) . '');?>

- assignedTo != $app->user->account and $task->mode == 'linear'):?> -

task->deniedNotice, '' . $task->assignedToRealName . '', $lang->task->logEfforts);?>

- -

task->deniedNotice, '' . $lang->task->teamMember . '', $lang->task->logEfforts);?>

- -
+ + team) and $task->mode == 'linear'):?> + + + + + + + + + + + + + + + + + + + + + + + + + +
task->date;?>task->recordedBy;?>comment;?>task->consumed;?>task->left;?>actions;?>
date;?>account);?>work;?>consumed . ' ' . $lang->execution->workHourUnit;?>left . ' ' . $lang->execution->workHourUnit;?> + task->canOperateEffort($task, $estimate); + common::printIcon('task', 'editEstimate', "estimateID=$estimate->id", '', 'list', 'edit', '', 'showinonlybody', true, $canOperateEffort ? '' : 'disabled'); + common::printIcon('task', 'deleteEstimate', "estimateID=$estimate->id", '', 'list', 'trash', 'hiddenwin', 'showinonlybody', false, $canOperateEffort ? '' : 'disabled'); + ?> +
+ + + task->canOperateEffort($task) and empty($myOrders)):?> +
+ +
+ assignedTo != $app->user->account and $task->mode == 'linear'):?> +

task->deniedNotice, '' . $task->assignedToRealName . '', $lang->task->logEfforts);?>

+ members[$app->user->account])):?> +

task->deniedNotice, '' . $lang->task->teamMember . '', $lang->task->logEfforts);?>

+
- +
+ + + assignedTo != $app->user->account and !empty($task->team) and $task->mode == 'linear' and !empty($myOrders)) + { + $readonly = ' readonly'; + $left = 0; + $reverseOrders = array_reverse($myOrders, true); + foreach($reverseOrders as $order) $reverseOrders[$order] = $order + 1; + } + ?> + + + @@ -93,8 +109,13 @@ - - + + + +
task->date;?>task->teamOrder;?> comment;?> task->consumedAB;?> task->leftAB;?>
+ + +
@@ -104,7 +125,7 @@
- + h