% content_for :page_title do %> <%= Spree.t(:promotions) %> <% end %> <% content_for :page_actions do %> <% if can? :create, Spree::Promotion %>
<%= Spree.t(:name) %> | <%= Spree.t(:code) %> | <%= Spree.t(:description) %> | <%= Spree.t(:usage_limit) %> | <%= Spree.t(:promotion_uses) %> | <%= Spree.t(:expiration) %> | |
---|---|---|---|---|---|---|
<%= promotion.name %> | <%= (promotion.codes.size == 1) ? promotion.codes.first.try!(:value) : Spree.t(:number_of_codes, count: promotion.codes.size) %> | <%= promotion.description %> | <%= promotion.usage_limit.nil? ? "∞" : promotion.usage_limit %> | <%= Spree.t(:current_promotion_usage, :count => promotion.usage_count) %> | <%= promotion.expires_at.to_date.to_s(:short_date) 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 %> |