You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

75 lines
2.4 KiB

{{!
This file is part of Moodle - http://moodle.org/
Moodle is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Moodle is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
@template tool_dataprivacy/defaults_display
Renders the current default category and purpose.
Classes required for JS:
Data attributes required for JS:
Context variables required for this template:
* contextlevel Number - The context level.
* categoryid Number - The category ID.
* purposeid Number - The purpose ID.
* category String - The category name.
* purpose String - The purpose name.
* canedit Boolean - Whether this is being rendered for editing purposes.
Example context (json):
{
"category": "Awesome default category",
"categoryid": 1,
"purpose": "Awesome default purpose",
"purposeid": 2,
"canedit": true,
"contextlevel": 70
}
}}
<div class="row-fluid rtl-compatible mt-1 mb-1">
<div class="col-md-9">
<div class="row-fluid rtl-compatible mt-1 mb-1">
<div class="col-md-3">
<strong>{{#str}}category, tool_dataprivacy{{/str}}</strong>
</div>
<div class="col-md-9">
{{category}}
</div>
</div>
<div class="row-fluid rtl-compatible mt-1 mb-1">
<div class="col-md-3">
<strong>{{#str}}purpose, tool_dataprivacy{{/str}}</strong>
</div>
<div class="col-md-9">
{{purpose}}
</div>
</div>
</div>
<div class="col-md-3 align-self-center">
{{#canedit}}
<button class="btn btn-secondary" {{!
}}data-action="edit-level-defaults" {{!
}}data-contextlevel="{{contextlevel}}" {{!
}}data-category="{{categoryid}}" {{!
}}data-purpose="{{purposeid}}">
{{#str}}edit{{/str}}
</button>
{{/canedit}}
</div>
</div>