<%= resource.friendly_name.pluralize %>
<%= link_to "New #{resource.friendly_name}", resource.new_path %>
<% if resource.scopes.any? %>
<%= link_to "All", resource.index_path %>
<% end %>
<% resource.scopes.each do |scope| %>
<%= link_to scope.to_s.humanize, resource.index_path(scope: scope) %>
<% end %>
<% resource.attributes.each do |attribute| %>
<% next if attribute[:field].nil? %>
<% next unless attribute[:field].visible?(action_name) %>
<%= attribute[:name].to_s.titleize %> |
<% end %>
Actions |
<% @records.each do |record| %>
<% resource.attributes.each do |attribute| %>
<% next if attribute[:field].nil? %>
<% next unless attribute[:field].visible?(action_name) %>
<% field = attribute[:field] %>
<%= render partial: field.to_partial_path("index"), locals: { field: field, record: record } %> |
<% end %>
<%= link_to "View", resource.show_path(record) %> |
<% end %>
<%== pagy_nav(@pagy) if @pagy.pages > 1 %>