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_courseformat/local/content/bulkedittools
19
 
20
    Displays the bulk actions button in the page header.
21
 
22
    Example context (json):
23
    {
24
        "id": 42,
25
        "hasactions": true,
26
        "actions": [
27
            {
28
                "icon": "i/delete",
29
                "action": "cmDelete",
30
                "name": "delete",
31
                "bulk": "cm",
32
                "title": "Delete activities"
33
            }
34
        ]
35
    }
36
}}
37
{{< core/sticky_footer }}
38
{{$ stickyclasses }} justify-content-between {{/ stickyclasses }}
39
{{$ disable }} data-disable="true" {{/ disable }}
40
{{$ extradata }} data-for="bulkedittools" {{/ extradata }}
41
{{$ stickycontent }}
42
<div class="form-check d-inline-flex align-items-center">
43
    <div class="custom-control custom-switch">
44
        <input type="checkbox" class="custom-control-input" id="selectall" data-for="selectall" disabled>
45
        <label class="custom-control-label" for="selectall">
46
            <span class="custom-control-label--text">{{#str}} selectall {{/str}}</span>
47
        </label>
48
    </div>
49
</div>
50
<div data-for="bulktools">
51
    {{^hasactions}}
52
        {{#str}} nobulkaction, core_courseformat {{/str}}
53
    {{/hasactions}}
54
    {{#hasactions}}
55
        <ul class="actions nav ml-md-3" data-for="bulkactions">
56
            {{#actions}}
57
                <li class="nav-item">
58
                    <button class="btn btn-xs btn-secondary m-1 p-1 d-inline-flex align-items-center" data-action="{{action}}" data-bulk="{{bulk}}" data-for="bulkaction" {{#title}} title="{{title}}" {{/title}}>
59
                        <span class="d-flex align-items-center">{{#pix}}{{icon}}{{/pix}}</span>
60
                        <span class="d-none d-lmd-block">{{name}}</span>
61
                    </button>
62
                </li>
63
            {{/actions}}
64
        </ul>
65
    {{/hasactions}}
66
</div>
67
<div class="d-inline-flex align-items-center">
68
    <div class="ml-auto bulkediting--close">
69
        <div data-for="bulkcount" class="mx-2 badge badge-warning">
70
            {{#str}} bulkselection, core_courseformat, 0 {{/str}}
71
        </div>
72
        <button class="btn btn-icon btn-danger mx-1 d-inline-flex align-items-center" data-action="bulkcancel" data-for="bulkcancel" title="{{#str}} bulkcancel, core_courseformat {{/str}}">
73
            <svg width="24" height="24" fill="none" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
74
                <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M17.25 6.75L6.75 17.25"></path>
75
                <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M6.75 6.75L17.25 17.25"></path>
76
            </svg>
77
        </button>
78
    </div>
79
</div>
80
{{/ stickycontent }}
81
{{/ core/sticky_footer }}
82
{{#js}}
83
    require(['core_courseformat/local/content/bulkedittools'], function(component) {
84
    component.init('[data-for="bulkedittools"]');
85
    });
86
{{/js}}