Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
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/addsection
19
 
20
    Displays the add section button inside a course.
21
 
22
    Example context (json):
23
    {
24
        "showaddsection": true,
25
        "id": 42,
26
        "insertafter": true,
27
        "num": 0,
28
        "increase": {
29
            "url": "#"
30
        },
31
        "decrease": {
32
            "url": "#"
33
        },
34
        "addsections": {
35
            "url": "#",
36
            "title": "Add section",
37
            "newsection": 3
38
        }
39
    }
40
}}
41
{{#showaddsection}}
42
<div id="course-addsection" class="changenumsections bulk-hidden mt-5">
43
    {{#increase}}
44
    <a href="{{{url}}}" class="increase-sections">
45
        {{#pix}}t/switch_plus, moodle, {{#str}} increasesections, moodle {{/str}}{{/pix}}
46
    </a>
47
    {{/increase}}
48
    {{#decrease}}
49
    <a href="{{{url}}}" class="reduce-sections">
50
        {{#pix}}t/switch_minus, moodle, {{#str}} reducesections, moodle {{/str}}{{/pix}}
51
    </a>
52
    {{/decrease}}
53
    {{#addsections}}
54
 
55
    <a href="{{{url}}}"
56
        class="btn add-section d-flex justify-content-center align-items-center p-3"
57
        data-add-sections="{{title}}"
58
        data-new-sections="{{newsection}}"
59
        data-action="addSection"
60
        {{#insertafter}} data-id="{{id}}" {{/insertafter}}
61
    >
62
        {{#pix}} t/add, core {{/pix}}
63
        {{title}}
64
    </a>
65
 
66
    {{/addsections}}
67
</div>
68
{{/showaddsection}}