<% content_for :page_title do %> <%= link_to "#{Spree.t(:editing_user)} #{@user.email}", edit_admin_user_url(@user) %> <% end %> <%= render :partial => 'spree/admin/users/sidebar', :locals => { :current => :store_credits } %> <% content_for :page_actions do %>
  • <%= link_to_with_icon 'arrow-left', Spree.t("admin.store_credits.back_to_store_credit_list"), admin_user_store_credits_path(@user), class: 'button' %>
  • <% if @store_credit.editable? && can?(:edit, @store_credit) %>
  • <%= link_to_with_icon 'dollar', Spree.t("admin.store_credits.change_amount"), edit_amount_admin_user_store_credit_path(@user, @store_credit), class: 'button' %>
  • <% end %> <% if @store_credit.invalidateable? && can?(:invalidate, @store_credit) %>
  • <%= link_to_with_icon 'ban', Spree.t("invalidate"), edit_validity_admin_user_store_credit_path(@user, @store_credit), class: 'button' %>
  • <% end %> <% end %>
    <%= Spree::StoreCredit.human_attribute_name(:amount) %>: <%= @store_credit.display_amount.to_html %>
    <%= Spree::StoreCredit.human_attribute_name(:created_by_id) %>: <%= @store_credit.created_by_email %>
    <%= Spree.t("admin.store_credits.credit_type") %>: <%= @store_credit.category_name %>
    <%= Spree::StoreCredit.human_attribute_name(:memo) %>: <%= @store_credit.memo %> <% if can?(:update, @store_credit) %> <%= link_to '', '#', class: 'js-edit-memo edit-method fa fa-edit no-text with-tip', data: { action: 'edit' }, title: Spree.t('actions.edit') %> <% end %>
    <%= Spree.t("admin.store_credits.history") %> <% @store_credit_events.each do |event| %> <% end %>
    <%= Spree.t(:date) %> <%= Spree::StoreCreditEvent.human_attribute_name(:action) %> <%= Spree::StoreCredit.human_attribute_name(:amount) %> <%= Spree::StoreCredit.human_attribute_name(:created_by_id) %> <%= Spree::StoreCreditEvent.human_attribute_name(:user_total_amount) %> <%= Spree::StoreCreditUpdateReason.human_attribute_name(:name) %>
    <%= pretty_time(event.created_at) %> <%= store_credit_event_admin_action_name(event) %> <%= event.display_amount %> <%= store_credit_event_originator_link(event) %> <%= event.display_user_total_amount %> <%= event.update_reason.try!(:name) %>