<% admin_breadcrumb(plural_resource_name(SolidusPromotions::Promotion)) %>

<% content_for :page_actions do %>
  <% if can? :create, SolidusPromotions::Promotion %>
    <li>
      <%= link_to t('solidus_promotions.new_promotion'), solidus_promotions.new_admin_promotion_path, class: 'btn btn-primary' %>
    </li>
  <% end %>
<% end %>

<%= render "table_filter", search: @search %>

<%= paginate @promotions, theme: "solidus_admin" %>

<% if @promotions.length > 0 %>
  <%= render "table", promotions: @promotions %>
<% else %>
  <div class="no-objects-found">
    <%= render 'spree/admin/shared/no_objects_found',
                 resource: SolidusPromotions::Promotion,
                 new_resource_url: new_object_url %>
  </div>
<% end %>
