PropertymodifierTable: show target column if any

refs #12856
This commit is contained in:
Thomas Gelf 2016-10-06 19:37:01 +00:00
parent f60f35bd1f
commit bd3ae6d181
1 changed files with 6 additions and 3 deletions

View File

@ -12,7 +12,9 @@ class PropertymodifierTable extends QuickTable
'id' => 'm.id', 'id' => 'm.id',
'source_id' => 'm.source_id', 'source_id' => 'm.source_id',
'source_name' => 's.source_name', 'source_name' => 's.source_name',
'property_name' => 'm.property_name', 'property' => 'CASE WHEN m.target_property IS NULL'
. ' THEN m.property_name'
. " ELSE m.target_property || ' <- ' || m.property_name END",
'provider_class' => 'm.provider_class', 'provider_class' => 'm.provider_class',
'priority' => 'm.priority', 'priority' => 'm.priority',
); );
@ -33,7 +35,7 @@ class PropertymodifierTable extends QuickTable
{ {
$view = $this->view(); $view = $this->view();
return array( return array(
'property_name' => $view->translate('Property'), 'property' => $view->translate('Property'),
); );
} }
@ -48,7 +50,8 @@ class PropertymodifierTable extends QuickTable
array('m' => 'import_row_modifier'), array('m' => 'import_row_modifier'),
's.id = m.source_id', 's.id = m.source_id',
array() array()
)->order('m.property_name'); )->order('property')
->order('priority');
return $query; return $query;
} }