fc35c91557b98fc9c5c3b699283c6006be493e9c
[moodle.git] / admin / tool / dataprivacy / templates / request_details.mustache
1 {{!
2     This file is part of Moodle - http://moodle.org/
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.
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.
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
20     Data request details
22     Classes required for JS:
23     * none
25     Data attributes required for JS:
26     * none
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.
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,
47         "requestedbyuser" : {
48             "fullname": "Martha Smith",
49             "profileurl": "#"
50         },
51         "statuslabel": "Pending",
52         "statuslabelclass": "badge-secondary",
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="mt-0 mb-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 mt-1 mb-1">
69             <span class="pull-left mr-1">
70                 <strong>{{#str}}daterequesteddetail, tool_dataprivacy{{/str}}</strong> {{#userdate}} {{timecreated}}, {{#str}} strftimedatetime {{/str}} {{/userdate}}
71             </span>
72                 <span class="pull-left mr-1">
73                 <strong>{{#str}}statusdetail, tool_dataprivacy{{/str}}</strong>
74                 <span class="badge {{statuslabelclass}}">{{statuslabel}}</span>
75             </span>
76             <span class="pull-left mr-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>
80             </div>
81             {{#canreview}}
82                 <!--a href="{{reviewurl}}" class="btn btn-secondary">{{#str}}reviewdata, tool_dataprivacy{{/str}}</a-->
83             {{/canreview}}
84         </div>
85     </div>
86     <hr>
87     <div class="mb-1">
88         <strong>{{#str}}messagelabel, tool_dataprivacy{{/str}}</strong>
89     </div>
90     <div>
91         {{{messagehtml}}}
92     </div>
93 </div>