2
2
< html xmlns:th ="http://www.thymeleaf.org ">
3
3
4
4
< head >
5
- < title > All Polls</ title >
6
- < meta http-equiv ="Content-Type " content ="text/html; charset=UTF-8 " />
7
- < link href ="/css/bootstrap.min.css " rel ="stylesheet ">
8
- < script src ="/js/bootstrap.bundle.min.js "> </ script >
5
+ < title > All Polls</ title >
6
+ < meta http-equiv ="Content-Type " content ="text/html; charset=UTF-8 " />
7
+ < link href ="/css/bootstrap.min.css " rel ="stylesheet ">
8
+ < script src ="/js/bootstrap.bundle.min.js "> </ script >
9
9
</ head >
10
10
11
11
< body >
12
- < div class ="container ">
13
- < h2 class ="form-heading "> List of all polls</ h2 >
14
- < h3 th:text ="${'Total of ' + totalNum + ' polls.'} "/>
15
-
16
- < div class ="container mb-3 ">
17
- < div class ="row align-items-start ">
18
- < div class ="col border border-info bg-info bg-opacity-10 "> Name</ div >
19
- < div class ="col border border-info bg-info bg-opacity-10 "> Votes</ div >
20
- < div class ="col border border-info bg-info bg-opacity-10 "> Deleted</ div >
21
- < div class ="col border border-info bg-info bg-opacity-10 "> Actions</ div >
22
- </ div >
23
- < div class ="row align-items-start " th:each ="poll: ${polls} ">
24
- < div class ="col border " th:text ="${poll.name} "/>
25
- < div class ="col border " th:text ="${poll.choices.size()} " />
26
- < div class ="col border " th:text ="${{poll.deleted}} " />
27
- < div class ="col border ">
28
- < a th:href ="@{/delete(id=${poll.id})} "> Delete</ a >
29
- < a th:href ="@{/vote(id=${poll.id})} "> Participate</ a >
30
- < a th:href ="@{/results(id=${poll.id})} "> Show results</ a >
31
- </ div >
32
- </ div >
33
- </ div >
34
-
35
- < div class ="container mb-3 ">
36
- < div class ="row align-items-start "> </ div >
37
- < nav aria-label ="Page navigation ">
38
- < ul class ="pagination ">
39
- < li th:class ="${currentPage == 1} ? 'page-item disabled' : 'page-item' "> < a class ="page-link " th:href ="${currentPage == 1} ? '#' : '@{/list(p=${currentPage-1})}' "> Previous</ a > </ li >
40
- <!--<li class="page-item"><a class="page-link" href="#">1</a></li>
12
+ < div class ="container ">
13
+ < h2 class ="form-heading "> List of all polls</ h2 >
14
+ < h3 th:text ="${'Total of ' + totalNum + ' polls.'} " />
15
+
16
+ < div class ="container mb-3 ">
17
+ < div class ="row align-items-start ">
18
+ < div class ="col border border-info bg-info bg-opacity-10 "> Name</ div >
19
+ < div class ="col border border-info bg-info bg-opacity-10 "> Votes</ div >
20
+ < div class ="col border border-info bg-info bg-opacity-10 "> Deleted</ div >
21
+ < div class ="col border border-info bg-info bg-opacity-10 "> Actions</ div >
22
+ </ div >
23
+ < div class ="row align-items-start " th:each ="poll: ${polls} ">
24
+ < div class ="col border " th:text ="${poll.name} " />
25
+ < div class ="col border " th:text ="${poll.choices.size()} " />
26
+ < div class ="col border " th:text ="${{poll.deleted}} " />
27
+ < div class ="col border ">
28
+ < a th:href ="@{/delete(id=${poll.id})} "> Delete</ a >
29
+ < a th:href ="@{/vote(id=${poll.id})} "> Participate</ a >
30
+ < a th:href ="@{/results(id=${poll.id})} "> Show results</ a >
31
+ </ div >
32
+ </ div >
33
+ </ div >
34
+
35
+ < div class ="container mb-3 ">
36
+ < div class ="row align-items-start "> </ div >
37
+ < nav aria-label ="Page navigation ">
38
+ < ul class ="pagination ">
39
+ < li th:class ="${currentPage == 1} ? 'page-item disabled' : 'page-item' "> < a class ="page-link "
40
+ th:href ="${currentPage == 1} ? '#' : '@{/list(p=${currentPage-1})}' "> Previous</ a > </ li >
41
+ <!--<li class="page-item"><a class="page-link" href="#">1</a></li>
41
42
<li class="page-item"><a class="page-link" href="#">2</a></li>
42
43
<li class="page-item"><a class="page-link" href="#">3</a></li>-->
43
- < li th:class ="${currentPage == totalPages} ? 'page-item disabled' : 'page-item' "> < a class ="page-link " th:href ="${currentPage == totalPages} ? '#' : '@{/list(p=${currentPage+1})}' "> Next</ a > </ li >
44
- </ ul >
45
- </ nav >
46
- </ div >
47
- </ div >
44
+ < li th:class ="${currentPage == totalPages} ? 'page-item disabled' : 'page-item' "> < a
45
+ class ="page-link "
46
+ th:href ="${currentPage == totalPages} ? '#' : '@{/list(p=${currentPage+1})}' "> Next</ a > </ li >
47
+ </ ul >
48
+ </ nav >
49
+ </ div >
50
+ </ div >
48
51
</ body >
49
52
50
53
</ html >
0 commit comments