Add proper titles to all config tabs

refs #8458
This commit is contained in:
Johannes Meyer 2015-02-23 16:50:31 +01:00
parent 9fb3dcabea
commit 64a4dc67bc
3 changed files with 23 additions and 10 deletions

View File

@ -39,28 +39,34 @@ class ConfigController extends ActionController
$allowedActions = array();
if ($auth->hasPermission('system/config/application')) {
$tabs->add('application', array(
'title' => $this->translate('Application'),
'title' => $this->translate('Adjust the general configuration of Icinga Web 2'),
'label' => $this->translate('Application'),
'url' => 'config/application'
));
$allowedActions[] = 'application';
}
if ($auth->hasPermission('system/config/authentication')) {
$tabs->add('authentication', array(
'title' => $this->translate('Authentication'),
'title' => $this->translate('Configure how users authenticate with and log into Icinga Web 2'),
'label' => $this->translate('Authentication'),
'url' => 'config/authentication'
));
$allowedActions[] = 'authentication';
}
if ($auth->hasPermission('system/config/resources')) {
$tabs->add('resource', array(
'title' => $this->translate('Resources'),
'title' => $this->translate('Configure which resources are being utilized by Icinga Web 2'),
'label' => $this->translate('Resources'),
'url' => 'config/resource'
));
$allowedActions[] = 'resource';
}
if ($auth->hasPermission('system/config/roles')) {
$tabs->add('roles', array(
'title' => $this->translate('Roles'),
'title' => $this->translate(
'Configure roles to permit or restrict users and groups accessing Icinga Web 2'
),
'label' => $this->translate('Roles'),
'url' => 'roles'
));
$allowedActions[] = 'roles';

View File

@ -25,8 +25,9 @@ class PreferenceController extends BasePreferenceController
return array(
'preferences' => new Tab(
array(
'title' => t('Preferences'),
'url' => Url::fromPath('/preference')
'title' => t('Adjust the preferences of Icinga Web 2 according to your needs'),
'label' => t('Preferences'),
'url' => Url::fromPath('/preference')
)
)
);

View File

@ -25,24 +25,30 @@ class RolesController extends ActionController
$auth = $this->Auth();
if ($auth->hasPermission('system/config/application')) {
$tabs->add('application', array(
'title' => $this->translate('Application'),
'title' => $this->translate('Adjust the general configuration of Icinga Web 2'),
'label' => $this->translate('Application'),
'url' => 'config'
));
}
if ($auth->hasPermission('system/config/authentication')) {
$tabs->add('authentication', array(
'title' => $this->translate('Authentication'),
'title' => $this->translate('Configure how users authenticate with and log into Icinga Web 2'),
'label' => $this->translate('Authentication'),
'url' => 'config/authentication'
));
}
if ($auth->hasPermission('system/config/resources')) {
$tabs->add('resource', array(
'title' => $this->translate('Resources'),
'title' => $this->translate('Configure which resources are being utilized by Icinga Web 2'),
'label' => $this->translate('Resources'),
'url' => 'config/resource'
));
}
$tabs->add('roles', array(
'title' => $this->translate('Roles'),
'title' => $this->translate(
'Configure roles to permit or restrict users and groups accessing Icinga Web 2'
),
'label' => $this->translate('Roles'),
'url' => 'roles'
));
}