|
<% title _("Hardware Models") %>
|
|
|
|
<% title_actions display_link_if_authorized(_("New Model"), hash_for_new_model_path) %>
|
|
|
|
<table class="table table-bordered table-striped table-two-pane">
|
|
<tr>
|
|
<th><%= sort :name, :as => s_("Model|Name") %></th>
|
|
<th><%= _("Vendor class") %></th>
|
|
<th><%= s_("Model|Hardware model") %></th>
|
|
<th><%= _("Hosts") %></th>
|
|
<th></th>
|
|
</tr>
|
|
<% for model in @models %>
|
|
<tr>
|
|
<td><%=link_to_if_authorized h(model.name), hash_for_edit_model_path(:id => model).merge(:auth_object => model, :authorizer => authorizer) %></td>
|
|
<td><%=h(model.vendor_class)%></td>
|
|
<td><%=h(model.hardware_model)%></td>
|
|
<td class="ra"><%= link_to @host_counter[model.id] || 0, hosts_path(:search => "model = \"#{model}\"") %></td>
|
|
<td class="ra">
|
|
<%= display_delete_if_authorized hash_for_model_path(:id => model).merge(:auth_object => model, :authorizer => authorizer),
|
|
:confirm => _("Delete %s?") % model.name %>
|
|
</td>
|
|
</tr>
|
|
<% end %>
|
|
</table>
|
|
<%= page_entries_info @models %>
|
|
<%= will_paginate @models %>
|