Sha256: e96221762201fcd05b11f1151e9601eff5bcf5c3a49f6f4714591f30aca768d0

Contents?: true

Size: 910 Bytes

Versions: 6

Compression:

Stored size: 910 Bytes

Contents

<%= render 'header' %>

<h1 class="float-md-left">Coupons</h1>
<p><%= link_to 'New', tang.new_admin_coupon_path, class: 'btn btn-secondary float-md-right' %></p>

<table class="table">
  <thead>
    <tr>
      <th>Coupon</th>
      <th>Terms</th>
      <th>Redemptions</th>
      <th>Expires</th>
    </tr>
  </thead>

  <tbody>
    <% @coupons.each do |coupon| %>
      <tr>
        <td><%= link_to coupon.stripe_id, tang.admin_coupon_path(coupon) %></td>
        <td>
          <%= "#{coupon_off(coupon)} #{coupon.formatted_duration}" %>
        </td>
        <td>
          <% if coupon.max_redemptions.present? %>
            <!-- discounts -->/<%= coupon.max_redemptions %>
          <% end %>
        </td>
        <td><%= coupon.redeem_by.strftime('%Y/%m/%d %H:%m') if coupon.redeem_by.present? %></td>
      </tr>
    <% end %>
  </tbody>
</table>

<%= will_paginate @coupons %>

<%= render 'footer' %>

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
tang-0.2.2 app/views/tang/admin/coupons/index.html.erb
tang-0.2.1 app/views/tang/admin/coupons/index.html.erb
tang-0.2.0 app/views/tang/admin/coupons/index.html.erb
tang-0.1.0 app/views/tang/admin/coupons/index.html.erb
tang-0.0.9 app/views/tang/admin/coupons/index.html.erb
tang-0.0.8 app/views/tang/admin/coupons/index.html.erb