Object/CommandController: unify titles

This commit is contained in:
Thomas Gelf 2016-05-03 09:09:01 +02:00
parent 60856a62ef
commit 24b201db13
2 changed files with 7 additions and 5 deletions

View File

@ -10,7 +10,7 @@ class CommandController extends ObjectController
public function init()
{
parent::init();
if ($this->object) {
if ($this->object && ! $this->object->isExternal()) {
$this->getTabs()->add('arguments', array(
'url' => 'director/command/arguments',
'urlParams' => array('name' => $this->object->object_name),
@ -22,7 +22,10 @@ class CommandController extends ObjectController
public function argumentsAction()
{
$this->getTabs()->activate('arguments');
$this->view->title = $this->translate('Command arguments');
$this->view->title = sprintf(
$this->translate('Command arguments: %s'),
$this->object->object_name
);
$this->view->table = $this
->loadTable('icingaCommandArgument')

View File

@ -239,10 +239,9 @@ abstract class ObjectController extends ActionController
$type = $this->getType();
$this->getTabs()->activate('fields');
$title = $this->translate('%s template "%s": custom fields');
$this->view->title = sprintf(
$title,
$this->translate(ucfirst($type)),
$this->translate('Custom fields: %s'),
$object->object_name
);