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_h5p/h5plibraries
19
 
20
    Example context (json):
21
    {
22
        "contenttypes": [
23
            {
24
                "title": "Accordion",
25
                "major_version": 1,
26
                "minor_version:": 0,
27
                "patch_version:": 0,
28
                "runnable": 1,
29
                "icon": "icon.svg",
30
                "enabled": true,
31
                "toggleenabledurl": "http://myserver.cat/h5p/libraries.php?id=26&action=disable"
32
            },
33
            {
34
                "title": "Collage",
35
                "major_version": 0,
36
                "minor_version:": 3,
37
                "patch_version:": 1,
38
                "runnable": 1,
39
                "enabled": true,
40
                "toggleenabledurl": "http://myserver.cat/h5p/libraries.php?id=37&action=disable"
41
            },
42
            {
43
                "title": "FontAwesome",
44
                "major_version": 4,
45
                "minor_version:": 5,
46
                "patch_version:": 0,
47
                "runnable": 1,
48
                "icon": "icon.svg",
49
                "enabled": false,
50
                "toggleenabledurl": "http://myserver.cat/h5p/libraries.php?id=54&action=enable"
51
            }
52
        ]
53
    }
54
 
55
}}
56
<h3 class="mt-3">{{#str}} installedh5p, h5p {{/str}}</h3>
57
 
58
<ul class="nav nav-tabs mb-3" id="myTab" role="tablist">
59
    <li class="nav-item">
60
        <a class="nav-link active" id="contenttypes-tab" data-toggle="tab" href="#contenttypes" role="tab" aria-controls="contenttypes" aria-selected="true">
61
            {{#str}} installedcontenttypes, h5p {{/str}}
62
        </a>
63
    </li>
64
    <li class="nav-item">
65
        <a class="nav-link" id="libraries-tab" data-toggle="tab" href="#libraries" role="tab" aria-controls="libraries" aria-selected="false">
66
            {{#str}} installedcontentlibraries, h5p {{/str}}
67
        </a>
68
    </li>
69
</ul>
70
<div class="tab-content" id="myTabContent">
71
    <div class="tab-pane fade show active" id="contenttypes" role="tabpanel" aria-labelledby="contenttypes-tab">
72
        <div class="overview px-3 mb-5">
73
            <table class="admintable generaltable" id="h5pcontenttypes">
74
                <thead>
75
                    <tr>
76
                        <th style="width: 5%">{{#str}}enable, core{{/str}}</th>
77
                        <th>{{#str}}description, core{{/str}}</th>
78
                        <th>{{#str}}version, core{{/str}}</th>
79
                        <th aria-label="{{#str}}actions, core_h5p{{/str}}"></th>
80
                    </tr>
81
                </thead>
82
                <tbody>
83
                    {{#contenttypes}}
84
                        {{#runnable}}
85
                        <tr class="">
86
                            <td class="text-center">
87
                            {{#enabled}}
88
                                <a href="{{{toggleenabledurl}}}" aria-label="{{#str}}disable, core{{/str}}">{{#pix}}t/hide, core,{{#str}}disable{{/str}}{{/pix}}</a>
89
                            {{/enabled}}
90
                            {{^enabled}}
91
                                <a href="{{{toggleenabledurl}}}" aria-label="{{#str}}enable, core{{/str}}">{{#pix}}t/show, core,{{#str}}enable{{/str}}{{/pix}}</a>
92
                            {{/enabled}}
93
                            </td>
94
                            <td>
95
                                {{#icon}}
96
                                    <img alt=""
97
                                         class="icon iconsize-big"
98
                                         src="{{{ icon }}}">
99
                                {{/icon}}
100
                                {{^icon}}
101
                                    {{#pix}} b/h5p_library, core {{/pix}}
102
                                {{/icon}}
103
                                {{{ title }}}
104
                            </td>
105
                            <td>{{{ major_version }}}.{{{ minor_version }}}.{{{ patch_version }}}</td>
106
                            <td>
107
                                {{#actionmenu}}
108
                                    {{>core/action_menu}}
109
                                {{/actionmenu}}
110
                            </td>
111
                        </tr>
112
                        {{/runnable}}
113
                    {{/contenttypes}}
114
                </tbody>
115
            </table>
116
        </div>
117
    </div>
118
    <div class="tab-pane fade" id="libraries" role="tabpanel" aria-labelledby="libraries-tab">
119
        <div class="overview px-3 mb-5">
120
            <table class="admintable generaltable" id="h5plibraries">
121
                <thead>
122
                    <tr>
123
                        <th>{{#str}}description, core{{/str}}</th>
124
                        <th>{{#str}}version, core{{/str}}</th>
125
                        <th aria-label="{{#str}}actions, core_h5p{{/str}}"></th>
126
                    </tr>
127
                </thead>
128
                <tbody>
129
                    {{#contenttypes}}
130
                        {{^runnable}}
131
                        <tr class="">
132
                            <td>
133
                                {{{ title }}}
134
                            </td>
135
                            <td>{{{ major_version }}}.{{{ minor_version }}}.{{{ patch_version }}}</td>
136
                            <td>
137
                                {{#actionmenu}}
138
                                    {{>core/action_menu}}
139
                                {{/actionmenu}}
140
                            </td>
141
                        </tr>
142
                        {{/runnable}}
143
                    {{/contenttypes}}
144
                </tbody>
145
            </table>
146
        </div>
147
    </div>
148
</div>