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/paging_bar
20 This template renders the horizontal bar with page links, e.g.
23 Example context (json):
28 "url": "./page.php?p=1"
33 "url": "./page.php?p=99"
45 "url": "./page.php?p=1"
53 <nav aria-label="{{label}}" class="pagination pagination-centered justify-content-center">
54 <ul class="mt-1 pagination " data-page-size="{{pagesize}}">
56 <li class="page-item" data-page-number="{{page}}">
57 <a href="{{url}}" class="page-link">
58 <span aria-hidden="true">«</span>
59 <span class="sr-only">{{#str}}previouspage, moodle{{/str}}</span>
64 <li class="page-item" data-page-number="{{page}}">
65 <a href="{{url}}" class="page-link">
66 <span aria-hidden="true">{{page}}</span>
67 <span class="sr-only">{{#str}}pagea, moodle, {{page}}{{/str}}</span>
70 <li class="page-item disabled" data-page-number="{{page}}">
71 <span class="page-link">…</span>
75 <li class="page-item {{#active}}active{{/active}}" data-page-number="{{page}}">
76 <a href="{{#url}}{{.}}{{/url}}{{^url}}#{{/url}}" class="page-link" {{#active}}aria-current="page"{{/active}}>
77 <span aria-hidden="true">{{page}}</span>
78 <span class="sr-only">{{#str}}pagea, moodle, {{page}}{{/str}}</span>
83 <li class="page-item disabled" data-page-number="{{page}}">
84 <span class="page-link">…</span>
86 <li class="page-item" data-page-number="{{page}}">
87 <a href="{{url}}" class="page-link">
88 <span aria-hidden="true">{{page}}</span>
89 <span class="sr-only">{{#str}}pagea, moodle, {{page}}{{/str}}</span>
94 <li class="page-item" data-page-number="{{page}}">
95 <a href="{{url}}" class="page-link">
96 <span aria-hidden="true">»</span>
97 <span class="sr-only">{{#str}}nextpage, moodle{{/str}}</span>