<% if content_for? :title -%> <% else -%> <% end -%> <% if partial?('collection') %> <%= render :partial => "collection", :locals => { :collection => current_collection, :"#{controller_name}" => current_collection } %> <% else %>
<% if subject.can_create?(collection_name) && controller.action_methods.include?("new") %> <%= button t('fullstack.admin.new', :default => "New"), send("new_admin_#{resource_name}_path"), :type => :primary, :icon => :plus, :icon_color => :white %> <% end %> <%= button t('fullstack.admin.delete', :default => "Delete"), 'javascript:void(0)', :class => "toggle-delete", :icon => :trash %>
<%= render :partial => 'index', :locals => {:thead => true, :tbody => false, :content => nil} %> <% current_collection.each do |item| -%> <%= render :partial => 'index', :locals => {:thead => false, :tbody => true, :content => item} %> <% end -%> <%= paginate current_collection, :window => 4, :outer_window => 3 %>
<% end %> <% content_for :aside do -%> <% if (!@skip_filter) && (partial?('filter') || title_column(current_resource_class) || has_timestamps?(current_resource_class)) %>

<%= t('fullstack.admin.filter', :default => "Filter") %>

<%= admin_form_for @search, :url => self.send("admin_#{collection_name}_path") , :html => {:method => :get} do |f| %> <% if partial?('filter') %> <%= render :partial => "filter", :locals => {:f => f} %> <% else %> <%= f.inputs do %> <% if tc = title_column(current_resource_class) %> <%= f.input :"#{tc}_contains" %> <% end %> <% if has_timestamps?(current_resource_class) %> <%= f.input :created_at, :as => :daterange %> <% end %> <% end %> <% end %> <%= f.buttons do %> <%= f.commit_button t('fullstack.admin.filter', :default => "Filter") %> <% end %> <% end %>
<% end %> <% end -%>