% admin_breadcrumb(plural_resource_name(Spree::Promotion)) %> <% content_for :page_actions do %> <% if can? :create, Spree::Promotion %>
<%= Spree::Promotion.human_attribute_name(:name) %> | <%= Spree::Promotion.human_attribute_name(:code) %> | <%= Spree::Promotion.human_attribute_name(:status) %> | <%= Spree::Promotion.human_attribute_name(:usage_limit) %> | <%= Spree::Promotion.human_attribute_name(:uses) %> | <%= Spree::Promotion.human_attribute_name(:starts_at) %> | <%= Spree::Promotion.human_attribute_name(:expires_at) %> | |
---|---|---|---|---|---|---|---|
<%= promotion.name %> | <%= (promotion.codes.size == 1) ? promotion.codes.pluck(:value).first : t('spree.number_of_codes', count: promotion.codes.size) %> | <%= t(admin_promotion_status(promotion), scope: 'spree.admin.promotion_status') %> | <%= promotion.usage_limit.nil? ? "∞" : promotion.usage_limit %> | <%= promotion.usage_count %> | <%= promotion.starts_at.to_fs(:long) if promotion.starts_at %> | <%= promotion.expires_at.to_fs(:long) if promotion.expires_at %> | <% if can?(:edit, promotion) %> <%= link_to_edit promotion, no_text: true %> <% end %> <% if can?(:destroy, promotion) %> <%= link_to_delete promotion, no_text: true %> <% end %> |