1 |
efrain |
1 |
{{!
|
|
|
2 |
This file is part of Moodle - http://moodle.org/
|
|
|
3 |
|
|
|
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.
|
|
|
8 |
|
|
|
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.
|
|
|
13 |
|
|
|
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/>.
|
|
|
16 |
}}
|
|
|
17 |
{{!
|
|
|
18 |
@template core_courseformat/local/content/sectionselector
|
|
|
19 |
|
|
|
20 |
Displays the course section navigation.
|
|
|
21 |
|
|
|
22 |
Example context (json):
|
|
|
23 |
{
|
|
|
24 |
"hasprevious": true,
|
|
|
25 |
"previousurl": "#",
|
|
|
26 |
"larrow": "◄",
|
|
|
27 |
"previousname": "Section 3",
|
|
|
28 |
"hasnext": true,
|
|
|
29 |
"rarrow": "►",
|
|
|
30 |
"nexturl": "#",
|
|
|
31 |
"nextname": "Section 5",
|
|
|
32 |
"selector": "<select><option>Section 4</option></select>"
|
|
|
33 |
}
|
|
|
34 |
}}
|
|
|
35 |
<div class="section-navigation d-flex justify-content-between">
|
|
|
36 |
<div class="prevsection">
|
|
|
37 |
{{#hasprevious}}
|
|
|
38 |
<a href="{{{previousurl}}}" class="{{#previoushidden}} dimmed_text {{/previoushidden}} btn btn-secondary" aria-label="{{{previousname}}}" title="{{{previousname}}}" data-toggle="tooltip">
|
|
|
39 |
<span class="btn--icon"><svg class="" width="18" height="18" stroke-width="2" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" color="currentColor">
|
|
|
40 |
<path d="M18.5 12H6m0 0l6-6m-6 6l6 6" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>
|
|
|
41 |
</svg>
|
|
|
42 |
</span>
|
|
|
43 |
</a>
|
|
|
44 |
{{/hasprevious}}
|
|
|
45 |
</div>
|
|
|
46 |
<div>
|
|
|
47 |
{{{selector}}}
|
|
|
48 |
</div>
|
|
|
49 |
<div class="nextsection">
|
|
|
50 |
{{#hasnext}}
|
|
|
51 |
<a href="{{{nexturl}}}" class="{{#nexthidden}} dimmed_text {{/nexthidden}} btn btn-secondary" aria-label="{{{nextname}}}" title="{{{nextname}}}" data-toggle="tooltip">
|
|
|
52 |
<span class="btn--icon">
|
|
|
53 |
<svg width="18" height="18" stroke-width="2" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" color="currentColor">
|
|
|
54 |
<path d="M6 12h12.5m0 0l-6-6m6 6l-6 6" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>
|
|
|
55 |
</svg>
|
|
|
56 |
</span>
|
|
|
57 |
</a>
|
|
|
58 |
{{/hasnext}}
|
|
|
59 |
</div>
|
|
|
60 |
</div>
|