Sha256: fb224ee806bbd626c5e9e9dec8a6aafc787c01e391bbdf6ce6c861e8e0f08d3f

Contents?: true

Size: 1.4 KB

Versions: 4

Compression:

Stored size: 1.4 KB

Contents

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

<% content_for :page_actions do %>
  <%= button_link_to Spree.t(:new_promotion_category), new_object_url, icon: 'add.svg', class: 'btn-primary' %>
<% end if can?(:create, Spree::PromotionCategory) %>

<% if @promotion_categories.any? %>

<div class="table-responsive border rounded bg-white">
  <table class="table">
    <thead class="text-muted">
      <th><%= Spree::PromotionCategory.human_attribute_name :name %></th>
      <th><%= Spree::PromotionCategory.human_attribute_name :code %></th>
      <th></th>
    </thead>
    <tbody>
      <% @promotion_categories.each do |promotion_category| %>
        <tr>
          <td><%= promotion_category.name %></td>
          <td><%= promotion_category.code %></td>
          <td class="actions">
            <span class="d-flex justify-content-end">
              <%= link_to_edit promotion_category, no_text: true if can?(:edit, promotion_category) %>
              <%= link_to_delete promotion_category, no_text: true if can?(:delete, promotion_category) %>
            </span>
          </td>
        </tr>
      <% end %>
    </tbody>
  </table>
</div>
<% else %>
  <div class="text-center no-objects-found m-5">
    <%= Spree.t(:no_resource_found, resource: plural_resource_name(Spree::PromotionCategory)) %>,
    <%= link_to Spree.t(:add_one), new_object_url %>!
  </div>
<% end %>

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
spree_backend-4.8.4 app/views/spree/admin/promotion_categories/index.html.erb
spree_backend-4.8.3 app/views/spree/admin/promotion_categories/index.html.erb
spree_backend-4.8.2 app/views/spree/admin/promotion_categories/index.html.erb
spree_backend-4.8.1 app/views/spree/admin/promotion_categories/index.html.erb