MDL-56582 boost: add some misisng template context
[moodle.git] / theme / boost / templates / columns2.mustache
1 {{!
2     This file is part of Moodle - http://moodle.org/
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.
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.
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
20     Admin time setting template.
22     Boost 2 column layout template.
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.
34     Example context (json):
35     {
36         "sitename": "Moodle",
37         "output": {"doctype": "<!DOCTYPE html>", "page_title": "Test page", "favicon": "favicon.ico"},
38         "bodyattributes":"",
39         "sitepreblocks":"BLOCKS HTML",
40         "hasblocks":true,
41         "navdraweropen":true,
42         "regionmainsettingsmenu": "",
43         "hasregionmainsettingsmenu": false
44     }
45 }}
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>
55 <body {{{ bodyattributes }}}>
57 <div id="page-wrapper">
59     {{{ output.standard_top_of_body_html }}}
61     {{>theme_boost/header}}
63     <div id="page" class="container-fluid">
64         {{{ output.full_header }}}
66         <div id="page-content" class="row">
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>
72                 {{#hasregionmainsettingsmenu}}
73                     <div id="region-main-settings-menu" class="has-blocks">
74                         <div> {{{ regionmainsettingsmenu }}} </div>
75                     </div>
76                 {{/hasregionmainsettingsmenu}}
77                 <section id="region-main" class="has-blocks">
78                 {{/hasblocks}}
79                 {{^hasblocks}}
80                 <div id="region-main-settings-menu">
81                     <div> {{{ output.region_main_settings_menu }}} </div>
82                 </div>
83                 <section id="region-main">
84                 {{/hasblocks}}
85                     <div class="card card-block">
86                     {{#hasregionmainsettingsmenu}}
87                         <div class="region_main_settings_menu_proxy"></div>
88                     {{/hasregionmainsettingsmenu}}
89                     {{{ output.course_content_header }}}
90                     {{{ output.main_content }}}
91                     {{{ output.course_content_footer }}}
92                     </div>
93                 </section>
94             </div>
95         </div>
96     </div>
97     {{> theme_boost/nav-drawer }}
98 </div>
99 <footer id="page-footer" class="p-y-1 bg-inverse">
100     <div class="container">
101         <div id="course-footer">{{{ output.course_footer }}}</div>
103         {{# output.page_doc_link }}
104             <p class="helplink">{{{ output.page_doc_link }}}</p>
105         {{/ output.page_doc_link }}
107         {{{ output.login_info }}}
108         {{{ output.home_link }}}
109         <nav class="nav navbar-nav hidden-lg-up">
110             {{# output.custom_menu_flat }}
111                 <ul class="list-unstyled p-t-1">
112                     {{> theme_boost/custom_menu_footer }}
113                 </ul>
114             {{/ output.custom_menu_flat }}
115         </nav>
116         {{{ output.standard_footer_html }}}
117         {{{ output.standard_end_of_body_html }}}
118     </div>
119 </footer>
121 </body>
122 </html>
123 {{#js}}
124 require(['theme_boost/loader'], function() {});
125 require(['theme_boost/drawer'], function(mod) {mod.init();});
126 {{/js}}