2018-02-12 05:47:26 +10:00
{{ > partials / menu }}
2019-12-30 17:17:59 +10:00
<div class="col-sm-9">
2019-12-26 13:23:21 +10:00
<div class="col-sm-12">
2018-01-07 04:55:48 +10:00
<h2>Orders</h2>
</div>
2019-12-26 13:23:21 +10:00
<div class="col-sm-12 search_bar">
2018-01-07 04:55:48 +10:00
<div class="input-group">
2019-12-26 13:23:21 +10:00
<input type="text" name="order_filter" id="order_filter" class="form-control" placeholder="Filter orders">
<div class="input-group-append">
<button class="btn btn-outline-success" id="btn_order_filter"> {{ @ root .__ "Filter" }} </button>
<a href="/admin/orders/bystatus/" class="hidden-xs btn btn-outline-info orderFilterByStatus"> {{ @ root .__ "By status" }} </a>
<a href="/admin/orders" class="hidden-xs btn btn-outline-warning"><i class="fa fa-times" aria-hidden="true"></i></a>
</div>
2018-01-07 04:55:48 +10:00
</div>
<div class="orderFilter">
2019-12-26 13:23:21 +10:00
<div class="row">
<div class="text-warning top-pad-10 col-sm-8"> {{ @ root .__ "Orders can be filtered by: surname, email address or postcode/zipcode" }} </div>
2019-12-26 20:32:28 +10:00
<div class="col-sm-4 top-pad-10">
<form class="form-inline float-sm-right">
<label for="orderStatusFilter" class="control-label formLabel right-pad-10">Status</label>
<select class="form-control" id="orderStatusFilter">
<option> {{ @ root .__ "Completed" }} </option>
<option> {{ @ root .__ "Paid" }} </option>
<option> {{ @ root .__ "Created" }} </option>
<option> {{ @ root .__ "Cancelled" }} </option>
<option> {{ @ root .__ "Declined" }} </option>
<option> {{ @ root .__ "Shipped" }} </option>
<option> {{ @ root .__ "Pending" }} </option>
</select>
</form>
2018-01-07 04:55:48 +10:00
</div>
</div>
</div>
</div>
2019-12-26 13:23:21 +10:00
<div class="col-sm-12 top-pad-10">
2018-01-07 04:55:48 +10:00
<ul class="list-group">
<li class="list-group-item">
{{ # if searchTerm }}
2019-11-06 18:31:25 +10:00
<strong> {{ @ root .__ "Orders" }} - <span class="text-danger"> {{ @ root .__ "Filtered term" }} : {{ searchTerm }} </span></strong>
2018-01-07 04:55:48 +10:00
{{ else }}
2019-11-06 18:31:25 +10:00
<strong> {{ @ root .__ "Recent orders" }} </strong>
2018-01-07 04:55:48 +10:00
{{ / if }}
</li>
2018-01-07 23:16:31 +10:00
{{ # if orders }}
2018-01-07 04:55:48 +10:00
{{ # each orders }}
<li class="list-group-item">
2020-01-01 19:20:57 +10:00
<div class="float-right top-pad-5">
2019-11-06 18:31:25 +10:00
{{ @ root .__ "Status" }} : <span class="text- {{ getStatusColor this .orderStatus }} "> {{ this .orderStatus }} </span>
2020-01-03 13:22:43 +10:00
<a class="text-danger" href="/admin/order/delete/ {{ this ._id }} " onclick="return confirm('Are you sure you want to delete this order?');"> <i class="far fa-trash-alt"></i></a>
2019-12-26 20:32:28 +10:00
</div>
<div class="top-pad-5">
2019-11-06 18:31:25 +10:00
<a href="/admin/order/view/ {{ this ._id }} " class="text-success">View order</a> - <span class="text-info">Date: </span> {{ formatDate this .orderDate "DD/MM/YYYY hh:mm" }} | <span class="text-info">Email:</span> {{ this .orderEmail }} | <span class="text-info"> {{ @ root .__ "Last name" }} :</span> {{ this .orderLastname }}
2019-12-26 20:32:28 +10:00
</div>
2018-01-07 04:55:48 +10:00
</li>
{{ / each }}
2018-01-07 23:16:31 +10:00
{{ else }}
<li class="list-group-item">
2019-12-26 20:32:28 +10:00
<h5 class="text-center">
2019-11-06 18:31:25 +10:00
{{ @ root .__ "No orders found" }}
2019-12-26 20:32:28 +10:00
</h5>
2018-01-07 23:16:31 +10:00
</li>
{{ / if }}
2018-01-07 04:55:48 +10:00
</ul>
2018-01-07 23:16:31 +10:00
</div>
2018-01-07 04:55:48 +10:00
</div>