Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 1441
Línea 19... Línea 19...
19
 
19
 
Línea 20... Línea 20...
20
    Displays the frontpage section 1 (site home).
20
    Displays the frontpage section 1 (site home).
21
 
21
 
-
 
22
    Example context (json):
22
    Example context (json):
23
    {
23
    {
24
        "editing": true,
24
        "sections": [
25
        "sections": [
25
            "<li>This is the section content</li>"
26
            "<li>This is the section content</li>"
26
        ],
27
        ],
27
        "showsettings": true,
28
        "showsettings": true,
28
        "settingsurl": "#"
29
        "settingsurl": "#"
29
    }
30
    }
30
}}
31
}}
31
<div class="course-content">
32
<div class="course-content" id="courseformat-frontpage-main-topic">
32
    {{#showsettings}}
33
    {{#showsettings}}
33
    <div class="mb-2">
34
    <div class="mb-2">
34
        <a href="{{{settingsurl}}}" title="{{#str}} edit {{/str}}" aria-label="{{#str}} edit {{/str}}">
35
        <a href="{{{settingsurl}}}" title="{{#str}} edit {{/str}}" aria-label="{{#str}} edit {{/str}}">
35
            {{#pix}} t/edit, moodle {{/pix}}
36
            {{#pix}} i/settings, moodle {{/pix}}
36
        </a>
37
        </a>
37
    </div>
38
    </div>
38
    {{/showsettings}}
39
    {{/showsettings}}
39
    <div class="sitetopic">
40
    <div class="sitetopic">
40
        <ul class="topics frontpage">
41
        <ul class="topics section-list frontpage" data-for="course_sectionlist">
41
            {{#sections}}
42
            {{#sections}}
42
                {{> core_courseformat/local/content/section }}
43
                {{> core_courseformat/local/content/section }}
43
            {{/sections}}
44
            {{/sections}}
44
        </ul>
45
        </ul>
-
 
46
    </div>
-
 
47
</div>
-
 
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
});