diff --git a/module/datatable/control.php b/module/datatable/control.php index 5f458c0173..f365b7e8b1 100644 --- a/module/datatable/control.php +++ b/module/datatable/control.php @@ -99,7 +99,12 @@ class datatable extends control if($module == 'execution' and $method == 'all') { - if($extra == 'execution' or $extra == 'project') unset($cols['actions']); + if($extra == 'execution' or $extra == 'project') + { + unset($cols['percent']); + unset($cols['attribute']); + unset($cols['actions']); + } if($extra == 'project' or $extra == 'stage') unset($cols['project']); } diff --git a/module/execution/config.php b/module/execution/config.php index d8f5428dc9..c2514fd6d8 100644 --- a/module/execution/config.php +++ b/module/execution/config.php @@ -139,7 +139,7 @@ $config->execution->gantt->linkType['end']['end'] = 2; $config->execution->gantt->linkType['begin']['end'] = 3; $config->execution->datatable = new stdclass(); -$config->execution->datatable->defaultField = array('id', 'name', 'code', 'project', 'PM', 'status', 'progress', 'begin', 'end', 'estimate', 'consumed', 'left', 'burn'); +$config->execution->datatable->defaultField = array('id', 'name', 'code', 'project', 'PM', 'status', 'progress', 'percent', 'attribute', 'begin', 'end', 'estimate', 'consumed', 'left', 'burn', 'actions'); $config->execution->datatable->fieldList['id']['title'] = 'idAB'; $config->execution->datatable->fieldList['id']['fixed'] = 'left'; diff --git a/module/execution/model.php b/module/execution/model.php index 768ac3b83b..dbec1f4d5d 100644 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -4167,7 +4167,7 @@ class executionModel extends model $id = $col->id; $onlyChildStage = ($execution->grade == 2 and $execution->project != $execution->parent); - if(!$isStage and $col->id == 'actions') return; + if(!$isStage and in_array($col->id, array('percent', 'attribute', 'actions'))) return; if(($this->config->systemMode == 'classic' or ($this->config->systemMode == 'new' and $this->app->tab != 'execution')) and $col->id == 'project') return; if($col->show) diff --git a/module/execution/view/all.html.php b/module/execution/view/all.html.php index e332219bc4..8478906dc4 100644 --- a/module/execution/view/all.html.php +++ b/module/execution/view/all.html.php @@ -106,7 +106,11 @@ js::set('foldAll', $lang->execution->treeLevel['root']); $hasActions = false; foreach($setting as $key => $value) { - if($value->id == 'actions') $hasActions = true; + if($value->id == 'actions') + { + $hasActions = true; + $value->show = true; + } } if(!$hasActions) @@ -126,9 +130,9 @@ js::set('foldAll', $lang->execution->treeLevel['root']); foreach($setting as $key => $value) { - if($value->show || $value->id == 'actions') + if($value->show) { - if($isStage and $value->id == 'actions') $value->show = true; + if(!$isStage and in_array($value->id, array('percent', 'attribute', 'actions'))) continue; if(($config->systemMode == 'classic' or ($config->systemMode == 'new' and $this->app->tab != 'execution')) and $value->id == 'project') continue; $this->datatable->printHead($value, $orderBy, $vars, $canBatchEdit);