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 block_multiblock/columns-3equal
19
 
20
    This template shows the multiple blocks in a two-column layout (equal width)
21
 
22
    Example context (json):
23
    {
24
        "multiblockid": 28,
25
        "multiblock": [
26
            {
27
                "id": 1,
28
                "title": "Block 1",
29
                "content": "<p>Block 1</p>",
30
                "footer": "My footer",
31
                "active": true
32
            },
33
            {
34
                "id": 2,
35
                "title": "Block 2",
36
                "content": "<p>Block 2</p>",
37
                "footer": "",
38
                "active": false
39
            },
40
            {
41
                "id": 3,
42
                "title": "Block 3",
43
                "content": "<p>Block 3</p>",
44
                "footer": "",
45
                "active": false
46
            }
47
        ]
48
    }
49
}}
50
<div class="multiblock multiblock-columns-3 multiblock-columns-3equal mt-5">
51
    <div class="container">
52
        <div class="row">
53
            {{#multiblock}}
54
            <div class="col-md-4">
55
                <section id="inst{{id}}" class="block block_{{type}} card mb-3 h-100">
56
                    <div class="card-body p-0">
57
                        {{#title}}
58
                            <h5 id="instance-{{id}}-header" class="card-title d-inline">{{{title}}}</h5>
59
                        {{/title}}
60
                        <div class="card-text content p-0 m-0{{#title}} mt-3{{/title}}">
61
                            {{{content}}}
62
                            <div class="footer">{{{footer}}}</div>
63
                            {{{annotation}}}
64
                        </div>
65
                    </div>
66
                </section>
67
            </div>
68
            {{/multiblock}}
69
        </div>
70
    </div>
71
</div>
72
{{#js}}
73
require(['jquery'], function($) {
74
    $('#inst{{multiblockid}}').addClass('multiblock-columns-3-parent');
75
});
76
{{/js}}