<%= javascript "nfs_visibility" %>
<% title _("Installation Media") %>
<% title_actions display_link_if_authorized(_("New Medium"), hash_for_new_medium_path),
                 documentation_button('4.4.2InstallationMedia'),
                 help_path %>

<table class="table table-bordered table-striped table-two-pane table-fixed">
  <thead>
    <tr>
      <th class="col-md-2"><%= sort :name, :as => s_("Medium|Name") %></th>
      <th class="col-md-6"><%= sort :path, :as => s_("Medium|Path") %></th>
      <th class="col-md-1"><%= sort :family, :as => s_("Medium|Os family") %></th>
      <th class="col-md-2"><%= _("Operating Systems") %></th>
      <th><%= _('Actions') %></th>
    </tr>
  </thead>
  <tbody>
    <% @media.each do |medium| %>
      <tr>
        <td class="display-two-pane ellipsis"><%= link_to_if_authorized medium, hash_for_edit_medium_path(:id => medium).merge(:auth_object => medium, :authorizer => authorizer) %></td>
        <td class="ellipsis"><%= medium.path %></td>
        <td class="ellipsis"><%= lookup_family(medium.os_family) %></td>
        <td class="ellipsis"><%= medium.operatingsystems.map(&:to_label).to_sentence %></td>
        <td>
          <%=
            action_buttons(
              display_delete_if_authorized(
                hash_for_medium_path(:id => medium).
                merge(:auth_object => medium, :authorizer => authorizer),
                :data => { :confirm => _("Delete %s?") % medium.name } )) %>
        </td>
      </tr>
    <% end %>
  </tbody>
</table>
<%= will_paginate_with_info @media %>
