Merge branch 'MDL-81073' of https://github.com/paulholden/moodle
[moodle.git] / h5p / templates / h5ptoolsoverview.mustache
blobe433cdcf56490675ab02241c5181c1ebae5f92e7
1 {{!
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/>.
17 {{!
18     @template core_h5p/h5ptoolsoverview
20     Example context (json):
21     {
22         "tools": [
23             {
24                 "tool": "h5ptasks",
25                 "tool_description": "h5ptasks_description",
26                 "link": "https://example.com/admin/tool/task/scheduledtasks.php",
27                 "status": "On",
28                 "status_class": "bade bg-success text-white",
29                 "status_action": "<a href=\"admin/tool/task/schedule_task.php?task=core_task_h5p_get_content_types_task\">Run now</a>"
30             },
31             {
32                 "tool": "h5ptasks",
33                 "tool_description": "h5ptasks_description",
34                 "link": "https://example.com/admin/filters.php",
35                 "status": "Off",
36                 "status_class": "bade bg-danger text-white"
37             }
38         ]
39     }
42 <table class="admintable generaltable" id="h5ptools">
43     <thead>
44     <tr>
45         <th>{{#str}} feature, h5p {{/str}}</th>
46         <th class="text-center">{{#str}} status, h5p {{/str}}</th>
47         <th>{{#str}} description, h5p {{/str}}</th>
48     </tr>
49     </thead>
50     <tbody>
51     {{#tools}}
52         <tr class="">
53             <td><a href="{{{ link }}}" title="{{#str}} settings {{/str}}">{{{ tool }}}</a></td>
54             <td class="text-center">
55                 <div class="{{{ status_class }}}">{{{ status }}}</div>
56                 {{#status_action}}<div>{{{ status_action }}}</div>{{/status_action}}
57             </td>
58             <td>{{{ tool_description }}}</td>
59         </tr>
60     {{/tools}}
61     </tbody>
62 </table>