<%= render 'slash_admin/shared/better_paginate' %> <%= render 'slash_admin/shared/batch_actions' %>
<%= form_for :filters, url: '', method: 'GET', html: {id: 'filters'} do |form| %>
<% list_params.each do |attr| %> <% if attr.is_a?(Hash) %> <% if no_title.include? attr.keys.first %> <% else %> <% end %> <% else %> <% if no_title.include? attr %> <% else %> <% end %> <% end %> <% end %> <%= render 'filters', model: @model_class %> <% @models.each do |m| %> <% list_params.each do |attr| %> <% if attr.is_a?(Hash) %> <% if attr[attr.keys.first][:type].to_s == 'image' %> <% else %> <% end %> <% else %> <% if m.send(attr).is_a?(TrueClass) || m.send(attr).is_a?(FalseClass) %> <% elsif @belongs_to_fields.include?(attr) || @has_one_fields.include?(attr) %> <% elsif @has_many_fields.include?(attr) %> <% else %> <% end %> <% end %> <% end %> <% end %>
class="ordered <%= params[:order].downcase %>" data-order="<%= params[:order] %>" <% else %> class="ordered" <% end %> ># <%= @model_class.human_attribute_name(attr.keys.first) %> <% if tooltips.key? attr.keys.first %> <% end %> data-order-field="<%= attr %>" <% if params[:order_field].to_s == attr.to_s %> class="ordered <%= params[:order].downcase %>" data-order="<%= params[:order] %>" <% else %> class="ordered" <% end %> <% end %>> <%= @model_class.human_attribute_name(attr) %> <% if tooltips.key? attr %> <% end %> <%= t('slash_admin.view.actions') %>
<%= m.id %> <% if m.send(attr.keys.first).present? %> <% else %> <%= t('slash_admin.view.no_image') %> <% end %> <%= render attr[attr.keys.first][:type].to_s, model: m, attr: attr.keys.first %> <%= m.send(attr) ? 'Oui' : 'Non' %> <%= link_to(edit_polymorphic_url([:slash_admin, m.send(attr)]), class: 'link', target: '_blank') do %> <%= show_object(m.send(attr)) %> <% end rescue show_object(m.send(attr)) %> <%= m.send(attr) %>
<% if can? :show, @model_class %> <%= link_to(polymorphic_url([:slash_admin, m]), class: 'btn btn-info btn-sm') do %> <% end rescue nil %> <% end %> <% if can? :edit, @model_class %> <%= link_to(edit_polymorphic_url([:slash_admin, m]), class: 'btn btn-warning btn-sm') do %> <% end rescue nil %> <% end %> <% if can? :destroy, @model_class %> <%= link_to(polymorphic_url([:slash_admin, m]), class: 'single-delete btn btn-danger btn-sm') do %> <% end rescue nil %> <% end %>
<% end %> <%= render 'slash_admin/shared/better_paginate' %>