re-work coupons to allow multiple coupon types
[bse.git] / site / templates / admin / coupons / list.tmpl
index 54a0adf..4292036 100644 (file)
@@ -71,6 +71,9 @@
        <:% classes.push("released") -:>
     <:.end if -:>
     <:.set tier_names = [] -:>
+    <:.if coupon.untiered -:>
+      <:% tier_names.push("(untiered)") -:>
+    <:.end if :>
     <:.for tier in [ coupon.tier_objects ] -:>
       <:% tier_names.push(tier.description) -:>
     <:.end for -:>
     <td class="col_description"><:= coupon.description :></td>
     <td class="col_release"><:= bse.date("%d/%m/%Y", coupon.release) :></td>
     <td class="col_expiry"><:= bse.date("%d/%m/%Y", coupon.expiry) :></td>
-    <td class="col_discount"><:= coupon.discount_percent :>%</td>
+    <td class="col_discount"><:= coupon.describe :></td>
     <td class="col_tiers"><:= tier_names.size ? tier_names.join(", ") : "(none)" :></td>
     <td class="col_campaign"><:= coupon.campaign :></td>
     <td class="col_actions">
       <:.if request.user_can("bse_shop_coupon_edit") -:>
         <a href="<:= cfg.admin_url2("shopadmin", "coupon_edit", { "id": coupon.id }) :>">Edit</a>
       <:.end if -:>
-      <:.if request.user_can("bse_shop_coupon_delete") -:>
+      <:.if request.user_can("bse_shop_coupon_delete") and coupon.is_removable -:>
         <a href="<:= cfg.admin_url2("shopadmin", "coupon_deleteform", { "id": coupon.id }) :>">Delete</a>
       <:.end if -:>
     </td>