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 theme_universe/courseindexdrawercontrols
|
|
|
19 |
|
|
|
20 |
This template will render "expand-all" and "collapse-all" buttons for the course index drawer.
|
|
|
21 |
|
|
|
22 |
Example context (json):
|
|
|
23 |
{
|
|
|
24 |
}
|
|
|
25 |
}}
|
|
|
26 |
<div id="courseindexdrawercontrols" class="dropdown">
|
|
|
27 |
<button
|
|
|
28 |
class="btn btn-icon btn-light"
|
|
|
29 |
type="button"
|
|
|
30 |
data-toggle="dropdown"
|
|
|
31 |
aria-haspopup="true"
|
|
|
32 |
aria-expanded="false"
|
|
|
33 |
title="{{#str}}courseindexoptions, courseformat{{/str}}"
|
|
|
34 |
>
|
|
|
35 |
<svg width="18" height="18" fill="none" viewBox="0 0 24 24">
|
|
|
36 |
<path
|
|
|
37 |
fill="currentColor"
|
|
|
38 |
d="M13 12C13 12.5523 12.5523 13 12 13C11.4477 13 11 12.5523 11 12C11 11.4477 11.4477 11 12 11C12.5523 11 13 11.4477 13 12Z"
|
|
|
39 |
></path>
|
|
|
40 |
<path
|
|
|
41 |
fill="currentColor"
|
|
|
42 |
d="M13 8C13 8.55228 12.5523 9 12 9C11.4477 9 11 8.55228 11 8C11 7.44772 11.4477 7 12 7C12.5523 7 13 7.44772 13 8Z"
|
|
|
43 |
></path>
|
|
|
44 |
<path
|
|
|
45 |
fill="currentColor"
|
|
|
46 |
d="M13 16C13 16.5523 12.5523 17 12 17C11.4477 17 11 16.5523 11 16C11 15.4477 11.4477 15 12 15C12.5523 15 13 15.4477 13 16Z"
|
|
|
47 |
></path>
|
|
|
48 |
</svg>
|
|
|
49 |
</button>
|
|
|
50 |
<div class="dropdown-menu dropdown-menu-right">
|
|
|
51 |
<a
|
|
|
52 |
class="dropdown-item"
|
|
|
53 |
href="#"
|
|
|
54 |
data-action="expandallcourseindexsections"
|
|
|
55 |
>
|
|
|
56 |
{{#str}}expandall{{/str}}
|
|
|
57 |
</a>
|
|
|
58 |
<a
|
|
|
59 |
class="dropdown-item"
|
|
|
60 |
href="#"
|
|
|
61 |
data-action="collapseallcourseindexsections"
|
|
|
62 |
>
|
|
|
63 |
{{#str}}collapseall{{/str}}
|
|
|
64 |
</a>
|
|
|
65 |
</div>
|
|
|
66 |
</div>
|
|
|
67 |
{{#js}}
|
|
|
68 |
require(['theme_universe/courseindexdrawercontrols'], function(component) {
|
|
|
69 |
component.init('courseindexdrawercontrols'); });
|
|
|
70 |
{{/js}}
|