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