diff --git a/module/execution/model.php b/module/execution/model.php index 90704f6e09..46a73bc318 100644 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -4368,25 +4368,33 @@ class executionModel extends model echo "{$this->lang->execution->typeList[$execution->type]} "; } echo empty($execution->children) ? html::a(helper::createLink('execution', 'view', "executionID=$execution->id"), $execution->name) : $execution->name; - echo '' . zget($users, $execution->PM) . ''; - echo "" . zget($this->lang->project->statusList, $execution->status) . ''; - echo '' . html::ring($execution->hours->progress) . ''; - echo helper::isZeroDate($execution->begin) ? '' : '' . $execution->begin . ''; - if(!helper::isZeroDate($execution->end)) + if(empty($execution->children)) { - if($execution->status != 'closed') + echo html::a(helper::createLink('execution', 'view', "executionID=$execution->id"), $execution->name); + if(!helper::isZeroDate($execution->end)) { - echo strtotime($today) > strtotime($execution->end) ? '' . $execution->end . '' : '' . $execution->end . ''; - } - else - { - echo '' . $execution->end . ''; + if($execution->status != 'closed') + { + echo strtotime($today) > strtotime($execution->end) ? '' . $this->lang->execution->delayed . '' : ''; + } } } else { - echo ''; + echo $execution->name; + if(!helper::isZeroDate($execution->end)) + { + if($execution->status != 'closed') + { + echo strtotime($today) > strtotime($execution->end) ? '' . $this->lang->execution->delayed . '' : ''; + } + } } + echo '' . zget($users, $execution->PM) . ''; + echo "" . zget($this->lang->project->statusList, $execution->status) . ''; + echo '' . html::ring($execution->hours->progress) . ''; + echo helper::isZeroDate($execution->begin) ? '' : '' . $execution->begin . ''; + echo helper::isZeroDate($execution->end) ? '' : '' . $execution->end . ''; echo "" . $execution->hours->totalEstimate . $this->lang->execution->workHourUnit . ''; echo "" . $execution->hours->totalConsumed . $this->lang->execution->workHourUnit . ''; echo "" . $execution->hours->totalLeft . $this->lang->execution->workHourUnit . ''; diff --git a/module/task/model.php b/module/task/model.php index e5edc31911..f312bbfc1c 100644 --- a/module/task/model.php +++ b/module/task/model.php @@ -3805,26 +3805,19 @@ class taskModel extends model $list .= ''; if($task->parent > 0) $list .= '' . $this->lang->task->childrenAB . ' '; $list .= common::hasPriv('task', 'view') ? html::a(helper::createLink('task', 'view', "id=$task->id"), $task->name, '', "style='color: $task->color'", "data-app='project'") : "$task->name"; - $list .= ''; - $list .= '' . zget($users, $task->assignedTo, '') . ''; - $list .= "" . $this->processStatus('task', $task) . ''; - $list .= ''; - $list .= helper::isZeroDate($task->estStarted) ? '' : '' . $task->estStarted . ''; if(!helper::isZeroDate($task->deadline)) { - if($task->status != 'done') + if($task->status != done) { - $list .= strtotime($today) > strtotime($task->deadline) ? '' . $task->deadline . '' : '' . $task->deadline . ''; - } - else - { - $list .= '' . $task->deadline . ''; + $list .= strtotime($today) > strtotime($task->deadline) ? '' . $this->lang->execution->delayed . '' : ''; } } - else - { - $list .= ''; - } + $list .= ''; + $list .= '' . zget($users, $task->assignedTo, '') . ''; + $list .= "" . $this->processStatus('task', $task) . ''; + $list .= ''; + $list .= helper::isZeroDate($task->estStarted) ? '' : '' . $task->estStarted . ''; + $list .= helper::isZeroDate($task->deadline) ? '' : '' . $task->deadline . ''; $list .= '' . $task->estimate . $this->lang->execution->workHourUnit . ''; $list .= '' . $task->consumed . $this->lang->execution->workHourUnit . ''; $list .= '' . $task->left . $this->lang->execution->workHourUnit . '';