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

<%%= link_to ' '.html_safe + t(:new, :default => "New") + ' ' + <%= i18n_t_m(model) %>, new_<%= namespace_for_route %><%= singular_table_name %>_path, :class => "btn btn-default" %> <%% if <%= model_with_engine_camelize %>.columns.map(&:name).include?("<%= model %>_id") then %> <%%= link_to ' '.html_safe + t(:treeview, :default => "Treeview") + ' ' + <%= i18n_t_m(model) %>, treeview_<%= namespace_for_route %><%= model_pluralize %>_path, :class => "btn btn-default" %> <%% end %>

<%%= render :partial => "layouts/mass_inserting", :locals => { :engine => '<%= engine_opt %>', :namespace => '<%= namespace_alone %>', :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 btn-default #{((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 btn-default #{((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 => { :engine_name => '<%= engine_opt %>', :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="bs-col-created_at"> <%%= sorting_header("<%= singular_table_name %>", "created_at", "<%= namespace_alone %>") %> ", "updated_at") %> class="bs-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="bs-col-created_at <%%= align_attribute("datetime") %>"> <%%= l(<%= singular_table_name %>.created_at, :format => :long) %> ", "updated_at") %> class="bs-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 %>), :title => t(:show, :default => "Show") %> <%%= link_to ''.html_safe, edit_<%= namespace_for_route %><%= singular_table_name %>_path(<%= singular_table_name %>), :title => t(:edit, :default => "Edit") %> <%%= link_to ''.html_safe, <%= namespace_for_route %><%= singular_table_name %>_path(<%= singular_table_name %>), :data => { :confirm => t(:are_you_sure, :default => "Are you sure?") }, :method => :delete, :title => t(:destroy, :default => "Destroy") %>
<%% clean_params %> <%%= 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 => "btn btn-default" %> <%%= link_to ' XML'.html_safe, <%= namespace_for_route %><%= plural_table_name %>_path(:format => :xml), :class => "btn btn-default" %> <%%= link_to ' JSON'.html_safe, <%= namespace_for_route %><%= plural_table_name %>_path(:format => :json), :class => "btn btn-default" %> <%%= link_to ' PDF'.html_safe, <%= namespace_for_route %><%= plural_table_name %>_path(:format => :pdf), :class => "btn btn-default" %>
<%% end %>
<%%= search_form_for @q, :url => <%= namespace_for_route + 'search_' + model_pluralize + '_path' %>, :html => { :class => "well well-small search-and-filter" }, :method => :post do |f| %>

<%%= t("search_and_filter", :default => "Search & filter") %>

<%= render_partial 'app/views/partials/_index_search.html.erb' %>
<%= render_partial 'app/views/partials/_index_search_default_fields.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 btn-default" %> <%% end %>