* Finish task #48863.
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
/**
|
||||
* Get field list.
|
||||
*
|
||||
* @param string $module
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getFieldList($module)
|
||||
{
|
||||
if(!isset($this->config->$module)) $this->loadModel($module);
|
||||
if($this->session->currentProductType === 'normal') unset($this->config->$module->datatable->fieldList['branch']);
|
||||
foreach($this->config->$module->datatable->fieldList as $field => $items)
|
||||
{
|
||||
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; }
|
||||
$title = zget($this->lang->$module, $items['title'], zget($this->lang, $items['title'], $items['title']));
|
||||
$this->config->$module->datatable->fieldList[$field]['title'] = $title;
|
||||
}
|
||||
|
||||
if($this->config->edition != 'open' and $module != 'story')
|
||||
{
|
||||
$fields = $this->loadModel('workflowfield')->getList($module);
|
||||
foreach($fields as $field)
|
||||
{
|
||||
if($field->buildin) continue;
|
||||
$this->config->$module->datatable->fieldList[$field->field]['title'] = $field->name;
|
||||
$this->config->$module->datatable->fieldList[$field->field]['width'] = '120';
|
||||
$this->config->$module->datatable->fieldList[$field->field]['fixed'] = 'no';
|
||||
$this->config->$module->datatable->fieldList[$field->field]['required'] = 'no';
|
||||
}
|
||||
}
|
||||
return $this->config->$module->datatable->fieldList;
|
||||
}
|
||||
@@ -7,3 +7,15 @@ $config->story->list->exportFields = '
|
||||
closedBy, closedDate, closedReason,
|
||||
lastEditedBy, lastEditedDate,
|
||||
childStories, linkStories, duplicateStory, files';
|
||||
|
||||
$config->story->datatable->defaultField = array('id', 'pri', 'title', 'openedBy', 'assignedTo', 'estimate', 'status', 'actions');
|
||||
|
||||
unset($config->story->datatable->fieldList['plan']);
|
||||
unset($config->story->datatable->fieldList['source']);
|
||||
unset($config->story->datatable->fieldList['sourceNote']);
|
||||
unset($config->story->datatable->fieldList['stage']);
|
||||
unset($config->story->datatable->fieldList['category']);
|
||||
unset($config->story->datatable->fieldList['feedbackBy']);
|
||||
unset($config->story->datatable->fieldList['notifyEmail']);
|
||||
unset($config->story->datatable->fieldList['bugCount']);
|
||||
unset($config->story->datatable->fieldList['caseCount']);
|
||||
|
||||
Reference in New Issue
Block a user