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 block_myoverview/nav-display-selector
|
|
|
19 |
|
|
|
20 |
This template renders display dropdown.
|
|
|
21 |
|
|
|
22 |
Example context (json):
|
|
|
23 |
{
|
|
|
24 |
"cards": true,
|
|
|
25 |
"list": false,
|
|
|
26 |
"summary": false
|
|
|
27 |
}
|
|
|
28 |
}}
|
|
|
29 |
<div class="dropdown mb-1">
|
|
|
30 |
<button id="displaydropdown" type="button" class="btn btn-outline-secondary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"
|
|
|
31 |
aria-label="{{#str}} aria:displaydropdown, block_myoverview {{/str}}">
|
|
|
32 |
<span data-active-item-text>
|
|
|
33 |
{{#card}}{{#str}} card, block_myoverview {{/str}}{{/card}}
|
|
|
34 |
{{#list}}{{#str}} list, block_myoverview {{/str}}{{/list}}
|
|
|
35 |
{{#summary}}{{#str}} summary, block_myoverview {{/str}}{{/summary}}
|
|
|
36 |
</span>
|
|
|
37 |
</button>
|
|
|
38 |
<ul class="dropdown-menu" role="menu" data-show-active-item data-skip-active-class="true" aria-labelledby="displaydropdown">
|
|
|
39 |
{{#layouts}}
|
|
|
40 |
<li>
|
|
|
41 |
<a class="dropdown-item" href="#" data-display-option="display" data-value="{{id}}" data-pref="{{id}}" aria-label="{{arialabel}}" aria-controls="courses-view-{{uniqid}}" role="menuitem" {{#active}}aria-current="true"{{/active}}>
|
|
|
42 |
{{name}}
|
|
|
43 |
</a>
|
|
|
44 |
</li>
|
|
|
45 |
{{/layouts}}
|
|
|
46 |
</ul>
|
|
|
47 |
</div>
|