diff --git a/module/execution/model.php b/module/execution/model.php
index 5a82330dfb..e6a2ef77ac 100644
--- a/module/execution/model.php
+++ b/module/execution/model.php
@@ -4226,6 +4226,100 @@ class executionModel extends model
return $html;
}
+ /**
+ * Print execution nested list.
+ *
+ * @param object $execution
+ * @param int $isChild
+ * @param array $users
+ * @access public
+ * @return void
+ */
+ public function printNestedList($execution, $isChild = false, $users, $productID)
+ {
+ $this->loadModel('task');
+ $this->loadModel('execution');
+ $this->loadModel('programplan');
+
+ if(!$isChild)
+ {
+ $trClass = 'is-top-level table-nest-child-hide';
+ $trAttrs = "data-id='$execution->id' data-order='$execution->order' data-nested='true'";
+ }
+ else
+ {
+ $trClass = 'is-nest-child';
+ $trAttrs = "data-id={$execution->id} data-parent={$execution->parent}";
+ $trAttrs .= " data-nest-parent='$execution->parent' data-order='$execution->order' data-nest-path=',$execution->parent,$execution->id,'";
+ }
+
+ $burns = join(',', $execution->burns);
+ echo "
";
+ echo "| id class='table-nest-icon icon table-nest-toggle'>";
+ if($this->config->systemMode == 'new')
+ {
+ $spanClass = $execution->type == 'stage' ? 'label-warning' : 'label-info';
+ echo "{$this->lang->execution->typeList[$execution->type]}";
+ }
+ echo html::a(helper::createLink('execution', 'view', "executionID=$execution->id"), $execution->name);
+ echo ' | ' . zget($users, $execution->PM) . ' | ';
+ echo "" . zget($this->lang->project->statusList, $execution->status) . ' | ';
+ echo '' . html::ring($execution->hours->progress) . ' | ';
+ echo '' . $execution->begin . ' | ';
+ echo '' . $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 . ' | ';
+ echo " | ";
+ echo '';
+ common::printIcon('execution', 'start', "executionID={$execution->id}", $execution, 'list', '', '', 'iframe', true);
+ $class = !empty($execution->children) ? 'disabled' : '';
+ common::printIcon('task', 'create', "executionID={$execution->id}", $execution, 'list', '', '', $class, false, "data-app='execution'");
+
+ if($execution->grade == 1 && $this->loadModel('programplan')->isCreateTask($execution->id))
+ {
+ common::printIcon('programplan', 'create', "program={$execution->parent}&productID=$productID&planID=$execution->id", $execution, 'list', 'split', '', '', '', '', $this->lang->programplan->createSubPlan);
+ }
+ else
+ {
+ $disabled = ($execution->grade == 2) ? ' disabled' : '';
+ echo common::hasPriv('programplan', 'create') ? html::a('javascript:alert("' . $this->lang->programplan->error->createdTask . '");', '', '', 'class="btn ' . $disabled . '"') : '';
+ }
+
+ common::printIcon('programplan', 'edit', "stageID=$execution->id&projectID=$execution->project", $execution, 'list', '', '', 'iframe', true);
+
+ $disabled = !empty($execution->children) ? ' disabled' : '';
+ if($execution->status != 'closed' and common::hasPriv('execution', 'close', $execution))
+ {
+ common::printIcon('execution', 'close', "stageID=$execution->id", $execution, 'list', 'off', 'hiddenwin' , $disabled . ' iframe', true, '', $this->lang->programplan->close);
+ }
+ elseif($execution->status == 'closed' and common::hasPriv('execution', 'activate', $execution))
+ {
+ common::printIcon('execution', 'activate', "stageID=$execution->id", $execution, 'list', 'magic', 'hiddenwin' , $disabled . ' iframe', true, '', $this->lang->programplan->activate);
+ }
+
+ if(common::hasPriv('execution', 'delete', $execution))
+ {
+ common::printIcon('execution', 'delete', "stageID=$execution->id&confirm=no", $execution, 'list', 'trash', 'hiddenwin' , $disabled, '', '', $this->lang->programplan->delete);
+ echo ' | ';
+ echo '
';
+
+ if(!empty($execution->children))
+ {
+ foreach($execution->children as $child) $this->printNestedList($child, true, $users, $productID);
+ }
+
+ if(!empty($execution->tasks))
+ {
+ foreach($execution->tasks as $task)
+ {
+ $showmore = (count($execution->tasks) == 50) && ($task == end($execution->tasks));
+ echo $this->task->buildNestedList($execution, $task, false, $showmore, $users);
+ }
+ }
+ }
+ }
+
/**
* Update user view of execution and it's product.
*
diff --git a/module/project/css/execution.css b/module/project/css/execution.css
index 0853109e06..5c581d47fc 100644
--- a/module/project/css/execution.css
+++ b/module/project/css/execution.css
@@ -1,3 +1,4 @@
#executionList > thead > tr > th .table-nest-toggle-global {top: 6px}
#executionList > thead > tr > th .table-nest-toggle-global:before {color: #a6aab8;}
#mainMenu .pull-left .checkbox-primary {margin-top: 5px;}
+.main-table tbody>tr>td:first-child, .main-table thead>tr>th:first-child { padding-left: 8px; }
diff --git a/module/project/model.php b/module/project/model.php
index 3af953650f..1e02b1f3ac 100644
--- a/module/project/model.php
+++ b/module/project/model.php
@@ -2091,100 +2091,6 @@ class projectModel extends model
}
}
- /**
- * Print execution list.
- *
- * @param object $execution
- * @param int $isChild
- * @param array $users
- * @access public
- * @return void
- */
- public function printExecutionList($execution, $isChild = false, $users, $productID)
- {
- $this->loadModel('task');
- $this->loadModel('execution');
- $this->loadModel('programplan');
-
- if(!$isChild)
- {
- $trClass = 'is-top-level table-nest-child-hide';
- $trAttrs = "data-id='$execution->id' data-order='$execution->order' data-nested='true'";
- }
- else
- {
- $trClass = 'is-nest-child';
- $trAttrs = "data-id={$execution->id} data-parent={$execution->parent}";
- $trAttrs .= " data-nest-parent='$execution->parent' data-order='$execution->order' data-nest-path=',$execution->parent,$execution->id,'";
- }
-
- $burns = join(',', $execution->burns);
- echo "";
- echo "| id class='table-nest-icon icon table-nest-toggle'>";
- if($this->config->systemMode == 'new')
- {
- $spanClass = $execution->type == 'stage' ? 'label-warning' : 'label-info';
- echo "{$this->lang->execution->typeList[$execution->type]}";
- }
- echo html::a(helper::createLink('execution', 'view', "executionID=$execution->id"), $execution->name);
- echo ' | ' . zget($users, $execution->PM) . ' | ';
- echo '' . zget($this->lang->project->statusList, $execution->status) . ' | ';
- echo '' . html::ring($execution->hours->progress) . ' | ';
- echo '' . $execution->begin . ' | ';
- echo '' . $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 . ' | ';
- echo " | ";
- echo '';
- common::printIcon('execution', 'start', "executionID={$execution->id}", $execution, 'list', '', '', 'iframe', true);
- $class = !empty($execution->children) ? 'disabled' : '';
- common::printIcon('task', 'create', "executionID={$execution->id}", $execution, 'list', '', '', $class, false, "data-app='execution'");
-
- if($execution->grade == 1 && $this->loadModel('programplan')->isCreateTask($execution->id))
- {
- common::printIcon('programplan', 'create', "program={$execution->parent}&productID=$productID&planID=$execution->id", $execution, 'list', 'split', '', '', '', '', $this->lang->programplan->createSubPlan);
- }
- else
- {
- $disabled = ($execution->grade == 2) ? ' disabled' : '';
- echo common::hasPriv('programplan', 'create') ? html::a('javascript:alert("' . $this->lang->programplan->error->createdTask . '");', '', '', 'class="btn ' . $disabled . '"') : '';
- }
-
- common::printIcon('programplan', 'edit', "stageID=$execution->id&projectID=$execution->project", $execution, 'list', '', '', 'iframe', true);
-
- $disabled = !empty($execution->children) ? ' disabled' : '';
- if($execution->status != 'closed' and common::hasPriv('execution', 'close', $execution))
- {
- common::printIcon('execution', 'close', "stageID=$execution->id", $execution, 'list', 'off', 'hiddenwin' , $disabled . ' iframe', true, '', $this->lang->programplan->close);
- }
- elseif($execution->status == 'closed' and common::hasPriv('execution', 'activate', $execution))
- {
- common::printIcon('execution', 'activate', "stageID=$execution->id", $execution, 'list', 'magic', 'hiddenwin' , $disabled . ' iframe', true, '', $this->lang->programplan->activate);
- }
-
- if(common::hasPriv('execution', 'delete', $execution))
- {
- common::printIcon('execution', 'delete', "stageID=$execution->id&confirm=no", $execution, 'list', 'trash', 'hiddenwin' , $disabled, '', '', $this->lang->programplan->delete);
- echo ' | ';
- echo '
';
-
- if(!empty($execution->children))
- {
- foreach($execution->children as $child) $this->printExecutionList($child, true, $users, $productID);
- }
-
- if(!empty($execution->tasks))
- {
- foreach($execution->tasks as $task)
- {
- $showmore = (count($execution->tasks) == 50) && ($task == end($execution->tasks));
- echo $this->task->buildNestedList($execution, $task, false, $showmore, $users);
- }
- }
- }
- }
-
/**
* Convert budget unit.
*
diff --git a/module/project/view/execution.html.php b/module/project/view/execution.html.php
index 5feacef27b..4037395017 100644
--- a/module/project/view/execution.html.php
+++ b/module/project/view/execution.html.php
@@ -75,10 +75,13 @@
- project->printExecutionList($execution, false, $users, $productID);?>
+ execution->printNestedList($execution, false, $users, $productID);?>
+
diff --git a/module/task/model.php b/module/task/model.php
index 3f373914e4..3746924b46 100644
--- a/module/task/model.php
+++ b/module/task/model.php
@@ -3763,9 +3763,12 @@ class taskModel extends model
}
$list = "";
- $list .= '| ' . html::a(helper::createLink('task', 'view', "id=$task->id"), $task->name, '', "data-app='project'") . ' | ';
+ $list .= '';
+ if($task->parent > 0) $list .= '' . $this->lang->task->childrenAB . ' ';
+ $list .= html::a(helper::createLink('task', 'view', "id=$task->id"), $task->name, '', "data-app='project'");
+ $list .= ' | ';
$list .= '' . zget($users, $task->assignedTo, '') . ' | ';
- $list .= '' . zget($this->lang->task->statusList, $task->status, '') . ' | ';
+ $list .= "" . $this->processStatus('task', $task) . ' | ';
$list .= ' | ';
$list .= '' . $task->estStarted . ' | ';
$list .= '' . $task->deadline . ' | ';