<% title _("Architectures") %>
<% title_actions display_link_if_authorized(_("New Architecture"), hash_for_new_architecture_path), help_path %>

<table class="table table-bordered table-striped table-two-pane">
  <thead>
    <tr>
      <th><%= sort :name, :as => s_("Architecture|Name") %></th>
      <th><%= _("Operating Systems") %></th>
      <th><%= sort :hosts_count, :as => _("Hosts"), :default => "DESC" %></th>
      <th></th>
    </tr>
  </thead>
  <tbody>
  <% for architecture in @architectures %>
    <tr>
      <td class='col-md-3 display-two-pane'><%= link_to_if_authorized(trunc_with_tooltip(architecture.name),
                                                     hash_for_edit_architecture_path(:id => architecture).merge(:auth_object => architecture, :authorizer => authorizer)) %></td>
      <td><%=h architecture.operatingsystems.map(&:to_label).to_sentence %></td>
      <td><%= link_to architecture.hosts_count, hosts_path(:search => "architecture = #{architecture}") %>
      <td align="right">
        <%= display_delete_if_authorized hash_for_architecture_path(:id => architecture).merge(:auth_object => architecture, :authorizer => authorizer),
          :data => { :confirm => _("Delete %s?") % architecture.name } %>
      </td>
    </tr>
  <% end %>
  </tbody>
</table>
<%= will_paginate_with_info @architectures %>
