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 core_badges/external_backpacks_page
22 Context variables required for this template:
23 * backpacks - array of objects containing id, backpackweburl, enabled, apiversion and sortorder
25 Example context (json):
29 "backpackweburl": "http://localhost/",
39 <form action="{{baseurl}}" method="get" id="createbackpack">
40 <input type="hidden" name="action" value="edit"/>
41 <button type="submit" class="btn btn-secondary">{{#str}}newbackpack, core_badges{{/str}}</button>
44 <table class="generaltable fullwidth" id="backpacklist">
45 <caption>{{#str}}listbackpacks, core_badges{{/str}}</caption>
48 <th scope="col">{{#str}}backpackweburl, core_badges{{/str}}</th>
49 <th scope="col">{{#str}}order{{/str}}</th>
50 <th scope="col">{{#str}}actions, core_badges{{/str}}</th>
55 <tr data-backpackurl="{{{backpackweburl}}}">
56 <td> {{{backpackweburl}}} </td>
59 <a href="{{baseurl}}?id={{id}}&action=moveup">{{#pix}}t/up, core,{{#str}}moveup{{/str}}{{/pix}}</a>
62 {{#pix}}spacer, moodle{{/pix}}
65 <a href="{{baseurl}}?id={{id}}&action=movedown">{{#pix}}t/down, core,{{#str}}movedown{{/str}}{{/pix}}</a>
68 {{#pix}}spacer, moodle{{/pix}}
72 <a href="{{baseurl}}?id={{id}}&action=edit">{{#pix}}t/edit, core,{{#str}}editsettings{{/str}}{{/pix}}</a>
74 <a href="{{baseurl}}?id={{id}}&action=delete" role="button" data-action="deletebackpack">
75 {{#pix}}t/delete, core,{{#str}}delete{{/str}}{{/pix}}
79 <a href="{{baseurl}}?id={{id}}&action=test">{{#pix}}t/check, core,{{#str}}testsettings, core_badges{{/str}}{{/pix}}</a>