Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
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 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,
47
        "requestedbyuser" : {
48
            "fullname": "Martha Smith",
49
            "profileurl": "#"
50
        },
51
        "statuslabel": "Pending",
52
        "statuslabelclass": "bg-secondary text-dark",
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="d-flex">
58
        <div class="flex-shrink-0">
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="flex-grow-1 ml-3">
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="float-left mr-1">
70
                <strong>{{#str}}daterequesteddetail, tool_dataprivacy{{/str}}</strong>
71
                {{#userdate}} {{timecreated}}, {{#str}} strftimedatetime, core_langconfig {{/str}} {{/userdate}}
72
            </span>
73
                <span class="float-left mr-1">
74
                <strong>{{#str}}statusdetail, tool_dataprivacy{{/str}}</strong>
75
                <span class="badge {{statuslabelclass}}">{{statuslabel}}</span>
76
            </span>
77
            <span class="float-left mr-1">
78
                <strong>{{#str}}requestbydetail, tool_dataprivacy{{/str}}</strong>
79
                <span><a href="{{requestedbyuser.profileurl}}" title="{{#str}}viewprofile{{/str}}">{{requestedbyuser.fullname}}</a></span>
80
            </span>
81
            </div>
82
            {{#canreview}}
83
                <!--a href="{{reviewurl}}" class="btn btn-secondary">{{#str}}reviewdata, tool_dataprivacy{{/str}}</a-->
84
            {{/canreview}}
85
        </div>
86
    </div>
87
    <hr>
88
    <div class="mb-1">
89
        <strong>{{#str}}messagelabel, tool_dataprivacy{{/str}}</strong>
90
    </div>
91
    <div>
92
        {{{messagehtml}}}
93
    </div>
94
</div>