<%= resource.friendly_name.pluralize %>

<%= hidden_field_tag :page, params[:page], value: 1, class: "hidden" %> <%= search_field_tag :q, params[:q], placeholder: "Search", class: "rounded-full px-4 focus:bg-white focus:border-indigo-500" %> <%= link_to clear_search_params, class: "absolute top-1/2 right-3 text-gray-500 bg-white transform -translate-y-1/2" do %> <% end %>
<%= link_to resource.new_path, class: "bg-white hover:bg-gray-100 text-gray-800 font-semibold py-2 px-4 border border-gray-400 rounded shadow" do %> New <% end %>
<% if resource.scopes.any? %> <%= link_to "All", resource.index_path, class: class_names("p-2 rounded", {"bg-gray-100" => params[:scope].blank?}) %> <% end %> <% resource.scopes.each do |scope| %> <%= link_to scope.to_s.humanize, resource.index_path(scope: scope), class: class_names("p-2 rounded", {"bg-gray-100" => params[:scope] == scope.to_s}) %> <% end %>
<% 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 %>Actions
<%= render partial: attribute.field.to_partial_path("index"), locals: { field: attribute.field, record: record } %><%= link_to "View", resource.show_path(record), class: "text-indigo-500" %>
<%== pagy_nav(@pagy) if @pagy.pages > 1 %>