-
Notifications
You must be signed in to change notification settings - Fork 1
/
1.xhtml
76 lines (74 loc) · 3.74 KB
/
1.xhtml
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
<div class="row">
<div class="col-lg-12">
<h1 class="page-header">Reviews</h1>
</div>
<!-- /.col-lg-12 -->
</div>
<!-- /.row -->
<div class="row">
<div class="col-lg-12">
<div class="panel panel-default">
<div class="panel-heading">
Customer reviews
</div>
<div class="text-center">
<h1>AngularJS - Pagination Example with logic like Google</h1>
<!-- /.panel-heading -->
<div class="panel-body">
<div class="dataTable_wrapper">
<p class="empty-review-msg" ng-show="ctrl.displayReview === null || ctrl.displayReview.length <= 0">You don't have any reviews. </p>
<table class="table table-striped table-bordered table-hover" id="dataTables-example">
<thead>
<tr>
<th>Employee Name</th>
<th>Review Content</th>
<!-- <th>Positive</th> -->
<th>Create Time</th>
<th></th>
</tr>
</thead>
<tbody>
<tr class="user_review_container" ng-repeat="review in ctrl.displayReview" ng-show="ctrl.displayReview.length > 0">
<td>{{review.employeeName}}</td>
<td>{{review.content}}</td>
<!-- <td ng-if='review.positive === true'>Yes</td>
<td ng-if='review.positive === false'>No</td> -->
<td>{{review.createTs | amDateFormat:'MM/DD/YY-HH:mm'}}</td>
<td>
<button class="btn btn-default btn-circle" ng-click="ctrl.deleteReview(review.reviewId)"><i class="fa fa-times"></i></button>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div>
<!-- pager -->
<ul ng-if="ctrl.pager.pages.length" class="pagination">
<li ng-class="{disabled:ctrl.pager.currentPage === 1}">
<a ng-click="ctrl.setPage(1)">First</a>
</li>
<li ng-class="{disabled:ctrl.pager.currentPage === 1}">
<a ng-click="ctrl.setPage(ctrl.pager.currentPage - 1)">Previous</a>
</li>
<li ng-repeat="page in ctrl.pager.pages" ng-class="{active:ctrl.pager.currentPage === page}">
<a ng-click="ctrl.setPage(page)">{{page}}</a>
</li>
<li ng-class="{disabled:ctrl.pager.currentPage === ctrl.pager.totalPages}">
<a ng-click="ctrl.setPage(ctrl.pager.currentPage + 1)">Next</a>
</li>
<li ng-class="{disabled:ctrl.pager.currentPage === ctrl.pager.totalPages}">
<a ng-click="ctrl.setPage(ctrl.pager.totalPages)">Last</a>
</li>
</ul>
</div>
</div>
<!-- /.table-responsive -->
</div>
</div>
<!-- /.panel-body -->
</div>
<!-- /.panel -->
</div>
<!-- /.col-lg-12 -->
</div>