UserController: Add tab for the list action

refs #8826
This commit is contained in:
Johannes Meyer 2015-05-05 07:36:14 +02:00
parent bd136d39f4
commit 8cf0c29223
1 changed files with 26 additions and 0 deletions

View File

@ -11,6 +11,14 @@ use Icinga\Web\Widget;
class UserController extends Controller
{
/**
* Initialize this controller
*/
public function init()
{
$this->createTabs();
}
/**
* Redirect to this controller's list action
*/
@ -45,6 +53,7 @@ class UserController extends Controller
$query->applyFilter($filterEditor->getFilter());
$this->setupFilterControl($filterEditor);
$this->getTabs()->activate('user/list');
$this->view->backend = $backend;
$this->view->users = $query->paginate();
@ -99,4 +108,21 @@ class UserController extends Controller
return $backend;
}
/**
* Create the tabs
*/
protected function createTabs()
{
$tabs = $this->getTabs();
$tabs->add(
'user/list',
array(
'title' => $this->translate('List users of authentication backends'),
'label' => $this->translate('Users'),
'icon' => 'users',
'url' => 'user/list'
)
);
}
}