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
        "pageType" : "my-index",
27
        "pageLayout" : "mydashboard",
28
        "subPage": "15"
29
    }
30
 
31
}}
32
<div class="add_block_button">
33
    <a href="{{link}}" id="addblock-{{uniqid}}" class="btn btn-link block-add text-left mb-3" data-key="addblock" data-url="{{escapedlink}}">
34
        <span class="rui-icon-container mr-2">
35
            <svg width="24px" height="24px" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" color="currentColor">
36
                <path d="M2 12h3m3 0H5m0 0V9m0 3v3M6.25 6l.245-.28a2 2 0 013.01 0l4.343 4.963a2 2 0 010 2.634L9.505 18.28a2 2 0 01-3.01 0L6.25 18" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>
37
                <path d="M13 19l4.884-5.698a2 2 0 000-2.604L13 5" stroke="currentColor" stroke-opacity="0.6" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>
38
                <path d="M17 19l4.884-5.698a2 2 0 000-2.604L17 5" stroke="currentColor" stroke-opacity="0.2" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>
39
            </svg>
40
        </span>
41
        <span>{{#str}}addblock{{/str}}</span>
42
    </a>
43
</div>
44
 
45
{{#js}}
46
    // Initialise the JS for the modal window which displays the blocks available to add.
47
    require(['core/addblockmodal'], function(addBlockModal) {
48
        addBlockModal.init('{{pageType}}', '{{pageLayout}}', null, '{{subPage}}');
49
    });
50
{{/js}}