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 core/moremenu
19
 
20
The More menu.
21
 
22
Example context (json):
23
{
24
"nodecollection": {
25
"children": [
26
{
27
"text": "Home",
28
"action": "/index.php?redirect=0",
29
"active": "true"
30
},
31
{
32
"text": "Dashboard",
33
"action": "/my"
34
},
35
{
36
"text": "Courses",
37
"action": "/course"
38
},
39
{
40
"text": "Site Administration",
41
"action": "/admin/search.php"
42
}
43
]
44
},
45
"moremenuid": "614c104dbacfa"
46
}
47
}}
48
<nav class="moremenu navigation">
49
    <ul id="moremenu-{{moremenuid}}-{{navbarstyle}}"
50
        role="{{#istablist}}tablist{{/istablist}}{{^istablist}}menubar{{/istablist}}"
51
        class="nav more-nav {{navbarstyle}}">
52
        {{#nodecollection}}
53
        {{#children}}
54
        {{> core/moremenu_children}}
55
        {{/children}}
56
        {{/nodecollection}}
57
        {{#nodearray}}
58
        {{> core/moremenu_children}}
59
        {{/nodearray}}
60
 
61
        {{# output.moremenu_group_item }}
62
        <li class="nav-item" role="none"
63
            data-forceintomoremenu="{{#forceintomoremenu}}true{{/forceintomoremenu}}{{^forceintomoremenu}}false{{/forceintomoremenu}}">
64
            <a role="menuitem" class="nav-link"
65
                href="{{ output.moremenu_group_item }}"
66
                aria-label="{{#str}}groups{{/str}}"
67
                tabindex="-1">
68
                {{#str}}groups{{/str}}
69
            </a>
70
        </li>
71
        {{/ output.moremenu_group_item }}
72
 
73
        {{{ output.moremenu_custom_items }}}
74
 
75
        <li role="none" class="nav-item dropdown dropdownmoremenu d-none"
76
            data-region="morebutton">
77
            <a class="dropdown-toggle nav-link {{#isactive}}active{{/isactive}}"
78
                href="#" id="moremenu-dropdown-{{moremenuid}}"
79
                role="{{#istablist}}tab{{/istablist}}{{^istablist}}menuitem{{/istablist}}"
80
                data-toggle="dropdown" aria-haspopup="true"
81
                aria-expanded="false" tabindex="-1">
82
                {{#str}}moremenu, core{{/str}}
83
            </a>
84
            <ul class="dropdown-menu dropdown-menu-left"
85
                data-region="moredropdown"
86
                aria-labelledby="moremenu-dropdown-{{moremenuid}}" role="menu">
87
            </ul>
88
        </li>
89
    </ul>
90
</nav>
91
{{#js}}
92
require(['core/moremenu'], function(moremenu) {
93
moremenu(document.querySelector('#moremenu-{{moremenuid}}-{{navbarstyle}}'));
94
});
95
{{/js}}