diff --git a/application/controllers/ConfigController.php b/application/controllers/ConfigController.php index cb2c31855..30f46db50 100644 --- a/application/controllers/ConfigController.php +++ b/application/controllers/ConfigController.php @@ -32,12 +32,14 @@ class ConfigController extends Controller $tabs->add('general', array( 'title' => $this->translate('Adjust the general configuration of Icinga Web 2'), 'label' => $this->translate('General'), - 'url' => 'config/general' + 'url' => 'config/general', + 'baseTarget' => '_main' )); $tabs->add('resource', array( 'title' => $this->translate('Configure which resources are being utilized by Icinga Web 2'), 'label' => $this->translate('Resources'), - 'url' => 'config/resource' + 'url' => 'config/resource', + 'baseTarget' => '_main' )); return $tabs; } @@ -51,12 +53,14 @@ class ConfigController extends Controller $tabs->add('userbackend', array( 'title' => $this->translate('Configure how users authenticate with and log into Icinga Web 2'), 'label' => $this->translate('User Backends'), - 'url' => 'config/userbackend' + 'url' => 'config/userbackend', + 'baseTarget' => '_main' )); $tabs->add('usergroupbackend', array( 'title' => $this->translate('Configure how users are associated with groups by Icinga Web 2'), 'label' => $this->translate('User Group Backends'), - 'url' => 'usergroupbackend/list' + 'url' => 'usergroupbackend/list', + 'baseTarget' => '_main' )); return $tabs; } diff --git a/application/controllers/RoleController.php b/application/controllers/RoleController.php index bae4cad88..971a7efc9 100644 --- a/application/controllers/RoleController.php +++ b/application/controllers/RoleController.php @@ -166,7 +166,8 @@ class RoleController extends AuthBackendController 'Configure roles to permit or restrict users and groups accessing Icinga Web 2' ), 'label' => $this->translate('Roles'), - 'url' => 'role/list' + 'url' => 'role/list', + 'baseTarget' => '_main' ) ); diff --git a/application/views/scripts/config/resource.phtml b/application/views/scripts/config/resource.phtml index 36822b9f0..3e34c308d 100644 --- a/application/views/scripts/config/resource.phtml +++ b/application/views/scripts/config/resource.phtml @@ -1,4 +1,4 @@ -
+
diff --git a/application/views/scripts/config/userbackend/reorder.phtml b/application/views/scripts/config/userbackend/reorder.phtml index 64a6fc594..08b5f19be 100644 --- a/application/views/scripts/config/userbackend/reorder.phtml +++ b/application/views/scripts/config/userbackend/reorder.phtml @@ -1,4 +1,4 @@ -
+
diff --git a/application/views/scripts/role/list.phtml b/application/views/scripts/role/list.phtml index e75c89356..a4f597767 100644 --- a/application/views/scripts/role/list.phtml +++ b/application/views/scripts/role/list.phtml @@ -1,4 +1,4 @@ -
+
diff --git a/library/Icinga/Web/Widget/Tab.php b/library/Icinga/Web/Widget/Tab.php index 5132114f4..890928ef0 100644 --- a/library/Icinga/Web/Widget/Tab.php +++ b/library/Icinga/Web/Widget/Tab.php @@ -91,6 +91,13 @@ class Tab extends AbstractWidget */ private $targetBlank = false; + /** + * Data base target that determines if the link will be opened in a side-bar or in the main container + * + * @var null + */ + private $baseTarget = null; + /** * Sets an icon image for this tab * @@ -210,6 +217,11 @@ class Tab extends AbstractWidget $this->targetBlank = $value; } + public function setBaseTarget($value) + { + $this->baseTarget = $value; + } + /** * Create a new Tab with the given properties * @@ -274,6 +286,10 @@ class Tab extends AbstractWidget } } + if ($this->baseTarget !== null) { + $tagParams['data-base-target'] = $this->baseTarget; + } + if ($this->icon !== null) { if (strpos($this->icon, '.') === false) { $caption = $view->icon($this->icon) . $caption;