% content_for :page_title do %> <%= plural_resource_name(Spree::Promotion) %> <% end %> <% content_for :page_actions do %> <%= button_link_to Spree.t(:new_promotion), new_object_url, class: "btn-success", icon: 'add' %> <% end if can?(:create, Spree::Promotion) %> <% content_for :table_filter do %>
<%= Spree.t(:name) %> | <%= Spree.t(:code) %> | <%= Spree.t(:description) %> | <%= Spree.t(:usage_limit) %> | <%= Spree.t(:promotion_uses) %> | <%= Spree.t(:expiration) %> | |
---|---|---|---|---|---|---|
<%= link_to promotion.name, edit_admin_promotion_path(promotion) %> | <%= promotion.code %> | <%= promotion.description %> | <%= promotion.usage_limit.nil? ? "∞" : promotion.usage_limit %> | <%= Spree.t(:current_promotion_usage, count: promotion.credits_count) %> | <%= promotion.expires_at.to_date.to_s(:short_date) if promotion.expires_at %> | <%= link_to_edit promotion, no_text: true if can?(:edit, promotion) %> <%= link_to_clone_promotion promotion, no_text: true if can?(:clone, promotion) %> <%= link_to_delete promotion, no_text: true if can?(:delete, promotion) %> |