weekly release 3.9dev+
[moodle.git] / contentbank / templates / bankcontent.mustache
CommitLineData
43c2d0fe
AA
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_contentbank/list
19
20 Example context (json):
21 {
22 "contents": [
23 {
24 "name": "accordion.h5p",
25 "link": "http://something/contentbank/contenttype/h5p/view.php?url=http://something/pluginfile.php/1/contentbank/public/accordion.h5p",
6fc3477c 26 "icon" : "http://something/theme/image.php/boost/core/1581597850/f/h5p-64"
43c2d0fe
AA
27 },
28 {
29 "name": "resume.pdf",
6fc3477c 30 "icon": "http://something/theme/image.php/boost/core/1584597850/f/pdf-64"
43c2d0fe
AA
31 }
32 ],
33 "tools": [
34 {
35 "name": "Upload",
36 "link": "http://something/contentbank/contenttype/h5p/view.php?url=http://something/pluginfile.php/1/contentbank/public/accordion.h5p",
37 "icon" : "i/upload"
38 },
39 {
40 "icon": "i/export"
41 }
42 ]
43 }
44
45}}
f9b6849b
SA
46<div class="d-flex justify-content-between flex-column flex-sm-row">
47 <div class="cb-search-container mb-2">
48 {{>core_contentbank/bankcontent/search}}
49 </div>
50 <div class="cb-toolbar-container mb-2">
51 {{>core_contentbank/bankcontent/toolbar}}
52 </div>
53</div>
ac00aec2 54<div class="content-bank-container pb-3 border">
43c2d0fe 55 <div class="content-bank">
ac00aec2 56 <div class="cb-navbar bg-light p-2 border-bottom">
f9b6849b
SA
57 <div class="cb-navbar-breadbrumb">
58 {{#pix}} i/folder {{/pix}}
59 </div>
60 <div class="cb-navbar-totalsearch d-none">
61 </div>
43c2d0fe 62 </div>
ac00aec2 63 <div class="cb-content-wrapper d-flex flex-wrap p-2">
43c2d0fe 64 {{#contents}}
f9b6849b 65 <div class="cb-file position-relative mb-2" data-file="{{{name}}}">
ac00aec2
BB
66 <div class="p-2">
67 <div class="cb-thumbnail mb-1 text-center">
6fc3477c 68 <img class="icon iconsize-big" alt="{{{name}}}" title="{{{name}}}" src="{{{ icon }}}">
43c2d0fe 69 </div>
ac00aec2
BB
70
71 {{#link}}
72 <a href="{{{ link }}}" class="stretched-link" title="{{{name}}}">
73 {{/link}}
f9b6849b 74 <span class="cb-name word-break-all clamp-2 text-center" data-region="cb-content-name">
ac00aec2
BB
75 {{{ name }}}
76 </span>
77 {{#link}}
78 </a>
79 {{/link}}
43c2d0fe
AA
80 </div>
81 </div>
82 {{/contents}}
83 </div>
84 </div>
85</div>