Revision bb25ebe6
Added by Tomer Brisker about 8 years ago
app/views/roles/index.html.erb | ||
---|---|---|
<% title _("Roles") %>
|
||
<% title_actions link_to_if_authorized(_("New role"), hash_for_new_role_path),
|
||
<% title_actions new_link(_("New role")),
|
||
documentation_button('4.1.2RolesandPermissions') %>
|
||
|
||
<table class="table table-bordered table-striped table-two-pane table-fixed">
|
Also available in: Unified diff
Fixes #12979 - Create helper for "new" button
Previously the button classes were applied to new buttons using jQuery.
This commit creates a `new_link` helper that makes sure all new buttons
will receive the correct class and only display if authorized. Also a
little bit of cleanup.