39 lines
2.2 KiB
Handlebars
39 lines
2.2 KiB
Handlebars
|
{{> partials/menu}}
|
||
|
<div class="col-sm-9">
|
||
|
<div class="row">
|
||
|
<div class="col-md-10">
|
||
|
<h2 class="clearfix">{{ @root.__ "Discount codes" }} <div class="float-right"><a href="/admin/settings/discount/new" class="btn btn-outline-success">{{ @root.__ "New Discount" }}</a></div></h2>
|
||
|
{{#if discounts}}
|
||
|
<ul class="list-group">
|
||
|
{{#each discounts}}
|
||
|
<li class="list-group-item">
|
||
|
<div class="row">
|
||
|
<div class="col-4 mt-2">
|
||
|
<span><strong>{{ @root.__ "Code" }}:</strong> {{this.code}}</span>
|
||
|
</div>
|
||
|
<div class="col-2 mt-2">
|
||
|
<span><strong>{{ @root.__ "Type" }}:</strong> {{this.type}}</span>
|
||
|
</div>
|
||
|
<div class="col-3 mt-2">
|
||
|
<span><strong>{{ @root.__ "Status" }}:</strong>
|
||
|
{{#ifCond (discountExpiry this.start this.end) '===' true}}
|
||
|
<span class="text-success">{{ @root.__ "Running" }}</span>
|
||
|
{{else}}
|
||
|
<span class="text-danger">{{ @root.__ "Not running" }}</span>
|
||
|
{{/ifCond}}
|
||
|
</span>
|
||
|
</div>
|
||
|
<div class="col-3 text-right">
|
||
|
<a class="btn btn-outline-success" href="/admin/settings/discount/edit/{{this._id}}">{{ @root.__ "Edit" }}</a>
|
||
|
<button class="btn btn-outline-danger" id="btnDiscountDelete" data-id="{{this._id}}">{{ @root.__ "Delete" }}</button>
|
||
|
</div>
|
||
|
</div>
|
||
|
</li>
|
||
|
{{/each}}
|
||
|
</ul>
|
||
|
{{else}}
|
||
|
<h4 class="text-warning text-center">{{ @root.__ "There are currently no discount codes setup." }}</h4>
|
||
|
{{/if}}
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|