use of de.agilecoders.wicket.core.markup.html.bootstrap.navbar.NavbarButton in project ocvn by devgateway.
the class BasePage method newMyDashboardsMenu.
protected NavbarButton<ListMyDashboardsPage> newMyDashboardsMenu() {
// home
NavbarButton<ListMyDashboardsPage> menu = new NavbarButton<>(ListMyDashboardsPage.class, this.getPageParameters(), new ResourceModel("mydashboards"));
menu.setIconType(GlyphIconType.filter);
MetaDataRoleAuthorizationStrategy.authorize(menu, Component.RENDER, SecurityConstants.Roles.ROLE_PROCURING_ENTITY);
return menu;
}
use of de.agilecoders.wicket.core.markup.html.bootstrap.navbar.NavbarButton in project ocvn by devgateway.
the class BasePage method newHomeMenu.
protected NavbarButton<Homepage> newHomeMenu() {
// home
NavbarButton<Homepage> homeMenu = new NavbarButton<>(Homepage.class, this.getPageParameters(), new ResourceModel("home"));
homeMenu.setIconType(GlyphIconType.home);
MetaDataRoleAuthorizationStrategy.authorize(homeMenu, Component.RENDER, SecurityConstants.Roles.ROLE_USER);
return homeMenu;
}
use of de.agilecoders.wicket.core.markup.html.bootstrap.navbar.NavbarButton in project ocvn by devgateway.
the class BasePage method newAccountMenu.
protected NavbarButton<EditUserPage> newAccountMenu() {
PageParameters pageParametersForAccountPage = new PageParameters();
Person person = SecurityUtil.getCurrentAuthenticatedPerson();
// account menu
Model<String> account = null;
if (person != null) {
account = Model.of(person.getFirstName());
pageParametersForAccountPage.add(WebConstants.PARAM_ID, person.getId());
}
NavbarButton<EditUserPage> accountMenu = new NavbarButton<>(EditUserPage.class, pageParametersForAccountPage, account);
accountMenu.setIconType(GlyphIconType.user);
MetaDataRoleAuthorizationStrategy.authorize(accountMenu, Component.RENDER, SecurityConstants.Roles.ROLE_USER);
return accountMenu;
}
use of de.agilecoders.wicket.core.markup.html.bootstrap.navbar.NavbarButton in project ocvn by devgateway.
the class BasePage method newLogoutMenu.
protected NavbarButton<LogoutPage> newLogoutMenu() {
// logout menu
NavbarButton<LogoutPage> logoutMenu = new NavbarButton<LogoutPage>(LogoutPage.class, new StringResourceModel("navbar.logout", this, null));
logoutMenu.setIconType(GlyphIconType.logout);
MetaDataRoleAuthorizationStrategy.authorize(logoutMenu, Component.RENDER, SecurityConstants.Roles.ROLE_USER);
return logoutMenu;
}
Aggregations