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/categories
22 Classes required for JS:
24 Data attributes required for JS:
26 Context variables required for this template:
27 * categories - array of objects
28 * actions - array of actions (already in HTML).
30 Example context (json):
35 "name" : "Category 1",
36 "description": "<strong>Description 1</strong>",
40 "name" : "Category 2",
41 "description": "<strong>Description 2</strong>",
50 {{> core/action_link}}
53 <div data-region="categories" class="m-t-3 m-b-1">
54 <h3>{{#str}}categories, tool_dataprivacy{{/str}}</h3>
56 <button class="btn btn-secondary" data-add-element="category">
57 {{#pix}}t/add, moodle, {{#str}}addcategory, tool_dataprivacy{{/str}}{{/pix}}
60 <table class="generaltable fullwidth">
61 <caption class="accesshide">{{#str}}categorieslist, tool_dataprivacy{{/str}}</caption>
64 <th scope="col">{{#str}}name{{/str}}</th>
65 <th scope="col">{{#str}}description{{/str}}</th>
66 <th scope="col">{{#str}}actions{{/str}}</th>
71 <tr data-categoryid="{{id}}">
73 <td>{{{description}}}</td>
76 {{> core/action_menu}}
85 {{#str}}nocategories, tool_dataprivacy{{/str}}