% admin_breadcrumb link_to plural_resource_name(Spree::Promotion), spree.admin_promotions_path %>
<% admin_breadcrumb link_to(@promotion.name, spree.edit_admin_promotion_path(@promotion)) %>
<% admin_breadcrumb plural_resource_name(Spree::PromotionCode) %>
<% content_for :page_actions do %>
<% if can?(:create, Spree::PromotionCode) && !@promotion.apply_automatically? %>
<%= link_to t('spree.create_promotion_code'), new_admin_promotion_promotion_code_path(promotion_id: @promotion.id), class: 'btn btn-primary' %>
<% end %>
<%= link_to t('spree.download_promotion_codes_list'), admin_promotion_promotion_codes_path(promotion_id: @promotion.id, format: :csv), class: 'btn btn-primary' %>
<% end %>
<%= Spree::PromotionCode.human_attribute_name :value %> |
<% @promotion_codes.each do |promotion_code| %>
<%= promotion_code.value %> |
<% end %>
<%= paginate @promotion_codes, theme: "solidus_admin" %>