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 details.
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/>.
18 @template tool_dataprivacy/purposes
22 Classes required for JS:
24 Data attributes required for JS:
26 Context variables required for this template:
27 * purposes - array of objects
28 * actions - array of actions (already in HTML).
30 Example context (json):
36 "description": "<strong>Purpose 1 description</strong>",
37 "retentionperiod": 86400,
39 "formattedretentionperiod": "1 day",
44 "description": "<strong>Purpose 2 description</strong>",
45 "retentionperiod": 7200,
47 "formattedretentionperiod": "2 hours",
57 {{> core/action_link}}
60 <div data-region="purposes" class="m-t-3 m-b-1">
61 <h3>{{#str}}purposes, tool_dataprivacy{{/str}}</h3>
63 <button class="btn btn-secondary" data-add-element="purpose">
64 {{#pix}}t/add, moodle, {{#str}}addpurpose, tool_dataprivacy{{/str}}{{/pix}}
67 <table class="generaltable fullwidth">
68 <caption class="accesshide">{{#str}}purposeslist, tool_dataprivacy{{/str}}</caption>
71 <th scope="col">{{#str}}name{{/str}}</th>
72 <th scope="col">{{#str}}description{{/str}}</th>
73 <th scope="col">{{#str}}lawfulbases, tool_dataprivacy{{/str}}</th>
74 <th scope="col">{{#str}}sensitivedatareasons, tool_dataprivacy{{/str}}</th>
75 <th scope="col">{{#str}}retentionperiod, tool_dataprivacy{{/str}}</th>
76 <th scope="col">{{#str}}protected, tool_dataprivacy{{/str}}</th>
77 <th scope="col">{{#str}}actions{{/str}}</th>
82 <tr data-purposeid="{{id}}">
84 <td>{{{description}}}</td>
87 {{#formattedlawfulbases}}
89 <span>{{name}}{{# pix }} i/info, core, {{description}} {{/ pix }}</span>
91 {{/formattedlawfulbases}}
96 {{#formattedsensitivedatareasons}}
98 <span>{{name}}{{# pix }} i/info, core, {{description}} {{/ pix }}</span>
100 {{/formattedsensitivedatareasons}}
103 <td>{{formattedretentionperiod}}</td>
106 {{#pix}}i/checked, core, {{#str}}yes{{/str}}{{/pix}}
114 {{> core/action_menu}}
123 {{#str}}nopurposes, tool_dataprivacy{{/str}}