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-center bulkactions {{/ stickyclasses }}
|
|
|
39 |
{{$ disable }} data-disable="true" {{/ disable }}
|
|
|
40 |
{{$ extradata }} data-for="bulkedittools" {{/ extradata }}
|
|
|
41 |
{{$ stickycontent }}
|
|
|
42 |
<div class="form-check">
|
|
|
43 |
<input type="checkbox" class="form-check-input" id="selectall" data-for="selectall" disabled>
|
|
|
44 |
<label class="form-check-label" for="selectall">
|
|
|
45 |
{{#str}} selectall {{/str}}
|
|
|
46 |
</label>
|
|
|
47 |
</div>
|
|
|
48 |
<div class="mx-auto" data-for="bulktools">
|
|
|
49 |
{{^hasactions}}
|
|
|
50 |
{{#str}} nobulkaction, core_courseformat {{/str}}
|
|
|
51 |
{{/hasactions}}
|
|
|
52 |
{{#hasactions}}
|
|
|
53 |
<ul class="actions nav" data-for="bulkactions">
|
|
|
54 |
{{#actions}}
|
|
|
55 |
<li class="nav-item">
|
|
|
56 |
<button
|
|
|
57 |
class="btn py-0 d-flex flex-column"
|
|
|
58 |
data-action="{{action}}"
|
|
|
59 |
data-bulk="{{bulk}}"
|
|
|
60 |
data-for="bulkaction"
|
|
|
61 |
{{#title}} title="{{title}}" {{/title}}
|
|
|
62 |
>
|
|
|
63 |
<span class="bulkaction-icon w-100 pl-2">{{#pix}}{{icon}}{{/pix}}</span>
|
|
|
64 |
<span class="bulkaction-name">{{name}}</span>
|
|
|
65 |
</button>
|
|
|
66 |
</li>
|
|
|
67 |
{{/actions}}
|
|
|
68 |
</ul>
|
|
|
69 |
{{/hasactions}}
|
|
|
70 |
</div>
|
|
|
71 |
<div class="d-flex flex-column">
|
|
|
72 |
<div class="bulkcancel ml-auto">
|
|
|
73 |
<button
|
|
|
74 |
class="btn pr-0 pb-0"
|
|
|
75 |
data-action="bulkcancel"
|
|
|
76 |
data-for="bulkcancel"
|
|
|
77 |
title="{{#str}} bulkcancel, core_courseformat {{/str}}"
|
|
|
78 |
>
|
|
|
79 |
{{#pix}} e/cancel, core {{/pix}}
|
|
|
80 |
</button>
|
|
|
81 |
</div>
|
|
|
82 |
<div class="bulkcount" data-for="bulkcount">
|
|
|
83 |
{{#str}} bulkselection, core_courseformat, 0 {{/str}}
|
|
|
84 |
</div>
|
|
|
85 |
</div>
|
|
|
86 |
{{/ stickycontent }}
|
|
|
87 |
{{/ core/sticky_footer }}
|
|
|
88 |
{{#js}}
|
|
|
89 |
require(['core_courseformat/local/content/bulkedittools'], function(component) {
|
|
|
90 |
component.init('[data-for="bulkedittools"]');
|
|
|
91 |
});
|
|
|
92 |
{{/js}}
|