<% content_for :title do %>Lista de <%= @model.title_plural %><% end %> <%= render model_template(@application, @model, 'filters'), { :url => model_link(@application, @model) } %>

<%= @model.title_plural %>

<%= link_to(collection_model_link(@application, @model, :destroy_all), :class => "btn btn-danger btn-remove-all-selected") do %> Excluir Selecionados <% end if @model.my_admin.can?(:destroy, my_admin_user) %> <%= link_to(new_model_link(@application, @model), :class => "btn btn-success") do %> Adicionar <%#= I18n.t('my_admin.titles.models.new', :model => @model.title) %> <% end if @model.my_admin.can?(:create, my_admin_user) %> <%= link_to(collection_model_link(@application, @model, :export, params.clone), :class => "btn btn-inverse") do %> <%= I18n.t('my_admin.titles.models.export', :model => @model.title) %> <% end if @model.my_admin.can?(:export, my_admin_user) %>
<%= select_tag :per_page, options_for_select([10,20,50,100].map { |i| ["#{i} por página", model_link(@application, @model, params.clone.update({:per_page => i}))]}, model_link(@application, @model, params.clone.update({:per_page => params[:per_page]}))), :class => 'chosen-select', "data-nosearch" => true %>
<% if @model.my_admin.can?(:destroy, my_admin_user) %> <% end %> <% @model.my_admin.list_display.each do |field| %> <% order = (params[:order_by] == field.to_s && params[:order] == "asc") ? "desc" : "asc" %> <% if field_can_order(@application, @model, field) %> <% else %> <% end %> <% end %> <%= render model_template(@application, @model, 'actions_header') %> <% unless @objects.blank? %> <% @objects.each do |object| %> <% if @model.my_admin.can?(:destroy, my_admin_user) %> <% end %> <% @model.my_admin.list_display.each_with_index do |field, index| %> <% end %> <%= render model_template(@application, @model, 'actions'), object: object %> <% end %> <% end %>
"> <%= link_to( field_title(@model, field), model_link(@application, @model, params.clone.update({:order => order, :order_by => field}))) %> <%= field_title(@model, field) %>
<%= check_box_tag :remove, object.id %> <%= field_content(@application, @model, field, object) %>
<%= render model_template(@application, @model, 'paginate') %>