Sha256: 8f1b9fbad755445c91743aca497cfdc7820d951c0050e725355d9598cda31bd3

Contents?: true

Size: 1.89 KB

Versions: 31

Compression:

Stored size: 1.89 KB

Contents

<%= render partial: 'spree/admin/users/sidebar', locals: { current: :store_credits } %>

<% content_for :page_title do %>
  <%= link_to @user.email, spree.edit_admin_user_url(@user) %> /
  <%= Spree.t(:"admin.user.store_credits") %>
<% end %>

<% content_for :page_actions do %>
  <%= button_link_to Spree.t(:add_store_credit), spree.new_admin_user_store_credit_path(@user), class: "btn-success", icon: 'add' %>
<% end %>

<% if @store_credits.any? %>
  <table class="table">
    <thead>
      <th><%= Spree.t(:credited) %></th>
      <th><%= Spree.t(:used) %></th>
      <th><%= Spree.t(:category) %></th>
      <th><%= Spree.t(:created_by) %></th>
      <th><%= Spree.t(:issued_on) %></th>
      <th data-hook="admin_store_credits_index_header_actions" class="actions"></th>
    <thead>
    <tbody>
      <% @store_credits.each do |store_credit| %>
        <tr>
          <td><%= store_credit.display_amount.to_html %></td>
          <td><%= store_credit.display_amount_used.to_html %></td>
          <td><%= store_credit.category_name %></td>
          <td><%= store_credit.created_by_email %></td>
          <td><%= l store_credit.created_at.to_date %></td>
          <td class="actions actions-2 text-center" data-hook="admin_store_credits_index_row_actions">
            <% if store_credit.amount_used.zero? %>
              <%= link_to_edit_url spree.edit_admin_user_store_credit_path(@user, store_credit), no_text: true if can?(:edit, store_credit) %>
              <%= link_to_delete store_credit, no_text: true, url: spree.admin_user_store_credit_path(@user, store_credit) if can?(:destroy, store_credit) %>
            <% end %>
          </td>
        </tr>
      <% end %>
    </tbody>
  </table>
<% else %>
  <div class="alert alert-info no-objects-found">
    <%= Spree.t(:no_resource_found, resource: plural_resource_name(Spree::StoreCredit)) %>
  </div>
<% end %>

<%= render 'spree/admin/users/lifetime_stats' %>

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
spree_backend-3.2.9 app/views/spree/admin/store_credits/index.html.erb
spree_backend-3.1.14 app/views/spree/admin/store_credits/index.html.erb
spree_backend-3.2.8 app/views/spree/admin/store_credits/index.html.erb
spree_backend-3.1.13 app/views/spree/admin/store_credits/index.html.erb
spree_backend-3.2.7 app/views/spree/admin/store_credits/index.html.erb
spree_backend-3.1.12 app/views/spree/admin/store_credits/index.html.erb
spree_backend-3.2.6 app/views/spree/admin/store_credits/index.html.erb
spree_backend-3.1.11 app/views/spree/admin/store_credits/index.html.erb
spree_backend-3.1.10 app/views/spree/admin/store_credits/index.html.erb
spree_backend-3.2.5 app/views/spree/admin/store_credits/index.html.erb
spree_backend-3.1.9 app/views/spree/admin/store_credits/index.html.erb
spree_backend-3.2.4 app/views/spree/admin/store_credits/index.html.erb
spree_backend-3.1.8 app/views/spree/admin/store_credits/index.html.erb
spree_backend-3.1.7 app/views/spree/admin/store_credits/index.html.erb
spree_backend-3.2.3 app/views/spree/admin/store_credits/index.html.erb
spree_backend-3.2.2 app/views/spree/admin/store_credits/index.html.erb
spree_backend-3.1.6 app/views/spree/admin/store_credits/index.html.erb
spree_backend-3.1.5 app/views/spree/admin/store_credits/index.html.erb
spree_backend-3.2.1 app/views/spree/admin/store_credits/index.html.erb
spree_backend-3.2.0 app/views/spree/admin/store_credits/index.html.erb