Skip to content

Commit

Permalink
Navbar with all user types
Browse files Browse the repository at this point in the history
  • Loading branch information
pepakriz committed Sep 20, 2014
1 parent 875f16e commit 12ff2a9
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/Security/AdminModule/DefaultPresenter.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,15 @@ protected function createComponentTable()

// Toolbar
$toolbar = $admin->getNavbar();
$toolbar->addSection('new', 'Create', 'file');
$admin->connectFormWithNavbar($form, $toolbar->getSection('new'), $admin::MODE_PLACE);
$section = $toolbar->addSection('new', 'Create', 'user');

foreach ($this->securityManager->getUserTypes() as $type => $value) {
$admin->connectFormWithNavbar(
$form,
$section->addSection(str_replace('\\', '_', $type), $value->getName()),
$admin::MODE_PLACE
);
}

$table->addActionEvent('delete', 'Delete')
->getElementPrototype()->class[] = 'ajax';
Expand Down

0 comments on commit 12ff2a9

Please sign in to comment.