expressCart/views/customers.hbs

65 lines
2.8 KiB
Handlebars
Raw Normal View History

2018-02-12 05:47:26 +10:00
{{> partials/menu}}
2018-01-22 07:20:33 +10:00
<div class="col-lg-9">
<div class="col-lg-12">
<h2>Customers</h2>
</div>
<div class="col-lg-12 search_bar">
<div class="input-group">
<input type="text" name="customer_filter" id="customer_filter" class="form-control input-lg" placeholder="Filter customers">
<span class="input-group-btn">
<button class="btn btn-success btn-lg" id="btn_customer_filter">Filter</button>
<a href="/admin/customers" class="hidden-xs btn btn-warning btn-lg"><i class="fa fa-times" aria-hidden="true"></i></a>
</span>
</div>
<p class="text-warning top-pad-10">{{ @root.__ "Customers can be filtered by: email, name or phone number" }}</p>
2018-01-22 07:20:33 +10:00
</div>
{{#if customers}}
<div class="col-lg-12">
<ul class="list-group">
<li class="list-group-item">
<strong>
{{ @root.__ "Customers" }}
2018-01-22 07:20:33 +10:00
{{#if searchTerm}}
- <span class="text-danger">{{ @root.__ "Filtered term" }}: {{searchTerm}} </span>
2018-01-22 07:20:33 +10:00
{{/if}}
</strong>
</li>
<li class="list-group-item">
<div class="row">
<div class="col-md-4">
<h5 class="text-info"><strong>{{ @root.__ "Email address" }}</strong></h5>
2018-01-22 07:20:33 +10:00
</div>
<div class="col-md-4">
<h5 class="text-info"><strong>{{ @root.__ "Name" }}</strong></h5>
2018-01-22 07:20:33 +10:00
</div>
<div class="col-md-4">
<h5 class="text-info"><strong>{{ @root.__ "Phone number" }}</strong></h5>
2018-01-22 07:20:33 +10:00
</div>
</div>
</li>
{{#each customers}}
<li class="list-group-item">
<div class="row">
<a href="/admin/customer/view/{{this._id}}">
<div class="col-md-4">
<h5 class="">{{this.email}}</h5>
</div>
<div class="col-md-4">
<h5 class="">{{this.firstName}} {{this.lastName}}</h5>
</div>
<div class="col-md-4">
<h5 class="">{{this.phone}}</h5>
</div>
</a>
</div>
</li>
{{/each}}
</ul>
</div>
{{else}}
<h4 class="text-center">
{{ @root.__ "No orders found" }}
2018-01-22 07:20:33 +10:00
</h4>
{{/if}}
</div>