Merge branch 'MDL-67758-master' of git://github.com/dpalou/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                     </tr>
73                 </thead>
74                 <tbody>
75                     {{#contenttypes}}
76                         {{#runnable}}
77                         <tr class="">
78                             <td>
79                                 {{#icon}}
80                                     <img alt=""
81                                          class="icon iconsize-big"
82                                          src="{{{ icon }}}">
83                                 {{/icon}}
84                                 {{^icon}}
85                                     {{#pix}} b/h5p_library, core {{/pix}}
86                                 {{/icon}}
87                                 {{{ title }}}
88                             </td>
89                             <td>{{{ major_version }}}.{{{ minor_version }}}.{{{ patch_version }}}</td>
90                         </tr>
91                         {{/runnable}}
92                     {{/contenttypes}}
93                 </tbody>
94             </table>
95         </div>
96     </div>
97     <div class="tab-pane fade" id="libraries" role="tabpanel" aria-labelledby="libraries-tab">
98         <div class="overview px-3 mb-5">
99             <table class="admintable generaltable" id="h5plibraries">
100                 <thead>
101                     <tr>
102                         <th>{{#str}}description, core{{/str}}</th>
103                         <th>{{#str}}version, core{{/str}}</th>
104                     </tr>
105                 </thead>
106                 <tbody>
107                     {{#contenttypes}}
108                         {{^runnable}}
109                         <tr class="">
110                             <td>
111                                 {{{ title }}}
112                             </td>
113                             <td>{{{ major_version }}}.{{{ minor_version }}}.{{{ patch_version }}}</td>
114                         </tr>
115                         {{/runnable}}
116                     {{/contenttypes}}
117                 </tbody>
118             </table>
119         </div>
120     </div>
121 </div>