ObjectController: re-order tabs, fields to the right
This commit is contained in:
parent
fb6518a887
commit
c65d042ed4
|
@ -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),
|
||||||
|
|
Loading…
Reference in New Issue