Revision 6895854c
Added by Stephen Benjamin about 10 years ago
app/views/models/index.html.erb | ||
---|---|---|
<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><%= sort :vendor_class, :as => _("Vendor class") %></th>
|
||
<th><%= sort :hardware_model, :as => s_("Model|Hardware model") %></th>
|
||
<th><%= sort :hosts_count, :as => _("Hosts") %></th>
|
||
<th></th>
|
||
</tr>
|
||
<% for model in @models %>
|
||
... | ... | |
<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"><%= link_to model.hosts_count, 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 %>
|
Also available in: Unified diff
fixes #4256 - makes columns sortable in the UI