{{! 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 . }} {{! @template tool_policy/page_managedocs_list Template for the policy documents management page. Classes required for JS: - Data attributes required for JS: * data-policy-name * data-policy-revision * data-action Context variables required for this template: * haspolicies * policies Example context (json): { "title": "Manage policies", "backurl": "/", "pluginbaseurl": "/admin/tool/policy/", "canviewacceptances": true, "canmanage": true, "versions": [ { "id": 1, "name": "Terms & conditions", "typetext": "Site policy", "audiencetext": "All users", "statustext": "Active", "optionaltext": "Optional", "revision": "1.0", "timemodified": 1521531208, "acceptancescounturl": "#", "acceptancescounttext": "10 out of 1000 (1%)" }, { "indented": true, "name": "Terms & conditions", "typetext": "Site policy", "audiencetext": "All users", "statustext": "Draft", "optionaltext": "Compulsory", "revision": "2.0", "timemodified": 1521531208, "acceptancescounttext": "N/A" } ] } }}

{{{title}}}

{{#backurl}}
{{/backurl}} {{#canaddnew}}
{{/canaddnew}} {{#canviewacceptances}} {{/canviewacceptances}} {{#canmanage}} {{/canmanage}} {{#versions}} {{#canviewacceptances}} {{/canviewacceptances}} {{#canmanage}} {{/canmanage}} {{/versions}}
{{#str}} policydocname, tool_policy {{/str}} {{#str}} status, tool_policy {{/str}} {{#str}} policydocrevision, tool_policy {{/str}}{{#str}} usersaccepted, tool_policy {{/str}}
{{#indented}}
{{#pix}} level, tool_policy {{/pix}}
{{/indented}}
{{{name}}}
{{{typetext}}}, {{{audiencetext}}}, {{{optionaltext}}}
{{{statustext}}} {{revision}}
{{#acceptancescounturl}} {{acceptancescounttext}} {{/acceptancescounturl}} {{^acceptancescounturl}} {{acceptancescounttext}} {{/acceptancescounturl}} {{#actionmenu}} {{>core/action_menu}} {{/actionmenu}}
{{#js}} require(['tool_policy/managedocsactions'], function(ManageDocsActions) { ManageDocsActions.init('tool-policy-managedocs-wrapper'); }); {{/js}}