Sha256: 0e4fdee5b13e7e9f353c29a591eedd43bad9f8fd0e7429d9c9e14dd0c63cff06

Contents?: true

Size: 1.54 KB

Versions: 8

Compression:

Stored size: 1.54 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 border rounded bg-white">
  <table class="table">
    <thead class="text-muted">
      <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

8 entries across 8 versions & 1 rubygems

Version Path
spree_backend-4.7.2 app/views/spree/admin/store_credit_categories/index.html.erb
spree_backend-4.6.2 app/views/spree/admin/store_credit_categories/index.html.erb
spree_backend-4.7.1 app/views/spree/admin/store_credit_categories/index.html.erb
spree_backend-4.7.0 app/views/spree/admin/store_credit_categories/index.html.erb
spree_backend-4.6.1 app/views/spree/admin/store_credit_categories/index.html.erb
spree_backend-4.6.0 app/views/spree/admin/store_credit_categories/index.html.erb
spree_backend-4.5.1 app/views/spree/admin/store_credit_categories/index.html.erb
spree_backend-4.5.0 app/views/spree/admin/store_credit_categories/index.html.erb