* Adjust dtable cols config.
This commit is contained in:
@@ -12,10 +12,18 @@ public function getFieldList($module)
|
||||
if($this->session->currentProductType === 'normal') unset($this->config->$module->datatable->fieldList['branch']);
|
||||
foreach($this->config->$module->datatable->fieldList as $field => $items)
|
||||
{
|
||||
if(zget($items, 'display', true) === false)
|
||||
{
|
||||
unset($this->config->$module->datatable->fieldList[$field]);
|
||||
continue;
|
||||
}
|
||||
|
||||
if($field === 'branch')
|
||||
{
|
||||
if($this->session->currentProductType === 'branch') $this->config->$module->datatable->fieldList[$field]['title'] = $this->lang->datatable->branch; if($this->session->currentProductType === 'platform') $this->config->$module->datatable->fieldList[$field]['title'] = $this->lang->datatable->platform;
|
||||
continue; }
|
||||
if($this->session->currentProductType === 'branch') $this->config->$module->datatable->fieldList[$field]['title'] = $this->lang->datatable->branch;
|
||||
if($this->session->currentProductType === 'platform') $this->config->$module->datatable->fieldList[$field]['title'] = $this->lang->datatable->platform;
|
||||
continue;
|
||||
}
|
||||
$title = zget($this->lang->$module, $items['title'], zget($this->lang, $items['title'], $items['title']));
|
||||
$this->config->$module->datatable->fieldList[$field]['title'] = $title;
|
||||
}
|
||||
|
||||
@@ -268,11 +268,13 @@ $config->task->datatable->fieldList['module']['display'] = false;
|
||||
|
||||
$config->task->datatable->fieldList['execution']['title'] = 'execution';
|
||||
$config->task->datatable->fieldList['execution']['control'] = 'hidden';
|
||||
$config->task->datatable->fieldList['execution']['type'] = 'html';
|
||||
$config->task->datatable->fieldList['execution']['dataSource'] = array('module' => 'execution', 'method' => 'getPairs');
|
||||
$config->task->datatable->fieldList['execution']['display'] = false;
|
||||
|
||||
$config->task->datatable->fieldList['project']['title'] = 'project';
|
||||
$config->task->datatable->fieldList['project']['control'] = 'hidden';
|
||||
$config->task->datatable->fieldList['project']['type'] = 'html';
|
||||
$config->task->datatable->fieldList['project']['dataSource'] = array('module' => 'project', 'method' => 'getPairs');
|
||||
$config->task->datatable->fieldList['project']['display'] = false;
|
||||
|
||||
|
||||
@@ -4653,9 +4653,6 @@ class taskModel extends model
|
||||
$rows = array();
|
||||
if($showBranch) $showBranch = isset($this->config->execution->task->showBranch) ? $this->config->execution->task->showBranch : 1;
|
||||
|
||||
$moduleList = $this->loadModel('tree')->getTaskOptionMenu($executionID);
|
||||
$projectList = $this->loadModel('project')->getPairs();
|
||||
$executionList = $this->loadModel('execution')->getPairs();
|
||||
foreach($tasks as $task)
|
||||
{
|
||||
$task->assignedTo = $this->printAssignedHtml($task, $users, false);
|
||||
@@ -4739,10 +4736,6 @@ class taskModel extends model
|
||||
$task->parent = 0;
|
||||
}
|
||||
|
||||
$task->module = zget($moduleList, $task->module, '');
|
||||
$task->project = zget($projectList, $task->project, '');
|
||||
$task->execution = zget($executionList, $task->execution, '');
|
||||
|
||||
$rows[] = $task;
|
||||
|
||||
if(!empty($children))
|
||||
|
||||
Reference in New Issue
Block a user