MDL-62597 Privacy: Request date column should include time
[moodle.git] / admin / tool / dataprivacy / templates / my_data_requests.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/my_data_requests
19
20 A user's data requests page.
21
22 Classes required for JS:
23 * requestactions
24
25 Data attributes required for JS:
26 * none
27
28 Context variables required for this template:
29 * requests - Array of data requests.
30
31 Example context (json):
32 {
33 "requests": [
34 {
35 "id": 1,
36 "typename" : "Data export",
37 "comments": "I would like to download all of my daughter's personal data",
38 "statuslabelclass": "label-default",
39 "statuslabel": "Pending",
40 "timecreated" : 1517902087
41 },
42 {
43 "id": 2,
44 "typename" : "Data export",
45 "comments": "Give me all of the information you have about me, or else...",
46 "statuslabelclass": "label-warning",
47 "statuslabel": "Awaiting completion",
48 "timecreated" : 1517902087
49 },
50 {
51 "id": 3,
52 "typename" : "Data deletion",
53 "comments": "Please delete all of my son's personal data.",
54 "statuslabelclass": "label-success",
55 "statuslabel": "Complete",
56 "timecreated" : 1517902087
57 },
58 {
59 "id": 4,
60 "typename" : "Data deletion",
61 "comments": "Delete my data or I'm coming for you...",
62 "statuslabelclass": "label-danger",
63 "statuslabel": "Rejected",
64 "timecreated" : 1517902087
65 },
66 {
67 "id": 5,
68 "typename" : "Data export",
69 "comments": "Please let me download my data",
70 "statuslabelclass": "label-info",
71 "statuslabel": "Processing",
72 "timecreated" : 1517902087
73 }
74 ]
75 }
76}}
77
be5cc0ba
MH
78{{#httpsite}}
79 {{> core/notification_warning}}
80{{/httpsite}}
81
5efc1f9e
DM
82<div data-region="datarequests">
83 <div class="m-t-1 m-b-1">
84 <a href="{{newdatarequesturl}}" class="btn btn-primary" data-action="new-request">
85 {{#str}}newrequest, tool_dataprivacy{{/str}}
86 </a>
87 </div>
88 <table class="generaltable fullwidth">
89 <thead>
90 <tr>
91 <th scope="col">{{#str}}requesttype, tool_dataprivacy{{/str}}</th>
92 <th scope="col">{{#str}}daterequested, tool_dataprivacy{{/str}}</th>
93 <th scope="col">{{#str}}requeststatus, tool_dataprivacy{{/str}}</th>
94 <th scope="col" colspan="2">{{#str}}message, tool_dataprivacy{{/str}}</th>
95 </tr>
96 </thead>
97 <tbody>
98 {{#requests}}
99 <tr {{!
100 }} data-region="request-node"{{!
101 }} data-id="{{id}}"{{!
102 }} data-type="{{type}}"{{!
103 }} data-status="{{status}}"{{!
104 }}>
105 <td>{{typename}}</td>
430241eb 106 <td>{{#userdate}} {{timecreated}}, {{#str}} strftimedatetime {{/str}} {{/userdate}}</td>
5efc1f9e
DM
107 <td>
108 <span class="label {{statuslabelclass}}">{{statuslabel}}</span>
109 </td>
110 <td>{{comments}}</td>
111 <td>
112 {{#actions}}
113 {{> core/action_menu}}
114 {{/actions}}
115 </td>
116 </tr>
117 {{/requests}}
118 {{^requests}}
119 <tr>
120 <td class="text-muted" colspan="5">
121 {{#str}}nopersonaldatarequests, tool_dataprivacy{{/str}}
122 </td>
123 </tr>
124 {{/requests}}
125 </tbody>
126 </table>
127</div>
128
129{{#js}}
130// Initialise the JS.
131require(['tool_dataprivacy/myrequestactions'], function(ActionsMod) {
132 ActionsMod.init();
133});
134{{/js}}