1
1
<!DOCTYPE html>
2
- < html lang ="en " xmlns:th ="http://www.thymeleaf.org ">
2
+ < html lang ="en " xmlns:th ="http://www.thymeleaf.org " xmlns:sd =" http://www.thymeleaf.org/spring-data " >
3
3
< head >
4
4
< title > User Center</ title >
5
-
5
+
6
6
< meta http-equiv ="content-type " content ="text/html; charset=UTF-8 " />
7
7
< meta name ="viewport " content ="width=device-width, initial-scale=1 " />
8
-
8
+
9
9
< link rel ="stylesheet " th:href ="@{/webjars/bootstrap/css/bootstrap.min.css} " />
10
10
</ head >
11
11
12
12
< body >
13
13
< div class ="container-fluid ">
14
14
< h1 > User Center</ h1 >
15
-
15
+
16
16
< div class ="panel panel-default ">
17
17
< div class ="panel-heading ">
18
18
< h3 class ="panel-title "> Search</ h3 >
19
19
</ div >
20
20
< div class ="panel-body ">
21
-
21
+
22
22
< form action ="/ ">
23
-
23
+
24
24
< div class ="form-group col-sm-6 ">
25
25
< label for ="firstname " class ="control-label "> Firstname:</ label >
26
26
< input id ="firstname " name ="firstname " th:value ="${#httpServletRequest.getParameter('firstname')} " type ="text " class ="form-control " autofocus ="autofocus " />
@@ -44,33 +44,26 @@ <h3 class="panel-title">Search</h3>
44
44
< div class ="form-group col-sm-12 ">
45
45
< button id ="submit " type ="submit " class ="btn btn-default "> Submit</ button >
46
46
</ div >
47
-
47
+
48
48
</ form >
49
49
</ div >
50
50
</ div >
51
-
51
+
52
52
< nav class ="text-center ">
53
- < ul class ="pagination " th:with ="total = ${users.totalPages} ">
54
- < li th:if ="${users.hasPrevious()} ">
55
- < a th:href ="@{${baseUri}(page=${users.previousPageable().pageNumber})} " aria-label ="Previous ">
56
- < span aria-hidden ="true "> «</ span >
57
- </ a >
58
- </ li >
59
- < li th:each ="page : ${#numbers.sequence(0, total - 1)} "> < a th:href ="@{${baseUri}(page=${page})} " th:text ="${page + 1} "> 1</ a > </ li >
60
- < li th:if ="${users.hasNext()} ">
61
- < a th:href ="@{${baseUri}(page=${users.nextPageable().pageNumber})} " aria-label ="Next ">
62
- < span aria-hidden ="true "> »</ span >
63
- </ a >
64
- </ li >
53
+ < div sd:pagination-summary ="true "> Pagination information</ div >
54
+ < ul class ="pagination " sd:pagination ="full ">
55
+ <!-- Pagination created by the Thymeleaf Spring Data dialect, this content is just for mockup -->
56
+ < li class ="disabled "> < a href ="# " aria-label ="Previous "> < span aria-hidden ="true "> «</ span > </ a > </ li >
57
+ < li class ="active "> < a href ="# "> 1 < span class ="sr-only "> (current)</ span > </ a > </ li >
65
58
</ ul >
66
59
</ nav >
67
-
60
+
68
61
< table class ="table table-striped ">
69
62
< thead >
70
63
< tr >
71
64
< th > #</ th >
72
65
< th > </ th >
73
- < th > Firstname</ th >
66
+ < th > < a sd:pagination-sort =" firstname " > Firstname</ a > </ th >
74
67
< th > Lastname</ th >
75
68
< th > Nationality</ th >
76
69
< th > City</ th >
@@ -93,8 +86,10 @@ <h3 class="panel-title">Search</h3>
93
86
</ tr >
94
87
</ tbody >
95
88
</ table >
96
-
89
+
90
+ < ul class ="pagination " sd:pagination ="aligned-links "> </ ul >
91
+
97
92
</ div >
98
-
93
+
99
94
</ body >
100
95
</ html >
0 commit comments