Merge branch 'MDL-67062-master' of git://github.com/sarjona/moodle
[moodle.git] / h5p / templates / h5plibraries.mustache
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/>.
16 }}
17 {{!
18     @template core_h5p/h5plibraries
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             },
31             {
32                 "title": "Collage",
33                 "major_version": 0,
34                 "minor_version:": 3,
35                 "patch_version:": 1,
36                 "runnable": 1
37             },
38             {
39                 "title": "FontAwesome",
40                 "major_version": 4,
41                 "minor_version:": 5,
42                 "patch_version:": 0,
43                 "runnable": 1,
44                 "icon": "icon.svg"
45             }
46         ]
47     }
49 }}
50 <h3 class="mt-3">{{#str}} installedh5p, h5p {{/str}}</h3>
52 <ul class="nav nav-tabs mb-3" id="myTab" role="tablist">
53     <li class="nav-item">
54         <a class="nav-link active" id="contenttypes-tab" data-toggle="tab" href="#contenttypes" role="tab" aria-controls="contenttypes" aria-selected="true">
55             {{#str}} installedcontenttypes, h5p {{/str}}
56         </a>
57     </li>
58     <li class="nav-item">
59         <a class="nav-link" id="libraries-tab" data-toggle="tab" href="#libraries" role="tab" aria-controls="libraries" aria-selected="false">
60             {{#str}} installedcontentlibraries, h5p {{/str}}
61         </a>
62     </li>
63 </ul>
64 <div class="tab-content" id="myTabContent">
65     <div class="tab-pane fade show active" id="contenttypes" role="tabpanel" aria-labelledby="contenttypes-tab">
66         <div class="overview px-3 mb-5">
67             <table class="admintable generaltable" id="h5pcontenttypes">
68                 <thead>
69                     <tr>
70                         <th>{{#str}}description, core{{/str}}</th>
71                         <th>{{#str}}version, core{{/str}}</th>
72                         <th aria-label="{{#str}}actions, core_h5p{{/str}}"></th>
73                     </tr>
74                 </thead>
75                 <tbody>
76                     {{#contenttypes}}
77                         {{#runnable}}
78                         <tr class="">
79                             <td>
80                                 {{#icon}}
81                                     <img alt=""
82                                          class="icon iconsize-big"
83                                          src="{{{ icon }}}">
84                                 {{/icon}}
85                                 {{^icon}}
86                                     {{#pix}} b/h5p_library, core {{/pix}}
87                                 {{/icon}}
88                                 {{{ title }}}
89                             </td>
90                             <td>{{{ major_version }}}.{{{ minor_version }}}.{{{ patch_version }}}</td>
91                             <td>
92                                 {{#actionmenu}}
93                                     {{>core/action_menu}}
94                                 {{/actionmenu}}
95                             </td>
96                         </tr>
97                         {{/runnable}}
98                     {{/contenttypes}}
99                 </tbody>
100             </table>
101         </div>
102     </div>
103     <div class="tab-pane fade" id="libraries" role="tabpanel" aria-labelledby="libraries-tab">
104         <div class="overview px-3 mb-5">
105             <table class="admintable generaltable" id="h5plibraries">
106                 <thead>
107                     <tr>
108                         <th>{{#str}}description, core{{/str}}</th>
109                         <th>{{#str}}version, core{{/str}}</th>
110                         <th aria-label="{{#str}}actions, core_h5p{{/str}}"></th>
111                     </tr>
112                 </thead>
113                 <tbody>
114                     {{#contenttypes}}
115                         {{^runnable}}
116                         <tr class="">
117                             <td>
118                                 {{{ title }}}
119                             </td>
120                             <td>{{{ major_version }}}.{{{ minor_version }}}.{{{ patch_version }}}</td>
121                             <td>
122                                 {{#actionmenu}}
123                                     {{>core/action_menu}}
124                                 {{/actionmenu}}
125                             </td>
126                         </tr>
127                         {{/runnable}}
128                     {{/contenttypes}}
129                 </tbody>
130             </table>
131         </div>
132     </div>
133 </div>