-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathpeople.html
45 lines (38 loc) · 1.49 KB
/
people.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
---
layout: default
title: People
permalink: /people/
---
<script src="{{ "/js/people.js" | prepend: site.baseurl }}"></script>
<div class="home" ng-controller="customersController">
<h3>People ([[{ customers.length }]])</h3>
<table class="table table-hover">
<thead>
<tr>
<th>Id</th>
<th>Name <input type="text" placeholder="filter" ng-model="filter"></input></th>
<th>Email</th>
<th>Phone Number</th>
<th ng-show="user.email">Action</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="customer in customers | filter:filter">
<td>[[{ customer.id }]]</td>
<td>[[{ customer.name }]]</td>
<td>[[{ customer.email }]]</td>
<td>[[{ customer.phone }]]</td>
<td ng-show="user.email" ng-click="removeCustomer(customer.id)">
<div class="glyphicon glyphicon-remove" title="DELETE"></div>
</td>
</tr>
<tr ng-show="user.email">
<td></td>
<td><input type="text" ng-model="newCustomerName" placeholder="add new..."></input></td>
<td><input type="text" ng-model="newCustomerEmail" ng-show="newCustomerName" placeholder="add new..."></input></td>
<td><input type="text" ng-model="newCustomerPhone" ng-show="newCustomerName" placeholder="add new..."></input></td>
<td><button class="btn btn-primary" ng-click="addCustomer()" ng-show="newCustomerName && newCustomerEmail && newCustomerPhone">add</button></td>
</tr>
</tbody>
</table>
</div>