* Finish task#95327. Show customized icon for project view.
This commit is contained in:
@@ -3,7 +3,6 @@ $config->datatable->moduleAlias['product-browse'] = 'story';
|
||||
$config->datatable->moduleAlias['execution-story'] = 'story';
|
||||
$config->datatable->moduleAlias['execution-task'] = 'task';
|
||||
$config->datatable->moduleAlias['program-project'] = 'project';
|
||||
$config->datatable->moduleAlias['program-browse'] = 'project';
|
||||
$config->datatable->moduleAlias['project-bug'] = 'bug';
|
||||
$config->datatable->moduleAlias['execution-bug'] = 'bug';
|
||||
$config->datatable->moduleAlias['my-bug'] = 'bug';
|
||||
|
||||
@@ -144,6 +144,13 @@ class datatable extends control
|
||||
$module = zget($this->config->datatable->moduleAlias, "$module-$method", $module);
|
||||
$setting = '';
|
||||
if(isset($this->config->datatable->$target->cols)) $setting = $this->config->datatable->$target->cols;
|
||||
|
||||
if($module == 'program' and $method == 'browse')
|
||||
{
|
||||
$method = 'projectView'; /* Use projectView datatable setting in program module . */
|
||||
$setting = $this->config->datatable->programProjectView->cols; /* Use the customized table data from database. */
|
||||
}
|
||||
|
||||
if(empty($setting))
|
||||
{
|
||||
$cols = $this->datatable->getFieldList($module, $method);
|
||||
|
||||
@@ -92,9 +92,17 @@ class datatableModel extends model
|
||||
$datatableId = $module . ucfirst($method);
|
||||
|
||||
$module = zget($this->config->datatable->moduleAlias, "$module-$method", $module);
|
||||
|
||||
|
||||
if(!isset($this->config->$module)) $this->loadModel($module);
|
||||
if(isset($this->config->datatable->$datatableId->cols)) $setting = json_decode($this->config->datatable->$datatableId->cols, true);
|
||||
|
||||
if($module == 'program' and $method == 'browse')
|
||||
{
|
||||
$method = 'projectView'; /* Use projectView datatable setting in program module . */
|
||||
$setting = json_decode($this->config->datatable->programProjectView->cols, true); /* Fetch the customized table data from database. */
|
||||
}
|
||||
|
||||
$fieldList = $this->getFieldList($module, $method);
|
||||
if(empty($setting))
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?php
|
||||
namespace zin;
|
||||
|
||||
$cols = array_values($config->program->projectView->dtable->fieldList);
|
||||
$cols = $this->loadModel('datatable')->getSetting('program');
|
||||
$data = array();
|
||||
foreach($programs as $program)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user