MDL-68796 core_contentbank: Store view preferences
[moodle.git] / contentbank / templates / bankcontent / toolbar.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{{!
f9b6849b 18 @template core_contentbank/bankcontent/toolbar
43c2d0fe
AA
19
20 Example context (json):
21 {
22 "tools": [
23 {
24 "name": "Upload",
25 "link": "http://something/contentbank/contenttype/h5p/view.php?url=http://something/pluginfile.php/1/contentbank/public/accordion.h5p",
26 "icon" : "i/upload"
27 },
28 {
29 "icon": "i/export"
30 }
31 ]
32 }
33
34}}
e695d9d0
BB
35
36{{#tools}}
37 <a href="{{{ link }}}" class="icon-no-margin btn btn-secondary" title="{{{ name }}}">
38 {{#pix}} {{{ icon }}} {{/pix}} {{{ name }}}
39 </a>
40{{/tools}}
c393d818 41<button class="icon-no-margin btn btn-secondary {{^viewlist}}active{{/viewlist}} ml-2"
e695d9d0
BB
42title="{{#str}} displayicons, contentbank {{/str}}"
43data-action="viewgrid">
44 {{#pix}}a/view_icon_active, core, {{#str}} displayicons, contentbank {{/str}} {{/pix}}
45</button>
c393d818 46<button class="icon-no-margin btn btn-secondary {{#viewlist}}active{{/viewlist}}"
e695d9d0
BB
47title="{{#str}} displaydetails, contentbank {{/str}}"
48data-action="viewlist">
49 {{#pix}}t/viewdetails, core, {{#str}} displaydetails, contentbank {{/str}} {{/pix}}
50</button>