Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
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-sm btn-secondary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"
31
    aria-label="{{#str}} aria:displaydropdown, block_myoverview {{/str}}">
32
        <span class="d-sm-inline-block" data-active-item-text>
33
            {{#card}}
34
                {{#str}} card, block_myoverview {{/str}}
35
            {{/card}}
36
            {{#list}}
37
                {{#str}} list, block_myoverview {{/str}}
38
            {{/list}}
39
            {{#summary}}
40
                {{#str}} summary, block_myoverview {{/str}}
41
            {{/summary}}
42
        </span>
43
    </button>
44
    <ul class="dropdown-menu dropdown-menu-right" role="menu" data-show-active-item data-skip-active-class="true" aria-labelledby="displaydropdown">
45
    {{#layouts}}
46
            <li>
47
                <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}}>
48
                    {{name}}
49
                </a>
50
            </li>
51
    {{/layouts}}
52
    </ul>
53
</div>