Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
{{!
2
    This file is part of Moodle - http://moodle.org/
3
 
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.
8
 
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.
13
 
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/>.
16
}}
17
{{!
18
    @template core_badges/external_backpacks_page
19
 
20
    Manage backpacks.
21
 
22
    Context variables required for this template:
23
    * backpacks - array of objects containing id, backpackweburl, enabled, apiversion and sortorder
24
 
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
    }
37
}}
38
 
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>
43
 
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 {{!
75
                    }} href="{{baseurl}}?id={{id}}&action=delete" {{!
76
                    }} role="button" {{!
77
                    }} data-modal="confirmation" {{!
78
                    }} data-modal-type="delete" {{!
79
                    }} data-modal-content-str='["delexternalbackpackconfirm", "core_badges", {{#quote}}{{backpackweburl}}{{/quote}}]' {{!
80
                    }} data-modal-title-str='["delexternalbackpack", "core_badges"]' {{!
81
                    }} data-modal-yes-button-str='["delete", "core"]' {{!
82
                    }} data-modal-destination="{{baseurl}}?id={{id}}&action=delete&sesskey={{sesskey}}&confirm=1" {{!
83
                }}>
84
                    {{#pix}}t/delete, core,{{#str}}delete{{/str}}{{/pix}}
85
                </a>
86
            {{/sitebackpack}}
87
            {{#cantest}}
88
                <a href="{{baseurl}}?id={{id}}&action=test">{{#pix}}t/check, core,{{#str}}testsettings, core_badges{{/str}}{{/pix}}</a>
89
            {{/cantest}}
90
            </td>
91
        </tr>
92
        {{/backpacks}}
93
    </tbody>
94
</table>