<%%= render "page_header" do %> <%%= render "page_header_breadcrumb", title: "<%= human_name.pluralize %>" do %> <%% end %> <%%= render "page_header_actions" do %> <%%= link_to "Filters", "#offcanvasFilters", "data-bs-toggle": "offcanvas", class: "btn btn-light" %> <%%= link_to "New <%= human_name.downcase %>", <%= new_helper(type: :path) %>, class: "btn btn-primary" %> <%% end %> <%% end %>
<% attributes.each do |attribute| -%> <% end -%> <%% @<%= plural_table_name %>.each do |<%= singular_table_name %>| %> <% attributes.reject(&:password_digest?).each do |attribute| -%> <% if attribute.attachment? -%> <% elsif attribute.attachments? -%> <%% <%= singular_name %>.<%= attribute.column_name %>.each do |<%= attribute.singular_name %>| %> <%% end %> <% else -%> <% end -%> <% end -%> <%% end %>
<%%= sort_link @search, :<%= attribute.column_name %> %>
<%%= link_to <%= singular_name %>.<%= attribute.column_name %>.filename, <%= singular_name %>.<%= attribute.column_name %> if <%= singular_name %>.<%= attribute.column_name %>.attached? %><%%= link_to <%= attribute.singular_name %>.filename, <%= attribute.singular_name %> %><%%= <%= singular_name %>.<%= attribute.column_name %> %> <%%= link_to "View", <%= model_resource_name %>, class: "btn btn-light btn-sm" %> <%%= link_to "Edit", <%= edit_helper(singular_table_name, type: :path) %>, class: "btn btn-light btn-sm" %> <%%= button_to "Delete", <%= model_resource_name %>, method: :delete, form_class: "d-inline", class: "btn btn-light btn-sm", data: { confirm: "Are you sure ?" } %>

Filters

<%%= search_form_for [:admin, @search], class: "offcanvas-body" do |f| %> <%%# f.label :name_cont, class: "form-label" %> <%%# f.text_field :name_cont, class: "form-control mb-3" %> <%%= f.submit "Filter", class: "btn btn-primary" %> <%%= link_to "Clear Filter", <%= index_helper(type: :path) %>, class: "btn btn-light" %> <%% end %>