<% exceptions ||= ['created_at', 'updated_at', 'deleted_at'] %> <% search_fields ||= [] %> <% sort_fields ||= [] %> <% sort_all ||= false %> <% nested_resource ||= false %> <% excluded_columns ||= [] %> <% additional_columns ||= [] %> <% box_class ||= 'primary' %>

<%=t Kernel.const_get(controller_name.singularize.camelize).model_name.human.pluralize %>

<% unless search_fields.empty? %>
<%= search_form_for @q, url: eval(nested_resource ? "#{parent_resource}_#{controller_name}_path" : "#{controller_name}_path") do |f| %> <% search_fields.each do |sf| %> <%= f.input sf[:field], label: sf[:label], required: false, as: sf[:as], collection: sf[:collection], wrapper_html: { class: 'col-md-3' } %> <% end %>
<%= f.submit "Pesquisar", class: "btn btn-#{box_class}" %>
<% end %>
<% end %> <% if list.empty? %>
Nenhum registro encontrado
<% else %> <%= render 'shared/list', list: list, exceptions: exceptions, excluded_columns: excluded_columns, additional_columns: additional_columns, sort_fields: sort_fields, sort_all: sort_all %> <% if defined? list.total_pages %>
<%= page_entries_info list, entry_name: 'resultado(s)' %>
<%= paginate list, window: 1 %>
<% end %> <% end %>
<% unless controller_name == 'users' %> <% end %>