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/navbar
20
 
21
    This template renders the top navbar.
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
            "custom_menu": "<li>..</li>",
29
            "page_heading_menu": "<li>..</li>",
30
            "search_box": "<div><input type='text'></div>",
31
            "navbar_plugin_output": "<div class='dropdown'>Messaging</div>",
32
            "user_menu": "<div class='dropdown'>John Doe</div>"
33
        },
34
        "config": {
35
            "wwwroot": "#",
36
            "homeurl": "/my/"
37
        },
38
        "sitename": "Moodle Site",
39
        "mobileprimarynav": [
40
            {
41
                "text": "Dashboard",
42
                "url": "/my",
43
                "isactive": true
44
            },
45
            {
46
                "text": "Site home",
47
                "url": "/",
48
                "isactive": false
49
            },
50
            {
51
                "text": "My courses",
52
                "url": "/course",
53
                "isactive": false
54
            }
55
        ]
56
    }
57
}}
58
<nav class="navbar fixed-top navbar-light bg-white navbar-expand" aria-label="{{#str}}sitemenubar, admin{{/str}}">
59
    <div class="container-fluid">
60
        <button class="navbar-toggler aabtn d-block d-md-none px-1 my-1 border-0" data-toggler="drawers" data-action="toggle" data-target="theme_boost-drawers-primary">
61
            <span class="navbar-toggler-icon"></span>
62
            <span class="sr-only">{{#str}}sidepanel, core{{/str}}</span>
63
        </button>
64
 
65
        <a href="{{{ config.homeurl }}}" class="navbar-brand d-none d-md-flex align-items-center m-0 mr-4 p-0 aabtn">
66
 
67
            {{# output.should_display_navbar_logo }}
68
                <img src="{{output.get_compact_logo_url}}" class="logo mr-1" alt="{{sitename}}">
69
            {{/ output.should_display_navbar_logo }}
70
            {{^ output.should_display_navbar_logo }}
71
                {{{ sitename }}}
72
            {{/ output.should_display_navbar_logo }}
73
        </a>
74
        {{#primarymoremenu}}
75
            <div class="primary-navigation">
76
                {{> core/moremenu}}
77
            </div>
78
        {{/primarymoremenu}}
79
 
80
        <ul class="navbar-nav d-none d-md-flex my-1 px-1">
81
            <!-- page_heading_menu -->
82
            {{{ output.page_heading_menu }}}
83
        </ul>
84
 
85
        <div id="usernavigation" class="navbar-nav ml-auto">
86
            {{# output.search_box }}
87
                {{{ output.search_box }}}
88
                <div class="divider border-left h-75 align-self-center mx-1"></div>
89
            {{/output.search_box}}
90
            {{#langmenu}}
91
                {{> theme_boost/language_menu }}
92
                <div class="divider border-left h-75 align-self-center mx-1"></div>
93
            {{/langmenu}}
94
            {{{ output.navbar_plugin_output }}}
95
            <div class="d-flex align-items-stretch usermenu-container" data-region="usermenu">
96
                {{#usermenu}}
97
                    {{> core/user_menu }}
98
                {{/usermenu}}
99
            </div>
100
            {{{ output.edit_switch }}}
101
        </div>
102
    </div>
103
</nav>
104
 
105
{{> theme_boost/primary-drawer-mobile }}