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_boost/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 class="btn btn-icon rounded-circle mx-2"
|
|
|
28 |
type="button"
|
|
|
29 |
data-toggle="dropdown"
|
|
|
30 |
aria-haspopup="true"
|
|
|
31 |
aria-expanded="false"
|
|
|
32 |
title="{{#str}}courseindexoptions, courseformat{{/str}}"
|
|
|
33 |
>
|
|
|
34 |
<i class="icon fa fa-ellipsis-v fa-fw m-0" aria-hidden="true"></i>
|
|
|
35 |
</button>
|
|
|
36 |
<div class="dropdown-menu dropdown-menu-right">
|
|
|
37 |
<a class="dropdown-item"
|
|
|
38 |
href="#"
|
|
|
39 |
data-action="expandallcourseindexsections"
|
|
|
40 |
>
|
|
|
41 |
{{#pix}} t/angles-down, core {{/pix}}
|
|
|
42 |
{{#str}}expandall{{/str}}
|
|
|
43 |
</a>
|
|
|
44 |
<a class="dropdown-item"
|
|
|
45 |
href="#"
|
|
|
46 |
data-action="collapseallcourseindexsections"
|
|
|
47 |
>
|
|
|
48 |
<span class="dir-rtl-hide">{{#pix}} t/angles-right, core {{/pix}}</span>
|
|
|
49 |
<span class="dir-ltr-hide">{{#pix}} t/angles-left, core {{/pix}}</span>
|
|
|
50 |
{{#str}}collapseall{{/str}}
|
|
|
51 |
</a>
|
|
|
52 |
</div>
|
|
|
53 |
</div>
|
|
|
54 |
{{#js}}
|
|
|
55 |
require(['theme_boost/courseindexdrawercontrols'], function(component) {
|
|
|
56 |
component.init('courseindexdrawercontrols');
|
|
|
57 |
});
|
|
|
58 |
{{/js}}
|