<% content_for :page_title do %> <%= Spree.t(:listing_banner_boxes) %> <% end %> <% content_for :page_actions do %> <%= button_link_to Spree.t(:new_banner_box), new_admin_banner_box_path, { :icon => 'add', :class => 'btn-success' } %> <% end if can? :create, Spree::BannerBox %>
<%= Spree.t(:search) %> <%= search_form_for @q, :url => admin_banner_boxes_path do |f| %>
<%= f.label :category_eq, Spree.t(:category) %> <%= f.select :category_eq, Spree::BannerBox.categories_for_select, {:include_blank => true}, {:class => 'select2'} %>
<%= f.label :url_cont, Spree.t(:url) %> <%= f.text_field :url_cont, size: 15, class: 'form-control' %>
<%= f.check_box :enabled_true %> <%= f.label :enabled_true, Spree.t(:show_only_enabled) %>
<%= button Spree.t(:filter_results), 'search' %>
<% end %>
<% if @collection.any? %> <% @collection.each do |banner_box|%> <% end %>
<%= Spree.t(:thumbnail) %> <%= Spree.t(:category) %> <%= Spree.t(:url) %>
<% else %>
<%= Spree.t(:no_results) %>
<% end %> <%= paginate @collection %>