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 mod_unilabel/element_action_buttons
    Template to get the action buttons for a draggable element.

    Example context (json):
    {
        "type": "grid",
        "repeatindex": 1,
        "repeatnr": 2
    }
}}

<span class="ml-auto"><!-- A dummy to move the buttons to the right side. --></span>
<span>
    <i class="fa fa-arrows fa-fw draghandle"></i>
</span>
<a href="#" class="delete-button">
    <i class="fa fa-trash fa-fw text-danger" data-toggle="modal" data-target="#unilabel_{{type}}_confirm_{{repeatindex}}"></i>
    <span class="sr-only">{{#str}} delete_element, mod_unilabel {{/str}}-{{repeatnr}}</span>
</a>
<div id="unilabel_{{type}}_confirm_{{repeatindex}}" class="modal" tabindex="-1">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title">
                    {{#str}}confirm{{/str}}
                </h5>
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">×</span>
                </button>
            </div>
            <div class="modal-body">
                {{#str}} delete_element_nr, mod_unilabel, {{repeatnr}} {{/str}}
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-secondary" data-dismiss="modal">{{#str}} no {{/str}}</button>
                <button type="button" class="btn btn-primary" data-dismiss="modal" data-action="deleteelement" data-id="{{repeatindex}}">{{#str}} yes {{/str}}</button>
            </div>
        </div>
    </div>
</div>