MDL-56582 boost: add some misisng template context
[moodle.git] / theme / boost / templates / columns2.mustache
CommitLineData
d8cfd611
DW
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 theme_boost/columns2
19
20 Admin time setting template.
21
22 Boost 2 column layout template.
23
24 Context variables required for this template:
25 * sitename - The name of the site
26 * output - The core renderer for the page
27 * bodyattributes - attributes for the body tag as a string of html attributes
28 * sidepreblocks - HTML for the blocks
29 * hasblocks - true if there are blocks on this page
30 * navdraweropen - true if the nav drawer should be open on page load
31 * regionmainsettingsmenu - HTML for the region main settings menu
32 * hasregionmainsettingsmenu - There is a region main settings menu on this page.
33
34 Example context (json):
35 {
36 "sitename": "Moodle",
867dc76f 37 "output": {"doctype": "<!DOCTYPE html>", "page_title": "Test page", "favicon": "favicon.ico"},
d8cfd611
DW
38 "bodyattributes":"",
39 "sitepreblocks":"BLOCKS HTML",
40 "hasblocks":true,
41 "navdraweropen":true,
42 "regionmainsettingsmenu": "",
43 "hasregionmainsettingsmenu": false
44 }
45}}
536f0460
DW
46{{{ output.doctype }}}
47<html {{{ output.htmlattributes }}}>
48<head>
49 <title>{{ output.page_title }}</title>
50 <link rel="shortcut icon" href="{{{ output.favicon }}}" />
51 {{{ output.standard_head_html }}}
52 <meta name="viewport" content="width=device-width, initial-scale=1.0">
53</head>
54
99061152 55<body {{{ bodyattributes }}}>
536f0460 56
2668487e 57<div id="page-wrapper">
536f0460 58
2668487e 59 {{{ output.standard_top_of_body_html }}}
b71c82ad 60
2ede86d7 61 {{>theme_boost/header}}
536f0460 62
99061152 63 <div id="page" class="container-fluid">
2668487e 64 {{{ output.full_header }}}
536f0460 65
2668487e 66 <div id="page-content" class="row">
0a58ec24
DW
67 <div id="region-main-box" class="col-xs-12">
68 {{#hasblocks}}
69 <section data-region="blocks-column" class="hidden-md-down">
70 {{{ sidepreblocks }}}
71 </section>
d8cfd611
DW
72 {{#hasregionmainsettingsmenu}}
73 <div id="region-main-settings-menu" class="has-blocks">
74 <div> {{{ regionmainsettingsmenu }}} </div>
75 </div>
76 {{/hasregionmainsettingsmenu}}
0a58ec24
DW
77 <section id="region-main" class="has-blocks">
78 {{/hasblocks}}
79 {{^hasblocks}}
11774d90
DW
80 <div id="region-main-settings-menu">
81 <div> {{{ output.region_main_settings_menu }}} </div>
82 </div>
0a58ec24
DW
83 <section id="region-main">
84 {{/hasblocks}}
85 <div class="card card-block">
d8cfd611
DW
86 {{#hasregionmainsettingsmenu}}
87 <div class="region_main_settings_menu_proxy"></div>
88 {{/hasregionmainsettingsmenu}}
99061152
DW
89 {{{ output.course_content_header }}}
90 {{{ output.main_content }}}
91 {{{ output.course_content_footer }}}
0a58ec24 92 </div>
99061152 93 </section>
1ecc3daf 94 </div>
536f0460 95 </div>
2668487e 96 </div>
99061152 97 {{> theme_boost/nav-drawer }}
536f0460 98</div>
b45fdc68 99<footer id="page-footer" class="p-y-1 bg-inverse">
428de3dc 100 <div class="container">
2668487e
FM
101 <div id="course-footer">{{{ output.course_footer }}}</div>
102
103 {{# output.page_doc_link }}
104 <p class="helplink">{{{ output.page_doc_link }}}</p>
105 {{/ output.page_doc_link }}
106
107 {{{ output.login_info }}}
108 {{{ output.home_link }}}
b45fdc68
DW
109 <nav class="nav navbar-nav hidden-lg-up">
110 {{# output.custom_menu_flat }}
c6d9d29d
DW
111 <ul class="list-unstyled p-t-1">
112 {{> theme_boost/custom_menu_footer }}
113 </ul>
b45fdc68
DW
114 {{/ output.custom_menu_flat }}
115 </nav>
2668487e
FM
116 {{{ output.standard_footer_html }}}
117 {{{ output.standard_end_of_body_html }}}
118 </div>
126e1b24 119</footer>
126e1b24 120
536f0460 121</body>
d2645a6a
DW
122</html>
123{{#js}}
2ede86d7 124require(['theme_boost/loader'], function() {});
99061152 125require(['theme_boost/drawer'], function(mod) {mod.init();});
d2645a6a 126{{/js}}