MDL-64506 templates: Move BS2 btns' to BS4 btns'
[moodle.git] / admin / tool / dataprivacy / templates / data_deletion.mustache
CommitLineData
5efc1f9e
DM
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 comments.
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 tool_dataprivacy/data_deletion
19
20 Data deletion page.
21
22 Classes required for JS:
23 * none
24
25 Data attributes required for JS:
26 * none
27
28 Context variables required for this template:
29 * filter - The context data for single_select element that has the options for the table filter.
30 * expiredcontexts - The HTML for the table of expired contexts.
31
32 Example context (json):
33 {
34 "filter": {
35 "name": "filter",
36 "method": "get",
37 "action": "#",
38 "classes": "singleselect",
39 "label": "",
40 "disabled": false,
41 "title": null,
42 "formid": "single_select_f5ac5e42bb035319",
43 "id": "single_select5ac5e42bb035320",
44 "params":[],
45 "options":[
46 {"value": 50, "name": "Course", "selected": true, "optgroup": false},
47 {"value": 70, "name": "Activities and resources", "selected":false, "optgroup": false},
48 {"value": 80, "name": "Blocks", "selected": false, "optgroup": false}
49 ],
50 "labelattributes": [],
51 "helpicon": false
52 },
dd26f1be 53 "expiredcontexts": "<table class='table'><tbody><tr><td>This is the table that will contain the list of expired contexts</td></tr></tbody></table>"
5efc1f9e
DM
54 }
55}}
56<div class="container-fluid" data-region="data-deletion">
57 <div class="row" data-region="top-nav">
58 <div class="alert alert-info">
59 {{#str}}datadeletionpagehelp, tool_dataprivacy{{/str}}
60 </div>
61 <div class="pull-left">
62 {{#filter}}
63 {{> core/single_select}}
64 {{/filter}}
65 </div>
66 {{#existingcontexts}}
67 <div class="pull-right">
29551c4b 68 <button data-action="markfordeletion" class="btn btn-secondary">{{#str}}deleteselected, moodle{{/str}}</button>
5efc1f9e
DM
69 </div>
70 {{/existingcontexts}}
71 </div>
72 <div class="row m-t-1 m-b-1" data-region="expired-contexts-table">
73 {{{expiredcontexts}}}
74 </div>
75 <div class="row" data-region="bottom-nav">
76 {{#existingcontexts}}
77 <div class="pull-right">
29551c4b 78 <button data-action="markfordeletion" class="btn btn-secondary">{{#str}}deleteselected, moodle{{/str}}</button>
5efc1f9e
DM
79 </div>
80 {{/existingcontexts}}
81 </div>
82</div>
83{{#js}}
84// Initialise the JS.
85require(['tool_dataprivacy/data_deletion'], function(DataDeletion) {
86 new DataDeletion();
87});
88{{/js}}