Sha256: 24e37ed744401d1baade63b5f39130c3f289c658cc19c1c23e3ce11aa6c4762f

Contents?: true

Size: 1.58 KB

Versions: 36

Compression:

Stored size: 1.58 KB

Contents

<% admin_breadcrumb(link_to plural_resource_name(Spree::Promotion), spree.admin_promotions_path) %>
<% admin_breadcrumb(plural_resource_name(Spree::PromotionCategory)) %>

<% content_for :page_actions do %>
  <% if can?(:create, Spree::PromotionCategory) %>
    <li>
      <%= link_to t('spree.new_promotion_category'), spree.new_admin_promotion_category_path, class: 'btn btn-primary' %>
    </li>
  <% end %>
<% end %>

<% if @promotion_categories.any? %>
  <table class="index">
    <colgroup>
      <col style="width: 40%">
      <col style="width: 40%">
      <col style="width: 20%">
    </colgroup>
    <thead>
      <th><%= Spree::PromotionCategory.human_attribute_name :name %></th>
      <th><%= Spree::PromotionCategory.human_attribute_name :code %></th>
      <th class='actions'></th>
    </thead>
    <tbody>
      <% @promotion_categories.each do |promotion_category| %>
        <tr>
          <td><%= promotion_category.name %></td>
          <td><%= promotion_category.code %></td>
          <td class="actions">
            <% if can?(:update, promotion_category) %>
              <%= link_to_edit promotion_category, no_text: true %>
            <% end %>
            <% if can?(:destroy, promotion_category) %>
              <%= link_to_delete promotion_category, no_text: true %>
            <% end %>
          </td>
        </tr>
      <% end %>
    </tbody>
  </table>
<% else %>
    <div class="no-objects-found">
    <%= render 'spree/admin/shared/no_objects_found',
                 resource: Spree::PromotionCategory,
                 new_resource_url: new_object_url %>
  </div>
<% end %>

Version data entries

36 entries across 36 versions & 2 rubygems

Version Path
solidus_legacy_promotions-4.5.1 lib/views/backend/spree/admin/promotion_categories/index.html.erb
solidus_legacy_promotions-4.5.0 lib/views/backend/spree/admin/promotion_categories/index.html.erb
solidus_backend-4.3.6 app/views/spree/admin/promotion_categories/index.html.erb
solidus_backend-4.2.5 app/views/spree/admin/promotion_categories/index.html.erb
solidus_backend-4.1.6 app/views/spree/admin/promotion_categories/index.html.erb
solidus_legacy_promotions-4.4.2 lib/views/backend/spree/admin/promotion_categories/index.html.erb
solidus_legacy_promotions-4.4.1 lib/views/backend/spree/admin/promotion_categories/index.html.erb
solidus_legacy_promotions-4.4.0 lib/views/backend/spree/admin/promotion_categories/index.html.erb
solidus_backend-4.3.4 app/views/spree/admin/promotion_categories/index.html.erb
solidus_backend-4.2.4 app/views/spree/admin/promotion_categories/index.html.erb
solidus_backend-4.1.5 app/views/spree/admin/promotion_categories/index.html.erb
solidus_backend-4.3.3 app/views/spree/admin/promotion_categories/index.html.erb
solidus_backend-4.3.2 app/views/spree/admin/promotion_categories/index.html.erb
solidus_backend-4.1.4 app/views/spree/admin/promotion_categories/index.html.erb
solidus_backend-4.3.1 app/views/spree/admin/promotion_categories/index.html.erb
solidus_backend-4.3.0 app/views/spree/admin/promotion_categories/index.html.erb
solidus_backend-4.2.3 app/views/spree/admin/promotion_categories/index.html.erb
solidus_backend-4.1.3 app/views/spree/admin/promotion_categories/index.html.erb
solidus_backend-4.0.4 app/views/spree/admin/promotion_categories/index.html.erb
solidus_backend-3.4.6 app/views/spree/admin/promotion_categories/index.html.erb