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 details.
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/purposes
19
 
20
    Manage purposes.
21
 
22
    Classes required for JS:
23
 
24
    Data attributes required for JS:
25
 
26
    Context variables required for this template:
27
    * purposes - array of objects
28
    * actions - array of actions (already in HTML).
29
 
30
    Example context (json):
31
    {
32
        "purposesexist": 1,
33
        "purposes": [
34
            {
35
                "name" : "Purpose 1",
36
                "description": "<strong>Purpose 1 description</strong>",
37
                "retentionperiod": 86400,
38
                "protected": 1,
39
                "formattedretentionperiod": "1 day",
40
                "actions": [
41
                ]
42
            }, {
43
                "name" : "Purpose 2",
44
                "description": "<strong>Purpose 2 description</strong>",
45
                "retentionperiod": 7200,
46
                "protected": 0,
47
                "formattedretentionperiod": "2 hours",
48
                "actions": [
49
                ]
50
            }
51
        ]
52
    }
53
 
54
}}
55
 
56
{{#navigation}}
57
    <div class="mb-1">
58
        {{> core/action_link}}
59
    </div>
60
{{/navigation}}
61
 
62
<p>
63
  {{#str}}purposeoverview, tool_dataprivacy{{/str}}
64
</p>
65
 
66
<div data-region="purposes" class="mb-1">
67
    <div class="my-1">
68
        <button class="btn btn-secondary" data-add-element="purpose" title="{{#str}}addpurpose, tool_dataprivacy{{/str}}">
69
            {{#pix}}t/add, moodle, {{#str}}addpurpose, tool_dataprivacy{{/str}}{{/pix}}
70
        </button>
71
    </div>
72
    <table class="table table-striped table-hover">
73
        <caption class="accesshide">{{#str}}purposeslist, tool_dataprivacy{{/str}}</caption>
74
        <thead>
75
            <tr>
76
                <th scope="col" class="w-25">{{#str}}name{{/str}}</th>
77
                <th scope="col">{{#str}}lawfulbases, tool_dataprivacy{{/str}}</th>
78
                <th scope="col">{{#str}}sensitivedatareasons, tool_dataprivacy{{/str}}</th>
79
                <th scope="col">{{#str}}retentionperiod, tool_dataprivacy{{/str}}</th>
80
                <th scope="col">{{#str}}protected, tool_dataprivacy{{/str}}</th>
81
                <th scope="col">{{#str}}roleoverrides, tool_dataprivacy{{/str}}</th>
82
                <th scope="col">{{#str}}actions{{/str}}</th>
83
            </tr>
84
        </thead>
85
        <tbody>
86
            {{#purposes}}
87
            <tr data-purposeid="{{id}}">
88
                <td>
89
                    <dl>
90
                        <dt>
91
                            {{{name}}}
92
                        </dt>
93
                        <dd>
94
                            {{{description}}}
95
                        </dd>
96
                    </dl>
97
                </td>
98
                <td>
99
                    <ul class="list-unstyled">
100
                        {{#formattedlawfulbases}}
101
                            <li>
102
                                <span>{{name}}{{# pix }} i/info, core, {{description}} {{/ pix }}</span>
103
                            </li>
104
                        {{/formattedlawfulbases}}
105
                    </ul>
106
                </td>
107
                <td>
108
                    <ul class="list-unstyled">
109
                        {{#formattedsensitivedatareasons}}
110
                            <li>
111
                                <span>{{name}}{{# pix }} i/info, core, {{description}} {{/ pix }}</span>
112
                            </li>
113
                        {{/formattedsensitivedatareasons}}
114
                    </ul>
115
                </td>
116
                <td>{{formattedretentionperiod}}</td>
117
                <td>
118
                    {{#protected}}
119
                        {{#pix}}i/checked, core, {{#str}}yes{{/str}}{{/pix}}
120
                    {{/protected}}
121
                    {{^protected}}
122
                        {{#str}}no{{/str}}
123
                    {{/protected}}
124
                </td>
125
                <td>
126
                    {{#roleoverrides}}
127
                        {{#str}}yes{{/str}}
128
                    {{/roleoverrides}}
129
                    {{^roleoverrides}}
130
                        {{#str}}no{{/str}}
131
                    {{/roleoverrides}}
132
                </td>
133
                <td>
134
                    {{#actions}}
135
                        {{> core/action_menu}}
136
                    {{/actions}}
137
                </td>
138
            </tr>
139
            {{/purposes}}
140
        </tbody>
141
    </table>
142
    {{^purposes}}
143
        <p>
144
            {{#str}}nopurposes, tool_dataprivacy{{/str}}
145
        </p>
146
    {{/purposes}}
147
</div>