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/>.
18 @template core_contentbank/bankcontent
20 Example context (json):
24 "name": "Accordion.h5p",
25 "title": "accordion.h5p",
26 "timemodified": 1589792272,
29 "type": "Archive (H5P)",
30 "author": "Admin user",
31 "link": "http://something/contentbank/contenttype/h5p/view.php?url=http://something/pluginfile.php/1/contentbank/public/accordion.h5p",
32 "icon" : "http://something/theme/image.php/boost/core/1581597850/f/h5p-64"
37 "timemodified": 1589792039,
40 "type": "Archive (PDF)",
41 "author": "Admin user",
42 "icon": "http://something/theme/image.php/boost/core/1584597850/f/pdf-64"
49 "link": "http://something/contentbank/edit.php?contextid=1",
52 "name": "H5P Interactive Content",
53 "baseurl": "http://something/contentbank/edit.php?contextid=1&plugin=h5p",
56 "typename": "H5P Interactive Content"
59 "typename": "Accordion",
60 "typeeditorparams": "library=Accordion-1.4",
61 "typeicon": "http://something/pluginfile.php/1/core_h5p/libraries/13/H5P.Accordion-1.4/icon.svg"
69 "link": "http://something/contentbank/contenttype/h5p/view.php?url=http://something/pluginfile.php/1/contentbank/public/accordion.h5p",
79 <div class="content-bank-container {{#viewlist}}view-list{{/viewlist}} {{^viewlist}}view-grid{{/viewlist}}"
80 data-region="contentbank">
81 <div class="d-flex justify-content-between flex-column flex-sm-row">
82 <div class="cb-search-container mb-2">
83 {{>core_contentbank/bankcontent/search}}
85 <div class="cb-toolbar-container mb-2 d-flex">
86 {{>core_contentbank/bankcontent/toolbar}}
89 <div class="pb-3 border">
90 <div class="content-bank">
91 <div class="cb-navbar bg-light p-2 border-bottom">
92 <div class="cb-navbar-breadbrumb">
93 {{#pix}} i/folder {{/pix}}
95 <div class="cb-navbar-totalsearch d-none">
99 <div class="cb-content-wrapper d-flex px-2" data-region="filearea">
100 <div class="cb-heading bg-white">
101 <div class="cb-file cb-column d-flex">
102 <div class="title">{{#str}} contentname, contentbank {{/str}}</div>
103 <button class="btn btn-sm cb-btnsort dir-none ml-auto" data-string="contentname" data-action="sortname"
104 title="{{#str}} sortbyx, core, {{#str}} contentname, contentbank {{/str}} {{/str}}">
105 <span class="default">{{#pix}} t/sort, core, {{#str}}sort, core {{/str}} {{/pix}}</span>
106 <span class="desc">{{#pix}} t/sort_desc, core, {{#str}}desc, core{{/str}} {{/pix}}</span>
107 <span class="asc">{{#pix}} t/sort_asc, core, {{#str}}asc, core{{/str}} {{/pix}}</span>
110 <div class="cb-date cb-column d-flex">
111 <div class="title">{{#str}} lastmodified, contentbank {{/str}}</div>
112 <button class="btn btn-sm cb-btnsort dir-none ml-auto" data-string="lastmodified" data-action="sortdate"
113 title="{{#str}} sortbyx, core, {{#str}} lastmodified, contentbank {{/str}} {{/str}}">
114 <span class="default">{{#pix}} t/sort, core, {{#str}}sort, core {{/str}} {{/pix}}</span>
115 <span class="desc">{{#pix}} t/sort_desc, core, {{#str}}desc, core{{/str}} {{/pix}}</span>
116 <span class="asc">{{#pix}} t/sort_asc, core, {{#str}}asc, core{{/str}} {{/pix}}</span>
119 <div class="cb-size cb-column d-flex">
120 <div class="title">{{#str}} size, contentbank {{/str}}</div>
121 <button class="btn btn-sm cb-btnsort dir-none ml-auto" data-string="size" data-action="sortsize"
122 title="{{#str}} sortbyx, core, {{#str}} size, contentbank {{/str}} {{/str}}">
123 <span class="default">{{#pix}} t/sort, core, {{#str}}sort, core {{/str}} {{/pix}}</span>
124 <span class="desc">{{#pix}} t/sort_desc, core, {{#str}}desc, core{{/str}} {{/pix}}</span>
125 <span class="asc">{{#pix}} t/sort_asc, core, {{#str}}asc, core{{/str}} {{/pix}}</span>
128 <div class="cb-type cb-column d-flex">
129 <div class="title">{{#str}} type, contentbank {{/str}}</div>
130 <button class="btn btn-sm cb-btnsort dir-none ml-auto" data-string="type" data-action="sorttype"
131 title="{{#str}} sortbyx, core, {{#str}} type, contentbank {{/str}} {{/str}}">
132 <span class="default">{{#pix}} t/sort, core, {{#str}}sort, core {{/str}} {{/pix}}</span>
133 <span class="desc">{{#pix}} t/sort_desc, core, {{#str}}desc, core{{/str}} {{/pix}}</span>
134 <span class="asc">{{#pix}} t/sort_asc, core, {{#str}}asc, core{{/str}} {{/pix}}</span>
137 <div class="cb-author cb-column d-flex last">
138 <div class="title">{{#str}} author, contentbank {{/str}}</div>
139 <button class="btn btn-sm cb-btnsort dir-none ml-auto" data-string="author" data-action="sortauthor"
140 title="{{#str}} sortbyx, core, {{#str}} author, contentbank {{/str}} {{/str}}">
141 <span class="default">{{#pix}} t/sort, core, {{#str}}sort, core {{/str}} {{/pix}}</span>
142 <span class="desc">{{#pix}} t/sort_desc, core, {{#str}}desc, core{{/str}} {{/pix}}</span>
143 <span class="asc">{{#pix}} t/sort_asc, core, {{#str}}asc, core{{/str}} {{/pix}}</span>
148 <div class="cb-listitem"
149 data-file="{{{ title }}}"
150 data-name="{{{ name }}}"
151 data-bytes="{{ bytes }}"
152 data-timemodified="{{ timemodified }}"
153 data-type="{{{ type }}}"
154 data-author="{{{ author }}}">
155 <div class="cb-file cb-column position-relative">
156 <div class="cb-thumbnail" role="img" aria-label="{{{ name }}}"
157 style="background-image: url('{{{ icon }}}');">
159 <a href="{{{ link }}}" class="cb-link stretched-link" title="{{{ name }}}">
160 <span class="cb-name word-break-all clamp-2" data-region="cb-content-name">
165 <div class="cb-date cb-column small">
166 {{#userdate}} {{ timemodified }}, {{#str}} strftimedatetimeshort, core_langconfig {{/str}} {{/userdate}}
168 <div class="cb-size cb-column small">
171 <div class="cb-type cb-column small">
174 <div class="cb-type cb-column last small">
182 <div class="cb-content-wrapper d-flex flex-wrap p-2" data-region="filearea">
183 <div class="w-100 p-3 text-center text-muted">
184 {{#str}} nocontentavailable, core_contentbank {{/str}}