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 unilabeltype_topicteaser/grid
19
    Template to show a bootstrap modal dialog.
20
 
21
    Example context (json):
22
    {
23
        "title": "TEST copy 1",
24
        "showintro": false,
25
        "intro": "",
26
        "interval": "5",
27
        "height": 300,
28
        "items": [
29
            {
30
                "name": "Topic 1",
31
                "section": "1",
32
                "viewurl": "https://url-to-view",
33
                "summary": "",
34
                "cmlist": "<ul class=\"section img-text\"><\/ul>",
35
                "nr": 0,
36
                "first": true
37
            },
38
            {
39
                "name": "Topic 2",
40
                "section": "2",
41
                "viewurl": "https://url-to-view",
42
                "summary": "",
43
                "cmlist": "<ul class=\"section img-text\"><\/ul>",
44
                "nr": 1
45
            }
46
        ],
47
        "hasitems": true,
48
        "openmodal": true,
49
        "opencourseurl": false,
50
        "cmid": "55"
51
    }
52
}}
53
 
54
{{> unilabeltype_topicteaser/intro }}
55
{{#hasitems}}
56
    <div class="row mx-0">
57
        {{#items}}
58
            <div class="text-center {{{colclasses}}}">
59
                <!-- The overlay is used as button to show the modal dialog -->
60
                <a href="{{{viewurl}}}"{{#openmodal}} data-toggle="modal" data-target="#topicteaser-modal-{{cmid}}-{{nr}}"{{/openmodal}}>
61
                    <div class="unilabel-overlay-effect bg-primary h-100 w-100"></div>
62
                </a>
63
                <h3>{{name}}</h3>
64
                {{{summary}}}
65
            </div>
66
        {{/items}}
67
    </div>
68
 
69
    {{#openmodal}}
70
        {{#items}}
71
            {{> unilabeltype_topicteaser/dialog }}
72
        {{/items}}
73
    {{/openmodal}}
74
 
75
{{/hasitems}}
76
 
77
{{^hasitems}}
78
    <span>{{#str}} nocontent , unilabeltype_topicteaser {{/str}}</span>
79
{{/hasitems}}