Objects: dedicated tab for external commands
This commit is contained in:
parent
7028a64c1b
commit
5ccb94dfbd
|
@ -54,6 +54,10 @@ abstract class ObjectsController extends ActionController
|
|||
->addTitle($this->translate(ucfirst(strtolower($type)) . 's'))
|
||||
->actions(new ObjectsActionBar($type, $this->url()));
|
||||
|
||||
if ($type === 'command' && $this->params->get('type') === 'external_object') {
|
||||
$this->tabs()->activate('external');
|
||||
}
|
||||
|
||||
$this->table = ObjectsTable::create($type, $this->db())
|
||||
->setAuth($this->Auth())
|
||||
->renderTo($this);
|
||||
|
|
|
@ -23,6 +23,14 @@ class ObjectsTabs extends Tabs
|
|||
'label' => $this->translate(ucfirst($type) . 's'),
|
||||
));
|
||||
|
||||
if ($object->getShortTableName() === 'command') {
|
||||
$this->add('external', array(
|
||||
'url' => sprintf('director/%ss', strtolower($type)),
|
||||
'urlParams' => ['type' => 'external_object'],
|
||||
'label' => $this->translate('External'),
|
||||
));
|
||||
}
|
||||
|
||||
if ($auth->hasPermission('director/admin') || (
|
||||
$object->getShortTableName() && $auth->hasPermission('director/notifications')
|
||||
)) {
|
||||
|
|
Loading…
Reference in New Issue