Proyectos de Subversion Moodle

Rev

Rev 1 | | Comparar con el anterior | 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}}
1441 ariadna 54
        <a href="{{{url}}}"
55
           class="w-100 btn add-section justify-content-center align-items-center p-3"
56
           data-add-sections="{{title}}"
57
           data-new-sections="{{newsection}}"
58
           data-action="addSection"
59
            {{#insertafter}} data-id="{{id}}" {{/insertafter}}
60
        >
61
            {{#pix}} t/add, core {{/pix}}
62
            {{title}}
63
        </a>
64
        <div class="d-none p-3 max-section-alert" data-region="max-sections-warning">
65
            <div class="w-100 text-center">
66
                {{#pix}}t/block, moodle{{/pix}}
67
            </div>
68
            <div class="w-100 fst-italic text-center">
69
                {{#str}}maxsectionaddmessage, core_courseformat{{/str}}
70
            </div>
71
        </div>
1 efrain 72
    {{/addsections}}
73
</div>
74
{{/showaddsection}}