2 This file is part of Moodle - http://moodle.org/
4 Moodle is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation, either version 3 of the License, or
7 (at your option) any later version.
9 Moodle is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with Moodle. If not, see <http://www.gnu.org/licenses/>.
18 @template core/paged_content_paging_bar
20 This template renders the bootstrap style paging bar to control a paged
23 Example context (json):
30 "activepagenumber": 1,
45 data-region="paging-control-container"
48 {{#showitemsperpageselector}}
50 id="paging-control-limit-container-{{uniqid}}"
51 data-region="paging-control-limit-container"
52 class="d-inline-flex align-items-center"
54 <span class="mr-1">{{#str}} show {{/str}}</span>
55 <div class="btn-group">
58 class="btn btn-outline-secondary dropdown-toggle"
59 data-toggle="dropdown"
62 data-action="limit-toggle"
63 {{#arialabels.itemsperpage}}
65 {{/arialabels.itemsperpage}}
66 {{^arialabels.itemsperpage}}
67 aria-label="{{#str}} pagedcontentpagingbaritemsperpage, core, {{#itemsperpage}}{{#active}}{{value}}{{/active}}{{/itemsperpage}}{{/str}}"
68 {{/arialabels.itemsperpage}}
80 {{#arialabels.itemsperpagecomponents}}
81 data-active-item-button-aria-label-components="{{.}}"
82 {{/arialabels.itemsperpagecomponents}}
83 {{^arialabels.itemsperpagecomponents}}
84 data-active-item-button-aria-label-components="pagedcontentpagingbaritemsperpage, core"
85 {{/arialabels.itemsperpagecomponents}}
89 class="dropdown-item {{#active}}active{{/active}}"
92 {{#active}}aria-current="true"{{/active}}
94 {{#value}}{{.}}{{/value}}
95 {{^value}}{{#str}} all, core {{/str}}{{/value}}
101 {{/showitemsperpageselector}}
105 id="{{$pagingbarid}}paging-bar-{{uniqid}}{{/pagingbarid}}"
106 class="{{#showitemsperpageselector}}ml-auto{{/showitemsperpageselector}}"
107 data-region="paging-bar"
108 data-ignore-control-while-loading="{{ignorecontrolwhileloading}}"
109 data-hide-control-on-single-page="{{hidecontrolonsinglepage}}"
110 {{#activepagenumber}}
111 data-active-page-number="{{.}}"
112 {{/activepagenumber}}
113 {{^activepagenumber}}
114 data-active-page-number="1"
115 {{/activepagenumber}}
116 {{#showitemsperpageselector}}
119 data-items-per-page="{{value}}"
122 {{/showitemsperpageselector}}
123 {{^showitemsperpageselector}}
124 data-items-per-page="{{itemsperpage}}"
125 {{/showitemsperpageselector}}
126 {{#arialabels.paginationnav}}
128 {{/arialabels.paginationnav}}
129 {{^arialabels.paginationnav}}
130 aria-label="{{#str}} pagedcontentnavigation, core {{/str}}"
131 {{/arialabels.paginationnav}}
132 {{#arialabels.paginationnavitemcomponents}}
133 data-aria-label-components-pagination-item="{{.}}"
134 {{/arialabels.paginationnavitemcomponents}}
135 {{^arialabels.paginationnavitemcomponents}}
136 data-aria-label-components-pagination-item="pagedcontentnavigationitem, core"
137 {{/arialabels.paginationnavitemcomponents}}
138 {{#arialabels.paginationactivenavitemcomponents}}
139 data-aria-label-components-pagination-active-item="{{.}}"
140 {{/arialabels.paginationactivenavitemcomponents}}
141 {{^arialabels.paginationactivenavitemcomponents}}
142 data-aria-label-components-pagination-active-item="pagedcontentnavigationactiveitem, core"
143 {{/arialabels.paginationactivenavitemcomponents}}
146 <ul class="pagination mb-0">
148 {{< core/paged_content_paging_bar_item }}
150 <span class="icon-no-margin dir-rtl-hide" aria-hidden="true">{{#pix}} i/previous, core {{/pix}}</span>
151 <span class="icon-no-margin dir-ltr-hide" aria-hidden="true">{{#pix}} i/next, core {{/pix}}</span>
153 {{$attributes}}data-control="previous"{{/attributes}}
154 {{/ core/paged_content_paging_bar_item }}
157 {{< core/paged_content_paging_bar_item }}
159 <span aria-hidden="true">{{#str}}first{{/str}}</span>
161 {{$attributes}}data-control="first"{{/attributes}}
162 {{/ core/paged_content_paging_bar_item }}
165 {{< core/paged_content_paging_bar_item }}
166 {{$attributes}}data-page="true"{{/attributes}}
167 {{/ core/paged_content_paging_bar_item }}
170 {{< core/paged_content_paging_bar_item }}
172 <span aria-hidden="true">{{#str}}last{{/str}}</span>
174 {{$attributes}}data-control="last"{{/attributes}}
175 {{/ core/paged_content_paging_bar_item }}
178 {{< core/paged_content_paging_bar_item }}
180 <span class="icon-no-margin dir-rtl-hide" aria-hidden="true">{{#pix}} i/next, core {{/pix}}</span>
181 <span class="icon-no-margin dir-ltr-hide" aria-hidden="true">{{#pix}} i/previous, core {{/pix}}</span>
183 {{$attributes}}data-control="next"{{/attributes}}
184 {{/ core/paged_content_paging_bar_item }}