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/add_block_button
19
 
20
    Template for the body of the fake 'add block' block.
21
 
22
    Example context (json):
23
    {
24
        "link" : "/my/index.php?bui_addblock&bui_blockregion=content&sesskey=M3mes",
25
        "escapedlink" : "?bui_addblock&bui_blockregion=content&sesskey=M3mes",
26
        "pagehash": "abcdefgh",
27
        "blockregion": "side-pre"
28
    }
29
 
30
}}
31
<div class="add_block_button">
32
    <a href="{{link}}" id="addblock-{{uniqid}}" class="btn btn-link block-add text-left mb-3" data-key="addblock"
33
            data-url="{{escapedlink}}" data-blockregion="{{blockregion}}">
34
        <i class="fa fa-plus py-2 mr-3" aria-hidden="true"></i>{{#str}}addblock{{/str}}
35
    </a>
36
</div>
37
 
38
{{#js}}
39
    // Initialise the JS for the modal window which displays the blocks available to add.
40
    require(['core_block/add_modal'], function(addBlockModal) {
41
        addBlockModal.init(null, '{{pagehash}}');
42
    });
43
{{/js}}