1 |
efrain |
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/bankcontent/toolbar
|
|
|
19 |
|
|
|
20 |
Example context (json):
|
|
|
21 |
{
|
|
|
22 |
"tools": [
|
|
|
23 |
{
|
|
|
24 |
"name": "Add",
|
|
|
25 |
"dropdown": true,
|
|
|
26 |
"link": "http://something/contentbank/edit.php?contextid=1",
|
|
|
27 |
"contenttypes": [
|
|
|
28 |
{
|
|
|
29 |
"name": "h5p",
|
|
|
30 |
"baseurl": "http://something/contentbank/edit.php?contextid=1&plugin=h5p",
|
|
|
31 |
"types": [
|
|
|
32 |
{
|
|
|
33 |
"typename": "H5P Interactive Content"
|
|
|
34 |
},
|
|
|
35 |
{
|
|
|
36 |
"typename": "Accordion",
|
|
|
37 |
"typeeditorparams": "library=Accordion-1.4",
|
|
|
38 |
"typeicon": "http://something/pluginfile.php/1/core_h5p/libraries/13/H5P.Accordion-1.4/icon.svg"
|
|
|
39 |
}
|
|
|
40 |
]
|
|
|
41 |
}
|
|
|
42 |
]
|
|
|
43 |
},
|
|
|
44 |
{
|
|
|
45 |
"name": "Upload",
|
|
|
46 |
"link": "http://something/contentbank/contenttype/h5p/view.php?url=http://something/pluginfile.php/1/contentbank/public/accordion.h5p",
|
|
|
47 |
"icon" : "i/upload"
|
|
|
48 |
},
|
|
|
49 |
{
|
|
|
50 |
"icon": "i/export"
|
|
|
51 |
}
|
|
|
52 |
]
|
|
|
53 |
}
|
|
|
54 |
|
|
|
55 |
}}
|
|
|
56 |
|
|
|
57 |
{{#tools}}
|
|
|
58 |
{{#dropdown}}
|
|
|
59 |
{{>core_contentbank/bankcontent/toolbar_dropdown}}
|
|
|
60 |
{{/dropdown}}
|
|
|
61 |
{{^dropdown}}
|
|
|
62 |
<a href="{{ link }}" class="icon-no-margin btn btn-secondary text-nowrap" title="{{ name }}" data-action="{{ action }}">
|
|
|
63 |
{{#pix}} {{{ icon }}} {{/pix}} {{{ name }}}
|
|
|
64 |
</a>
|
|
|
65 |
{{/dropdown}}
|
|
|
66 |
{{/tools}}
|
|
|
67 |
<button class="icon-no-margin btn btn-secondary {{^viewlist}}active{{/viewlist}} ml-2"
|
|
|
68 |
title="{{#str}} displayicons, contentbank {{/str}}"
|
|
|
69 |
data-action="viewgrid">
|
|
|
70 |
{{#pix}}a/view_icon_active, core, {{#str}} displayicons, contentbank {{/str}} {{/pix}}
|
|
|
71 |
</button>
|
|
|
72 |
<button class="icon-no-margin btn btn-secondary {{#viewlist}}active{{/viewlist}}"
|
|
|
73 |
title="{{#str}} displaydetails, contentbank {{/str}}"
|
|
|
74 |
data-action="viewlist">
|
|
|
75 |
{{#pix}}t/viewdetails, core, {{#str}} displaydetails, contentbank {{/str}} {{/pix}}
|
|
|
76 |
</button>
|