Automatically generated installer lang files
[moodle.git] / badges / templates / external_backpacks_page.mustache
blob92eb673a2cc59267f1e14ebb5a7de105e616e480
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_badges/external_backpacks_page
20     Manage backpacks.
22     Context variables required for this template:
23     * backpacks - array of objects containing id, backpackweburl, enabled, apiversion and sortorder
25     Example context (json):
26     {
27         "backpacks": [
28             {
29                 "backpackweburl": "http://localhost/",
30                 "sitebackpack": true,
31                 "cantest": true,
32                 "canmoveup": true,
33                 "canmovedown": false
34             }
35         ]
36     }
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>
42 </form>
44 <table class="generaltable fullwidth" id="backpacklist">
45     <caption>{{#str}}listbackpacks, core_badges{{/str}}</caption>
46     <thead>
47         <tr>
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>
51         </tr>
52     </thead>
53     <tbody>
54         {{#backpacks}}
55         <tr data-backpackurl="{{{backpackweburl}}}">
56             <td> {{{backpackweburl}}} </td>
57             <td>
58                 {{#canmoveup}}
59                     <a href="{{baseurl}}?id={{id}}&action=moveup">{{#pix}}t/up, core,{{#str}}moveup{{/str}}{{/pix}}</a>
60                 {{/canmoveup}}
61                 {{^canmoveup}}
62                     {{#pix}}spacer, moodle{{/pix}}
63                 {{/canmoveup}}
64                 {{#canmovedown}}
65                     <a href="{{baseurl}}?id={{id}}&action=movedown">{{#pix}}t/down, core,{{#str}}movedown{{/str}}{{/pix}}</a>
66                 {{/canmovedown}}
67                 {{^canmovedown}}
68                     {{#pix}}spacer, moodle{{/pix}}
69                 {{/canmovedown}}
70             </td>
71             <td>
72                 <a href="{{baseurl}}?id={{id}}&action=edit">{{#pix}}t/edit, core,{{#str}}editsettings{{/str}}{{/pix}}</a>
73             {{^sitebackpack}}
74                 <a href="{{baseurl}}?id={{id}}&action=delete" role="button" data-action="deletebackpack">
75                     {{#pix}}t/delete, core,{{#str}}delete{{/str}}{{/pix}}
76                 </a>
77             {{/sitebackpack}}
78             {{#cantest}}
79                 <a href="{{baseurl}}?id={{id}}&action=test">{{#pix}}t/check, core,{{#str}}testsettings, core_badges{{/str}}{{/pix}}</a>
80             {{/cantest}}
81             </td>
82         </tr>
83         {{/backpacks}}
84     </tbody>
85 </table>