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 |
@template theme_boost/drawers
|
|
|
19 |
|
|
|
20 |
Boost drawer template.
|
|
|
21 |
|
|
|
22 |
Context variables required for this template:
|
|
|
23 |
* sitename - The name of the site
|
|
|
24 |
* output - The core renderer for the page
|
|
|
25 |
* bodyattributes - attributes for the body tag as a string of html attributes
|
|
|
26 |
* sidepreblocks - HTML for the blocks
|
|
|
27 |
* hasblocks - true if there are blocks on this page
|
|
|
28 |
* courseindexopen - true if the nav drawer should be open on page load
|
|
|
29 |
* regionmainsettingsmenu - HTML for the region main settings menu
|
|
|
30 |
* hasregionmainsettingsmenu - There is a region main settings menu on this page.
|
|
|
31 |
|
|
|
32 |
Example context (json):
|
|
|
33 |
{
|
|
|
34 |
"sitename": "Moodle",
|
|
|
35 |
"output": {
|
|
|
36 |
"doctype": "<!DOCTYPE html>",
|
|
|
37 |
"page_title": "Test page",
|
|
|
38 |
"favicon": "favicon.ico",
|
|
|
39 |
"main_content": "<h1>Headings make html validators happier</h1>"
|
|
|
40 |
},
|
|
|
41 |
"bodyattributes":"",
|
|
|
42 |
"sidepreblocks": "<h2>Blocks html goes here</h2>",
|
|
|
43 |
"hasblocks":true,
|
|
|
44 |
"courseindexopen": true,
|
|
|
45 |
"navdraweropen": false,
|
|
|
46 |
"blockdraweropen": true,
|
|
|
47 |
"regionmainsettingsmenu": "",
|
|
|
48 |
"hasregionmainsettingsmenu": false,
|
|
|
49 |
"addblockbutton": ""
|
|
|
50 |
}
|
|
|
51 |
}}
|
|
|
52 |
{{> theme_boost/head }}
|
|
|
53 |
|
|
|
54 |
<body {{{ bodyattributes }}}>
|
|
|
55 |
{{> core/local/toast/wrapper}}
|
|
|
56 |
<div id="page-wrapper" class="d-print-block">
|
|
|
57 |
|
|
|
58 |
{{{ output.standard_top_of_body_html }}}
|
|
|
59 |
|
|
|
60 |
{{> theme_boost/navbar }}
|
|
|
61 |
{{#courseindex}}
|
|
|
62 |
{{< theme_boost/drawer }}
|
|
|
63 |
{{$id}}theme_boost-drawers-courseindex{{/id}}
|
|
|
64 |
{{$drawerheadercontent}}
|
|
|
65 |
{{> theme_boost/courseindexdrawercontrols}}
|
|
|
66 |
{{/drawerheadercontent}}
|
|
|
67 |
{{$drawerclasses}}drawer drawer-left {{#courseindexopen}}show{{/courseindexopen}}{{/drawerclasses}}
|
|
|
68 |
{{$drawercontent}}
|
|
|
69 |
{{{courseindex}}}
|
|
|
70 |
{{/drawercontent}}
|
|
|
71 |
{{$drawerpreferencename}}drawer-open-index{{/drawerpreferencename}}
|
|
|
72 |
{{$drawerstate}}show-drawer-left{{/drawerstate}}
|
|
|
73 |
{{$tooltipplacement}}right{{/tooltipplacement}}
|
|
|
74 |
{{$closebuttontext}}{{#str}}closecourseindex, core{{/str}}{{/closebuttontext}}
|
|
|
75 |
{{/ theme_boost/drawer}}
|
|
|
76 |
{{/courseindex}}
|
|
|
77 |
{{#hasblocks}}
|
|
|
78 |
{{< theme_boost/drawer }}
|
|
|
79 |
{{$id}}theme_boost-drawers-blocks{{/id}}
|
|
|
80 |
{{$drawerclasses}}drawer drawer-right{{#blockdraweropen}} show{{/blockdraweropen}}{{/drawerclasses}}
|
|
|
81 |
{{$drawercontent}}
|
|
|
82 |
<section class="d-print-none" aria-label="{{#str}}blocks{{/str}}">
|
|
|
83 |
{{{ addblockbutton }}}
|
|
|
84 |
{{{ sidepreblocks }}}
|
|
|
85 |
</section>
|
|
|
86 |
{{/drawercontent}}
|
|
|
87 |
{{$drawerpreferencename}}drawer-open-block{{/drawerpreferencename}}
|
|
|
88 |
{{$forceopen}}{{#forceblockdraweropen}}1{{/forceblockdraweropen}}{{/forceopen}}
|
|
|
89 |
{{$drawerstate}}show-drawer-right{{/drawerstate}}
|
|
|
90 |
{{$tooltipplacement}}left{{/tooltipplacement}}
|
|
|
91 |
{{$drawercloseonresize}}1{{/drawercloseonresize}}
|
|
|
92 |
{{$closebuttontext}}{{#str}}closeblockdrawer, core{{/str}}{{/closebuttontext}}
|
|
|
93 |
{{/ theme_boost/drawer}}
|
|
|
94 |
{{/hasblocks}}
|
|
|
95 |
<div id="page" data-region="mainpage" data-usertour="scroller" class="drawers {{#courseindexopen}}show-drawer-left{{/courseindexopen}} {{#blockdraweropen}}show-drawer-right{{/blockdraweropen}} drag-container">
|
|
|
96 |
<div id="topofscroll" class="main-inner">
|
|
|
97 |
<div class="drawer-toggles d-flex">
|
|
|
98 |
{{#courseindex}}
|
|
|
99 |
<div class="drawer-toggler drawer-left-toggle open-nav d-print-none">
|
|
|
100 |
<button
|
|
|
101 |
class="btn icon-no-margin"
|
|
|
102 |
data-toggler="drawers"
|
|
|
103 |
data-action="toggle"
|
|
|
104 |
data-target="theme_boost-drawers-courseindex"
|
|
|
105 |
data-toggle="tooltip"
|
|
|
106 |
data-placement="right"
|
|
|
107 |
title="{{#str}}opendrawerindex, core{{/str}}"
|
|
|
108 |
>
|
|
|
109 |
<span class="sr-only">{{#str}}opendrawerindex, core{{/str}}</span>
|
|
|
110 |
{{#pix}} t/index_drawer, moodle {{/pix}}
|
|
|
111 |
</button>
|
|
|
112 |
</div>
|
|
|
113 |
{{/courseindex}}
|
|
|
114 |
{{#hasblocks}}
|
|
|
115 |
<div class="drawer-toggler drawer-right-toggle ml-auto d-print-none">
|
|
|
116 |
<button
|
|
|
117 |
class="btn icon-no-margin"
|
|
|
118 |
data-toggler="drawers"
|
|
|
119 |
data-action="toggle"
|
|
|
120 |
data-target="theme_boost-drawers-blocks"
|
|
|
121 |
data-toggle="tooltip"
|
|
|
122 |
data-placement="right"
|
|
|
123 |
title="{{#str}}opendrawerblocks, core{{/str}}"
|
|
|
124 |
>
|
|
|
125 |
<span class="sr-only">{{#str}}opendrawerblocks, core{{/str}}</span>
|
|
|
126 |
<span class="dir-rtl-hide">{{#pix}}t/blocks_drawer, core{{/pix}}</span>
|
|
|
127 |
<span class="dir-ltr-hide">{{#pix}}t/blocks_drawer_rtl, core{{/pix}}</span>
|
|
|
128 |
</button>
|
|
|
129 |
</div>
|
|
|
130 |
{{/hasblocks}}
|
|
|
131 |
</div>
|
|
|
132 |
{{{ output.full_header }}}
|
|
|
133 |
{{#secondarymoremenu}}
|
|
|
134 |
<div class="secondary-navigation d-print-none">
|
|
|
135 |
{{> core/moremenu}}
|
|
|
136 |
</div>
|
|
|
137 |
{{/secondarymoremenu}}
|
|
|
138 |
<div id="page-content" class="pb-3 d-print-block">
|
|
|
139 |
<div id="region-main-box">
|
|
|
140 |
{{#hasregionmainsettingsmenu}}
|
|
|
141 |
<div id="region-main-settings-menu" class="d-print-none">
|
|
|
142 |
<div> {{{ regionmainsettingsmenu }}} </div>
|
|
|
143 |
</div>
|
|
|
144 |
{{/hasregionmainsettingsmenu}}
|
|
|
145 |
<section id="region-main" aria-label="{{#str}}content{{/str}}">
|
|
|
146 |
|
|
|
147 |
{{#hasregionmainsettingsmenu}}
|
|
|
148 |
<div class="region_main_settings_menu_proxy"></div>
|
|
|
149 |
{{/hasregionmainsettingsmenu}}
|
|
|
150 |
{{{ output.course_content_header }}}
|
|
|
151 |
{{#headercontent}}
|
|
|
152 |
{{> core/activity_header }}
|
|
|
153 |
{{/headercontent}}
|
|
|
154 |
{{#overflow}}
|
|
|
155 |
<div class="container-fluid tertiary-navigation">
|
|
|
156 |
<div class="navitem">
|
|
|
157 |
{{> core/url_select}}
|
|
|
158 |
</div>
|
|
|
159 |
</div>
|
|
|
160 |
{{/overflow}}
|
|
|
161 |
{{{ output.main_content }}}
|
|
|
162 |
{{{ output.activity_navigation }}}
|
|
|
163 |
{{{ output.course_content_footer }}}
|
|
|
164 |
|
|
|
165 |
</section>
|
|
|
166 |
</div>
|
|
|
167 |
</div>
|
|
|
168 |
</div>
|
|
|
169 |
{{> theme_boost/footer }}
|
|
|
170 |
</div>
|
|
|
171 |
{{{ output.standard_after_main_region_html }}}
|
|
|
172 |
</div>
|
|
|
173 |
|
|
|
174 |
</body>
|
|
|
175 |
</html>
|
|
|
176 |
{{#js}}
|
|
|
177 |
M.util.js_pending('theme_boost/loader');
|
|
|
178 |
require(['theme_boost/loader', 'theme_boost/drawer'], function(Loader, Drawer) {
|
|
|
179 |
Drawer.init();
|
|
|
180 |
M.util.js_complete('theme_boost/loader');
|
|
|
181 |
});
|
|
|
182 |
{{/js}}
|