Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
436 ariadna 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}}" role="{{#istablist}}tablist{{/istablist}}{{^istablist}}menubar{{/istablist}}" class="nav more-nav {{navbarstyle}}">
50
        {{#nodecollection}}
51
            {{#children}}
52
                {{> core/moremenu_children}}
53
            {{/children}}
54
        {{/nodecollection}}
55
 
56
        {{#nodearray}}
57
            {{> core/moremenu_children}}
58
        {{/nodearray}}
59
 
60
        <li role="none" class="nav-item dropdown dropdownmoremenu d-none" data-region="morebutton">
61
            <a class="dropdown-toggle nav-link {{#isactive}}active{{/isactive}}" href="#" id="moremenu-dropdown-{{moremenuid}}" role="{{#istablist}}tab{{/istablist}}{{^istablist}}menuitem{{/istablist}}" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" tabindex="-1">
62
                {{#str}}moremenu, core{{/str}}
63
            </a>
64
            <ul class="dropdown-menu dropdown-menu-right" data-region="moredropdown" aria-labelledby="moremenu-dropdown-{{moremenuid}}" role="menu">
65
            </ul>
66
        </li>
67
    </ul>
68
</nav>
69
{{#js}}
70
    require(['core/moremenu'], function(moremenu) {
71
        moremenu(document.querySelector('#moremenu-{{moremenuid}}-{{navbarstyle}}'));
72
    });
73
{{/js}}