<%%= t(:listing, :default => "Listing") %> <%= plural_table_name %>

<%%= link_to ''.html_safe + t(:new, :default => "New") + ' <%= model %>', new_<%= namespace_for_route %><%= singular_table_name %>_path, :class => "btn" %>

<%%= render :partial => "layouts/mass_inserting", :locals => { :namespace => 'admin', :model_name => '<%= model %>', :model_columns => [<%= attributes.map{ |e| "'#{e.name}'" }.join(',') %>] } %> <%%# Set your scopes below (string in array) %> <%% scopes = [] %> <%% if not scopes.blank? then %>
<%%= link_to "All (#{@<%= model %>_scope_for_scope.count})", <%= namespace_for_route %><%= plural_table_name %>_path(:scope => ""), :class => "btn #{((session[:scope][:<%= model %>].to_s == '') ? 'active' : '')}" %> <%% for scope in scopes %> <%%= link_to "#{scope} (#{@<%= model %>_scope_for_scope.send(scope).count})", <%= namespace_for_route %><%= plural_table_name %>_path(:scope => scope), :class => "btn #{((session[:scope][:<%= model %>].to_s == scope) ? 'active' : '')}" %> <%% end %>
<%% end %>
<%%= form_tag batch_<%= namespace_for_route %><%= plural_table_name %>_path, :class => "form-inline" do %>
<%%= render :partial => "layouts/modal_columns", :locals => { :model_name => "<%= singular_table_name %>", :model_columns => [<%= (attributes.map{ |e| "'#{e.name}'" }.to_a + ["'created_at'", "'updated_at'"]).join(',') %>] } %> <%= render_partial 'app/views/partials/_index_header.html.erb' %> <%% @<%= plural_table_name %>.each do |<%= singular_table_name %>| %> "> <%= render_partial 'app/views/partials/_index_column.html.erb' %> <%% end %>
" > <%%= check_box_tag :checkall, '' %> ", "created_at") %> class="col-created_at"> <%%= sorting_header("<%= singular_table_name %>", "created_at", "<%= namespace_alone %>") %> ", "updated_at") %> class="col-updated_at"> <%%= sorting_header("<%= singular_table_name %>", "updated_at", "<%= namespace_alone %>") %>
<%%= <%= singular_table_name %>.id %> <%%= check_box_tag "ids[]",<%= singular_table_name %>.id, false, :class => 'cbbatch' %> ", "created_at") %> class="col-created_at <%%= align_attribute("datetime") %>"> <%%= l(<%= singular_table_name %>.created_at, :format => :long) %> ", "updated_at") %> class="col-updated_at <%%= align_attribute("datetime") %>"> <%%= l(<%= singular_table_name %>.updated_at, :format => :long) %> <%%= link_to ''.html_safe, <%= namespace_for_route %><%= singular_table_name %>_path(<%= singular_table_name %>) %> <%%= link_to ''.html_safe, edit_<%= namespace_for_route %><%= singular_table_name %>_path(<%= singular_table_name %>) %> <%%= link_to ''.html_safe, <%= namespace_for_route %><%= singular_table_name %>_path(<%= singular_table_name %>), :confirm => t(:are_you_sure, :default => "Are you sure?"), :method => :delete %>
<%%= will_paginate @<%= plural_table_name %>, :inner_window => 0, :outer_window => 0, :previous_label => t(:prev, :default => "Previous"), :next_label => t(:next, :default => "Next") %>
<%%= link_to ' CSV'.html_safe, <%= namespace_for_route %><%= plural_table_name %>_path(:format => :csv), :class => "nopjax btn" %> <%%= link_to ' XML'.html_safe, <%= namespace_for_route %><%= plural_table_name %>_path(:format => :xml), :class => "nopjax btn" %> <%%= link_to ' JSON'.html_safe, <%= namespace_for_route %><%= plural_table_name %>_path(:format => :json), :class => "nopjax btn" %> <%%= link_to ' PDF'.html_safe, <%= namespace_for_route %><%= plural_table_name %>_path(:format => :pdf), :class => "nopjax btn" %>
<%% end %>
<%%= search_form_for @q, :url => <%= namespace_for_route + 'search_' + model_pluralize + '_path' %>, :html => { :class => "well" }, :method => :post do |f| %> <%= render_partial 'app/views/partials/_index_search.html.erb' %> <%%= f.submit t(:filter, :default => "Filter"), :class => "btn btn-primary" %> <%%= link_to t(:cancel, :default => "Cancel"), <%= namespace_for_route %><%= model_pluralize %>_path(:nosearch => "ok"), :class => "btn" %> <%% end %>