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 core_courseformat/local/content/frontpagesection
|
|
|
19 |
|
|
|
20 |
Displays the frontpage section 1 (site home).
|
|
|
21 |
|
|
|
22 |
Example context (json):
|
|
|
23 |
{
|
1441 |
ariadna |
24 |
"editing": true,
|
1 |
efrain |
25 |
"sections": [
|
|
|
26 |
"<li>This is the section content</li>"
|
|
|
27 |
],
|
|
|
28 |
"showsettings": true,
|
|
|
29 |
"settingsurl": "#"
|
|
|
30 |
}
|
|
|
31 |
}}
|
1441 |
ariadna |
32 |
<div class="course-content" id="courseformat-frontpage-main-topic">
|
1 |
efrain |
33 |
{{#showsettings}}
|
|
|
34 |
<div class="mb-2">
|
|
|
35 |
<a href="{{{settingsurl}}}" title="{{#str}} edit {{/str}}" aria-label="{{#str}} edit {{/str}}">
|
1441 |
ariadna |
36 |
{{#pix}} i/settings, moodle {{/pix}}
|
1 |
efrain |
37 |
</a>
|
|
|
38 |
</div>
|
|
|
39 |
{{/showsettings}}
|
|
|
40 |
<div class="sitetopic">
|
1441 |
ariadna |
41 |
<ul class="topics section-list frontpage" data-for="course_sectionlist">
|
1 |
efrain |
42 |
{{#sections}}
|
|
|
43 |
{{> core_courseformat/local/content/section }}
|
|
|
44 |
{{/sections}}
|
|
|
45 |
</ul>
|
|
|
46 |
</div>
|
|
|
47 |
</div>
|
1441 |
ariadna |
48 |
{{#js}}
|
|
|
49 |
{{! The home page should be as fast as possible, we only load the editor when needed.}}
|
|
|
50 |
{{#editing}}
|
|
|
51 |
require(['core_courseformat/local/content'], function(component) {
|
|
|
52 |
component.init('#courseformat-frontpage-main-topic', {});
|
|
|
53 |
});
|
|
|
54 |
{{/editing}}
|
|
|
55 |
{{/js}}
|