Sha256: 258750102d49b7b9512b3e9ca3d6e070b37349cca0474bdedfc53db2228bb70b

Contents?: true

Size: 1.73 KB

Versions: 22

Compression:

Stored size: 1.73 KB

Contents

<% content_for :page_title do %>
  <%= Spree.t(:promotions) %>
<% end %>

<% content_for :page_actions do %>
  <li>
    <%= button_link_to Spree.t(:new_promotion), spree.new_admin_promotion_path, :icon => 'icon-plus' %>
  </li>
<% end %>

<% if @promotions.any? %>
  <table class="index">
    <colgroup>
      <col style="width: 20%">
      <col style="width: 10%">
      <col style="width: 35%">
      <col style="width: 10%">
      <col style="width: 15%">
      <col style="width: 10%">
    </colgroup>
    <thead>
      <tr>
        <th><%= Spree.t(:name) %></th>
        <th><%= Spree.t(:code) %></th>
        <th><%= Spree.t(:description) %></th>
        <th><%= Spree.t(:usage_limit) %></th>
        <th><%= Spree.t(:expiration) %></th>
        <th class="actions"></th>
      </tr>
    </thead>
    <tbody>
      <% @promotions.each do |promotion| %>
        <tr id="<%= spree_dom_id promotion %>" class="<%= cycle('odd', 'even')%>">
          <td><%= promotion.name %></td>
          <td class="align-center"><%= promotion.code %></td>
          <td><%= promotion.description %></td>
          <td class="align-center"><%= promotion.usage_limit %></td>
          <td class="align-center"><%= promotion.expires_at.to_date.to_s(:short_date) if promotion.expires_at %></td>
          <td class="actions">
            <%= link_to_edit promotion, :no_text => true %>
            <%= link_to_delete promotion, :no_text => true %>
          </td>
        </tr>
      <% end %>
    </tbody>
  </table>
<% else %>
  <div class="alpha twelve columns no-objects-found">
    <%= Spree.t(:no_resource_found, resource: I18n.t(:other, scope: 'activerecord.models.spree/promotion')) %>,
    <%= link_to Spree.t(:add_one), spree.new_admin_promotion_path %>!
  </div>
<% end %>

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
spree_backend-2.1.12 app/views/spree/admin/promotions/index.html.erb
spree_backend-2.1.11 app/views/spree/admin/promotions/index.html.erb
spree_backend-2.1.10 app/views/spree/admin/promotions/index.html.erb
spree_backend-2.0.13 app/views/spree/admin/promotions/index.html.erb
spree_backend-2.1.9 app/views/spree/admin/promotions/index.html.erb
spree_backend-2.1.8 app/views/spree/admin/promotions/index.html.erb
spree_backend-2.0.12 app/views/spree/admin/promotions/index.html.erb
spree_backend-2.1.7 app/views/spree/admin/promotions/index.html.erb
spree_backend-2.0.11 app/views/spree/admin/promotions/index.html.erb
spree_backend-2.0.10 app/views/spree/admin/promotions/index.html.erb
spree_backend-2.1.6 app/views/spree/admin/promotions/index.html.erb
spree_backend-2.1.5 app/views/spree/admin/promotions/index.html.erb
spree_backend-2.0.9 app/views/spree/admin/promotions/index.html.erb
spree_backend-2.1.4 app/views/spree/admin/promotions/index.html.erb
spree_backend-2.0.8 app/views/spree/admin/promotions/index.html.erb
spree_backend-2.1.3 app/views/spree/admin/promotions/index.html.erb
spree_backend-2.0.7 app/views/spree/admin/promotions/index.html.erb
spree_backend-2.1.2 app/views/spree/admin/promotions/index.html.erb
spree_backend-2.0.6 app/views/spree/admin/promotions/index.html.erb
spree_backend-2.1.1 app/views/spree/admin/promotions/index.html.erb