Revision bb25ebe6
Added by Tomer Brisker about 8 years ago
app/views/models/index.html.erb | ||
---|---|---|
<% title _("Hardware Models") %>
|
||
|
||
<% title_actions display_link_if_authorized(_("New Model"), hash_for_new_model_path) %>
|
||
<% title_actions new_link(_("New Model")) %>
|
||
|
||
<table class="table table-bordered table-striped table-two-pane table-fixed">
|
||
<thead>
|
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.