<%= content_for :title, resource.friendly_name.pluralize %>

<%= resource.friendly_name.pluralize %>

<%= link_to clear_search_params, class: "btn btn-secondary" do %> <% end if params[:q].present? %> <%= link_to "New #{resource.friendly_name}", resource.new_path, class: "btn btn-secondary" %>
<% resource.attributes.values.each do |attribute| %> <% next if attribute.field.nil? %> <% next unless attribute.field.visible?(action_name) %> <% end %> <% @records.each do |record| %> <% resource.attributes.values.each do |attribute| %> <% next if attribute.field.nil? %> <% next unless attribute.field.visible?(action_name) %> <% end %> <% end %>
<%= sortable attribute.name, attribute.name.to_s.titleize %>
<%= render partial: attribute.field.to_partial_path("index"), locals: { field: attribute.field, record: record, resource: resource } %> <%= link_to "View", resource.show_path(record) %> <%= link_to "Edit", resource.edit_path(record) %>