theforeman/foreman-docker

View on GitHub
app/views/registries/index.html.erb

Summary

Maintainability
Test Coverage
<% title _("Registries") %>

<%= title_actions(new_link(_("Create Registry"))) %>

<table class="table table-bordered table-striped table-condensed" data-table="inline">
  <thead>
    <tr>
      <th><%= sort :name, :as => _("Name") %></th>
      <th class="hidden-tablet hidden-xs"><%= sort :url, :as => _("URL") %></th>
      <th class="hidden-tablet hidden-xs"><%= _("Description") %></th>
      <th><%= _('Actions') %></th>
    </tr>
  </thead>
  <tbody>
    <% @registries.each do |r| %>
      <tr>
        <td><%= link_to_if_authorized trunc_with_tooltip(r.name), hash_for_edit_registry_path(:id => r).merge(:auth_object => r, :authorizer => authorizer) %></td>
        <td class="hidden-tablet hidden-xs text-center"><%= trunc_with_tooltip(r.url) %></td>
        <td class="hidden-tablet hidden-xs text-center"><%= trunc_with_tooltip(r.description) %></td>
        <td><%= action_buttons(
          display_delete_if_authorized hash_for_registry_path(:id => r).
          merge(:auth_object => r, :authorizer => authorizer),
          :confirm => _("Delete %s?") % r.name) %></td>
      </tr>
    <% end %>
  </tbody>
</table>

<%= will_paginate_with_info @registries %>