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
 
19
    @template theme_boost/primary-drawer-mobile
20
 
21
    This template renders the mobile version of the top navbar menu in a drawer.
22
 
23
    Example context (json):
24
    {
25
        "output": {
26
            "should_display_navbar_logo": true,
27
            "get_compact_logo_url": "http://placekitten.com/50/50"
28
        },
29
        "mobileprimarynav": [
30
            {
31
                "text": "Dashboard",
32
                "url": "/my",
33
                "isactive": "true"
34
            },
35
            {
36
                "text": "Site home",
37
                "url": "/",
38
                "isactive": "false"
39
            },
40
            {
41
                "text": "My courses",
42
                "url": "/course",
43
                "isactive": "false"
44
            }
45
        ]
46
    }
47
}}
48
 
49
{{< theme_boost/drawer }}
50
    {{$id}}theme_boost-drawers-primary{{/id}}
51
    {{$drawerclasses}}drawer drawer-left drawer-primary{{/drawerclasses}}
52
    {{$drawercloseonresize}}1{{/drawercloseonresize}}
53
    {{$drawerheading}}
54
        {{# output.should_display_navbar_logo }}
55
            <img src="{{output.get_compact_logo_url}}" class="logo py-1 h-100" alt="{{sitename}}">
56
        {{/ output.should_display_navbar_logo }}
57
        {{^ output.should_display_navbar_logo }}
58
            <span class="sitename" title="{{{ sitename }}}">{{{ sitename }}}</span>
59
        {{/ output.should_display_navbar_logo }}
60
    {{/drawerheading}}
61
    {{$drawercontent}}
62
        <div class="list-group">
63
            {{#mobileprimarynav}}
64
                {{#haschildren}}
65
                <a id="drop-down-{{sort}}" href="#" class="list-group-item list-group-item-action icons-collapse-expand {{^isopen}}collapsed {{/isopen}}d-flex" data-toggle="collapse" data-target="#drop-down-menu-{{sort}}" aria-expanded="{{#isopen}}true{{/isopen}}{{^isopen}}false{{/isopen}}" aria-controls="drop-down-menu-{{sort}}">
66
                    {{{text}}}
67
                    <span class="ml-auto expanded-icon icon-no-margin mx-2">
68
                        {{#pix}} t/expanded, core {{/pix}}
69
                        <span class="sr-only">
70
                            {{#str}} collapse, core {{/str}}
71
                        </span>
72
                    </span>
73
                    <span class="ml-auto collapsed-icon icon-no-margin mx-2">
74
                        {{#pix}} t/collapsed, core {{/pix}}
75
                        <span class="sr-only">
76
                            {{#str}} expand, core {{/str}}
77
                        </span>
78
                    </span>
79
                </a>
80
                <div class="collapse {{#isopen}}show {{/isopen}}list-group-item p-0 border-0" role="menu" id="drop-down-menu-{{sort}}" aria-labelledby="drop-down-{{sort}}">
81
                    {{#children}}
82
                        {{^divider}}
83
                             <a href="{{{url}}}" class="pl-5 {{^isactive}}bg-light{{/isactive}}{{#isactive}}active{{/isactive}} list-group-item list-group-item-action">{{{text}}}</a>
84
                        {{/divider}}
85
                    {{/children}}
86
                </div>
87
                {{/haschildren}}
88
                {{^haschildren}}
89
                <a href="{{{url}}}" class="list-group-item list-group-item-action {{#isactive}}active{{/isactive}} {{#classes}}{{.}} {{/classes}}" {{#isactive}}aria-current="true"{{/isactive}}>
90
                    {{{text}}}
91
                </a>
92
                {{/haschildren}}
93
            {{/mobileprimarynav}}
94
        </div>
95
    {{/drawercontent}}
96
    {{$drawerstate}}show-drawer-primary{{/drawerstate}}
97
{{/ theme_boost/drawer}}