Proyectos de Subversion Moodle

Rev

Autoría | Ultima modificación | Ver Log |

{{!
    This file is part of Moodle - http://moodle.org/

    Moodle is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    Moodle is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
}}
{{!
    @template core/add_block_button

    Template for the body of the fake 'add block' block.

    Example context (json):
    {
        "link" : "/my/index.php?bui_addblock&bui_blockregion=content&sesskey=M3mes",
        "escapedlink" : "?bui_addblock&bui_blockregion=content&sesskey=M3mes",
        "pageType" : "my-index",
        "pageLayout" : "mydashboard",
        "subPage": "15"
    }

}}
<div class="add_block_button">
    <a href="{{link}}" id="addblock-{{uniqid}}" class="btn btn-link block-add text-left mb-3" data-key="addblock" data-url="{{escapedlink}}">
        <span class="rui-icon-container mr-2">
            <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">
                <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>
                <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>
                <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>
            </svg>
        </span>
        <span>{{#str}}addblock{{/str}}</span>
    </a>
</div>

{{#js}}
    // Initialise the JS for the modal window which displays the blocks available to add.
    require(['core/addblockmodal'], function(addBlockModal) {
        addBlockModal.init('{{pageType}}', '{{pageLayout}}', null, '{{subPage}}');
    });
{{/js}}