ObjectController: re-order tabs, fields to the right

This commit is contained in:
Thomas Gelf 2016-02-24 21:38:42 +01:00
parent fb6518a887
commit c65d042ed4
1 changed files with 10 additions and 10 deletions

View File

@ -30,6 +30,16 @@ abstract class ObjectController extends ActionController
'label' => $this->translate(ucfirst($type)) 'label' => $this->translate(ucfirst($type))
)); ));
$tabs->add('render', array(
'url' => sprintf('director/%s/render', $type),
'urlParams' => $params,
'label' => $this->translate('Preview'),
))->add('history', array(
'url' => sprintf('director/%s/history', $type),
'urlParams' => $params,
'label' => $this->translate('History')
));
if ($object->hasBeenLoadedFromDb() if ($object->hasBeenLoadedFromDb()
&& $object->supportsFields() && $object->supportsFields()
&& ($object->isTemplate() || $type === 'command') && ($object->isTemplate() || $type === 'command')
@ -40,16 +50,6 @@ abstract class ObjectController extends ActionController
'label' => $this->translate('Fields') 'label' => $this->translate('Fields')
)); ));
} }
$tabs->add('render', array(
'url' => sprintf('director/%s/render', $type),
'urlParams' => $params,
'label' => $this->translate('Preview'),
))->add('history', array(
'url' => sprintf('director/%s/history', $type),
'urlParams' => $params,
'label' => $this->translate('History')
));
} else { } else {
$this->getTabs()->add('add', array( $this->getTabs()->add('add', array(
'url' => sprintf('director/%s/add', $type), 'url' => sprintf('director/%s/add', $type),