1- <nav aria-label ={{ this.ariaLabel }} >
2- <ul class =" pagination" >
3- <li class ={{ if this.disablePrevButtons " disabled" }} >
4- <a
5- href =" #"
6- role =" button"
7- class =" page-item"
8- title =" Go to first page"
9- aria-label =" Go to first page"
10- aria-disabled =" {{ this.disablePrevButtons }} "
11- aria-current =" false"
12- onclick ={{ action this.handleNavigation " first" }}
13- >
14- <UiIcon @name =" angle-double-left" />
15- </a >
16- </li >
17-
18- <li class ={{ if this.disablePrevButtons " disabled" }} >
19- <a
20- href =" #"
21- role =" button"
22- class =" page-item"
23- title =" Go to previous page"
24- aria-label =" Go to previous page"
25- aria-disabled =" {{ this.disablePrevButtons }} "
26- aria-current =" false"
27- onclick ={{ action this.handleNavigation " prev" }}
28- >
29- <UiIcon @name =" angle-left" />
30- </a >
31- </li >
1+ {{ #if (or (not this.hideWhenEmpty ) this.pageNumbers.length )}}
2+ <nav aria-label ={{ this.ariaLabel }} >
3+ <ul class =" pagination" >
4+ <li class ={{ if this.disablePrevButtons " disabled" }} >
5+ <a
6+ href =" #"
7+ role =" button"
8+ class =" page-item"
9+ title =" Go to first page"
10+ aria-label =" Go to first page"
11+ aria-disabled =" {{ this.disablePrevButtons }} "
12+ aria-current =" false"
13+ onclick ={{ action this.handleNavigation " first" }}
14+ >
15+ <UiIcon @name =" angle-double-left" />
16+ </a >
17+ </li >
3218
33- {{ #each this.pageNumbers as |item |}}
34- <li class =" {{ if this.disabled " disabled" }}{{ if item.isCurrent " active" }} " >
19+ <li class ={{ if this.disablePrevButtons " disabled" }} >
3520 <a
3621 href =" #"
3722 role =" button"
38- class =" page-item{{ if this.responsive " hidden-xs hidden-sm " }} "
39- title =" {{ if item.isCurrent ( concat " Current page, page " item.idx ) ( concat " Go to page " item.idx ) }} "
40- aria-label =" {{ if item.isCurrent ( concat " Current page, page " item.idx ) ( concat " Go to page " item.idx ) }} "
41- aria-current =" {{ if item.isCurrent " page " " false " }} "
42- aria-disabled = " {{ this.disabled }} "
43- onclick ={{ action this.handleNavigation item.idx }}
23+ class =" page-item"
24+ title =" Go to previous page "
25+ aria-label =" Go to previous page "
26+ aria-disabled =" {{ this.disablePrevButtons }} "
27+ aria-current = " false "
28+ onclick ={{ action this.handleNavigation " prev " }}
4429 >
45- {{ if this.showPageLinkRangeLabels item.range item.idx }}
30+ < UiIcon @ name = " angle-left " />
4631 </a >
4732 </li >
48- {{ /each }}
4933
50- <li class ={{ if this.disableNextButtons " disabled" }} >
51- <a
52- href =" #"
53- role =" button"
54- class =" page-item"
55- title =" Go to next page"
56- aria-label =" Go to next page"
57- aria-disabled =" {{ this.disableNextButtons }} "
58- aria-current =" false"
59- onclick ={{ action this.handleNavigation " next" }}
60- >
61- <UiIcon @name =" angle-right" />
62- </a >
63- </li >
34+ {{ #each this.pageNumbers as |item |}}
35+ <li class =" {{ if this.disabled " disabled" }}{{ if item.isCurrent " active" }} " >
36+ <a
37+ href =" #"
38+ role =" button"
39+ class =" page-item{{ if this.responsive " hidden-xs hidden-sm" }} "
40+ title =" {{ if item.isCurrent (concat " Current page, page " item.idx ) (concat " Go to page " item.idx )}} "
41+ aria-label =" {{ if item.isCurrent (concat " Current page, page " item.idx ) (concat " Go to page " item.idx )}} "
42+ aria-current =" {{ if item.isCurrent " page" " false" }} "
43+ aria-disabled =" {{ this.disabled }} "
44+ onclick ={{ action this.handleNavigation item.idx }}
45+ >
46+ {{ if this.showPageLinkRangeLabels item.range item.idx }}
47+ </a >
48+ </li >
49+ {{ /each }}
50+
51+ <li class ={{ if this.disableNextButtons " disabled" }} >
52+ <a
53+ href =" #"
54+ role =" button"
55+ class =" page-item"
56+ title =" Go to next page"
57+ aria-label =" Go to next page"
58+ aria-disabled =" {{ this.disableNextButtons }} "
59+ aria-current =" false"
60+ onclick ={{ action this.handleNavigation " next" }}
61+ >
62+ <UiIcon @name =" angle-right" />
63+ </a >
64+ </li >
6465
65- <li class ={{ if this.disableNextButtons " disabled" }} >
66- <a
67- href =" #"
68- role =" button"
69- class =" page-item{{ if this.disableNextButtons ' disabled' }} "
70- title =" Go to last page"
71- aria-label =" Go to last page"
72- aria-disabled =" {{ this.disableNextButtons }} "
73- aria-current =" false"
74- onclick ={{ action this.handleNavigation " last" }}
75- >
76- <UiIcon @name =" angle-double-right" />
77- </a >
78- </li >
79- </ul >
80- </nav >
66+ <li class ={{ if this.disableNextButtons " disabled" }} >
67+ <a
68+ href =" #"
69+ role =" button"
70+ class =" page-item{{ if this.disableNextButtons ' disabled' }} "
71+ title =" Go to last page"
72+ aria-label =" Go to last page"
73+ aria-disabled =" {{ this.disableNextButtons }} "
74+ aria-current =" false"
75+ onclick ={{ action this.handleNavigation " last" }}
76+ >
77+ <UiIcon @name =" angle-double-right" />
78+ </a >
79+ </li >
80+ </ul >
81+ </nav >
82+ {{ /if }}
0 commit comments