MDL-64506 templates: Move BS2 labels to BS4 badges
[moodle.git] / admin / tool / dataprivacy / templates / request_details.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/request_details
19
20 Data request details
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 * foruser Object The context data provided by core_user/external/user_summary_exporter.
30 * reviewurl String The URL for the Review request link.
31 * timecreated Number The timestamp when the request was created.
32 * statuslabel String The text equivalent of the status.
33 * statuslabelclass String The class to be used for rendering the status text.
34 * messagehtml String The HTML version of the request message.
35
36 Example context (json):
37 {
38 "foruser" : {
39 "fullname": "Martha Smith",
40 "email": "martha@example.com",
41 "profileurl": "#",
42 "profileimageurl": "https://randomuser.me/api/portraits/women/60.jpg"
43 },
44 "canreview": true,
45 "reviewurl": "#",
46 "timecreated": 1517561224,
373a09a8
AG
47 "requestedbyuser" : {
48 "fullname": "Martha Smith",
49 "profileurl": "#"
50 },
5efc1f9e 51 "statuslabel": "Pending",
3f2c68f1 52 "statuslabelclass": "badge-secondary",
5efc1f9e
DM
53 "messagehtml": "<p>Hello,</p><p>I would like to download all of my personal data.</p><p>Thanks!</p>"
54 }
55}}
56<div class="container" data-requestid="{{id}}">
57 <div class="media">
58 <div class="media-left">
59 <img class="userpicture" src="{{foruser.profileimageurl}}"
60 alt="{{#str}}pictureof, moodle, {{foruser.fullname}}{{/str}}"
61 title="{{#str}}pictureof, moodle, {{foruser.fullname}}{{/str}}" />
62 </div>
63 <div class="media-body">
64 <h4 class="m-t-0 m-b-1">
65 <a href="{{foruser.profileurl}}" title="{{#str}}viewprofile{{/str}}">{{foruser.fullname}}</a>
66 </h4>
67 <a href="mailto:{{foruser.email}}">{{foruser.email}}</a>
68 <div class="clearfix m-t-1 m-b-1">
69 <span class="pull-left m-r-1">
430241eb 70 <strong>{{#str}}daterequesteddetail, tool_dataprivacy{{/str}}</strong> {{#userdate}} {{timecreated}}, {{#str}} strftimedatetime {{/str}} {{/userdate}}
5efc1f9e
DM
71 </span>
72 <span class="pull-left m-r-1">
73 <strong>{{#str}}statusdetail, tool_dataprivacy{{/str}}</strong>
3f2c68f1 74 <span class="badge {{statuslabelclass}}">{{statuslabel}}</span>
5efc1f9e 75 </span>
373a09a8
AG
76 <span class="pull-left m-r-1">
77 <strong>{{#str}}requestbydetail, tool_dataprivacy{{/str}}</strong>
78 <span><a href="{{requestedbyuser.profileurl}}" title="{{#str}}viewprofile{{/str}}">{{requestedbyuser.fullname}}</a></span>
79 </span>
5efc1f9e
DM
80 </div>
81 {{#canreview}}
29551c4b 82 <!--a href="{{reviewurl}}" class="btn btn-secondary">{{#str}}reviewdata, tool_dataprivacy{{/str}}</a-->
5efc1f9e
DM
83 {{/canreview}}
84 </div>
85 </div>
86 <hr>
87 <div class="m-b-1">
88 <strong>{{#str}}messagelabel, tool_dataprivacy{{/str}}</strong>
89 </div>
90 <div>
91 {{{messagehtml}}}
92 </div>
93</div>