-
Notifications
You must be signed in to change notification settings - Fork 0
/
contactView.html
81 lines (79 loc) · 3.36 KB
/
contactView.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<div class="main">
<div class="container">
<div class="row" ng-controller="ContactViewCtrl">
<div>
<h1>Contact Directory</h1>
<label>Search: </label>
<input id="search" ng-change="filter()" ng-model="search" placeholder="Search for contacts" autofocus />
</div>
<div id="validation" class="hidden">
</div>
<br />
<table class="table table-bordered table-hover">
<tr>
<th>
<a ng-click="orderByField='first_name'; reverseSort = !reverseSort">
First Name <span ng-show="orderByField == 'first_name'"><span ng-show="!reverseSort">^</span><span ng-show="reverseSort">v</span></span>
</a>
</th>
<th>
<a ng-click="orderByField='last_name'; reverseSort = !reverseSort">
Last Name <span ng-show="orderByField == 'last_name'"><span ng-show="!reverseSort">^</span><span ng-show="reverseSort">v</span></span>
</a>
</th>
<th>
<a ng-click="orderByField='company_name'; reverseSort = !reverseSort">
Company <span ng-show="orderByField == 'company_name'"><span ng-show="!reverseSort">^</span><span ng-show="reverseSort">v</span></span>
</a>
</th>
<th>
<a ng-click="orderByField='address'; reverseSort = !reverseSort">
Address <span ng-show="orderByField == 'address'"><span ng-show="!reverseSort">^</span><span ng-show="reverseSort">v</span></span>
</a>
</th>
<th>
<a ng-click="orderByField='phone'; reverseSort = !reverseSort">
Phone <span ng-show="orderByField == 'phone'"><span ng-show="!reverseSort">^</span><span ng-show="reverseSort">v</span></span>
</a>
</th>
<th>
<a ng-click="orderByField='work_phone'; reverseSort = !reverseSort">
Work Phone <span ng-show="orderByField == 'work_phone'"><span ng-show="!reverseSort">^</span><span ng-show="reverseSort">v</span></span>
</a>
</th>
<th>
<a ng-click="orderByField='email'; reverseSort = !reverseSort">
Email <span ng-show="orderByField == 'email'"><span ng-show="!reverseSort">^</span><span ng-show="reverseSort">v</span></span>
</a>
</th>
<th>
<a ng-click="orderByField='url'; reverseSort = !reverseSort">
URL <span ng-show="orderByField == 'url'"><span ng-show="!reverseSort">^</span><span ng-show="reverseSort">v</span></span>
</a>
</th>
<th></th>
<th></th>
</tr>
<!--<tr class="alterTable" ng-repeat="c in filteredContacts | filter:search | orderBy: orderByField: reverseSort">-->
<tr class="alterTable" ng-repeat="c in filtered | startFrom:(currentPage-1)*entryLimit | limitTo:entryLimit | orderBy: orderByField: reverseSort">
<td>
{{c.first_name}}
<input type="hidden" id="contactID_{{c.id}}" value="{{c.id}}" />
</td>
<td>{{c.last_name}}</td>
<td>{{c.company_name}}</td>
<td>{{c.address}}, {{c.city}} {{c.state}}, {{c.zip}}</td>
<td>{{c.phone}}</td>
<td>{{c.work_phone}}</td>
<td>{{c.email}}</td>
<td>{{c.url}}</td>
<td><a ng-href="#/Edit Contact/{{c.id}}">edit</a></td>
<td><a confirmed-click="delete(c.id)" ng-confirm-click="Are you sure you want to delete {{c.first_name}} {{c.last_name}}?">delete</a></td>
</tr>
</table>
<div>
<pagination total-items="totalItems" ng-model="currentPage" ng-change="pageChanged()" items-per-page="entryLimit" data-boundry-links="true"></pagination>
</div>
</div>
</div>
</div>