Sha256: 7d74da4ebcb83f8e4ad58af79cc9388466a5265ef9ac8cd409a02981ea5715cb

Contents?: true

Size: 1.5 KB

Versions: 11

Compression:

Stored size: 1.5 KB

Contents

<% content_for :page_title do %>
  <%= plural_resource_name(Spree::StoreCreditCategory) %>
<% end %>

<% content_for :page_actions do %>
  <%= button_link_to Spree.t(:new_store_credit_category), new_object_url, class: "btn-success", icon: 'add.svg', id: 'admin_new_store_credit_category_link' %>
<% end if can? :create, Spree::StoreCreditCategory %>

<% if @store_credit_categories.any? %>
<div class="table-responsive">
  <table class="table">
    <thead>
      <tr data-hook="admin_store_credit_categories_index_headers">
        <th><%= Spree.t(:name) %></th>
        <th class="actions"></th>
      </tr>
    </thead>
    <tbody>
      <% @store_credit_categories.each do |store_credit_category| %>
        <tr id="<%= spree_dom_id store_credit_category %>" data-hook="admin_store_credit_categories_index_rows">
          <td><%= store_credit_category.name %></td>
          <td class="actions">
            <span class="d-flex justify-content-end">
              <%= link_to_edit(store_credit_category, no_text: true) if can? :edit, store_credit_category %>
              <%= link_to_delete(store_credit_category, no_text: true) if can? :destroy, store_credit_category %>
            </span>
          </td>
        </tr>
      <% end %>
    </tbody>
  </table>
</div>
<% else %>
  <div class="alert alert-warning">
    <%= Spree.t(:no_resource_found, resource: plural_resource_name(Spree::StoreCreditCategory)) %>,
    <%= link_to(Spree.t(:add_one), new_object_url) if can? :create, Spree::StoreCreditCategory %>!
  </div>
<% end %>

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
spree_backend-4.3.3 app/views/spree/admin/store_credit_categories/index.html.erb
spree_backend-4.3.2 app/views/spree/admin/store_credit_categories/index.html.erb
spree_backend-4.4.1 app/views/spree/admin/store_credit_categories/index.html.erb
spree_backend-4.4.0 app/views/spree/admin/store_credit_categories/index.html.erb
spree_backend-4.4.0.rc2 app/views/spree/admin/store_credit_categories/index.html.erb
spree_backend-4.3.1 app/views/spree/admin/store_credit_categories/index.html.erb
spree_backend-4.4.0.rc1 app/views/spree/admin/store_credit_categories/index.html.erb
spree_backend-4.3.0 app/views/spree/admin/store_credit_categories/index.html.erb
spree_backend-4.3.0.rc3 app/views/spree/admin/store_credit_categories/index.html.erb
spree_backend-4.3.0.rc2 app/views/spree/admin/store_credit_categories/index.html.erb
spree_backend-4.3.0.rc1 app/views/spree/admin/store_credit_categories/index.html.erb