2 This file is part of Moodle - http://moodle.org/
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.
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.
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/>.
18 @template core/add_block_button
20 Template for the body of the fake 'add block' block.
22 Example context (json):
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",
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 <i class="fa fa-plus py-2 mr-3" aria-hidden="true"></i>{{#str}}addblock{{/str}}
39 // Initialise the JS for the modal window which displays the blocks available to add.
40 require(['core/addblockmodal'], function(addBlockModal) {
41 addBlockModal.init('{{pageType}}', '{{pageLayout}}', null, '{{subPage}}');