Proyectos de Subversion Moodle

Rev

Rev 1 | | Comparar con el anterior | Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
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}}
1441 ariadna 61
    {{#button}}
1 efrain 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>
1441 ariadna 65
    {{/button}}
66
    {{#checkbox}}
67
        <div class="me-3 align-middle pt-1 text-nowrap">
68
            <input type="checkbox" id="{{ id }}" class="{{ class }}" name="{{ name }}"
69
                data-action="{{ action }}" {{#checked}}checked="checked"{{/checked}}>
70
 
71
            <label for="{{ id }}">{{ label }}</label>
72
        </div>
73
    {{/checkbox}}
1 efrain 74
{{/tools}}
1441 ariadna 75
<button class="icon-no-margin btn btn-secondary {{^viewlist}}active{{/viewlist}} ms-2"
1 efrain 76
title="{{#str}}  displayicons, contentbank  {{/str}}"
77
data-action="viewgrid">
78
    {{#pix}}a/view_icon_active, core, {{#str}} displayicons, contentbank {{/str}} {{/pix}}
79
</button>
80
<button class="icon-no-margin btn btn-secondary {{#viewlist}}active{{/viewlist}}"
81
title="{{#str}} displaydetails, contentbank {{/str}}"
82
data-action="viewlist">
1441 ariadna 83
    {{#pix}}a/view_list_active, core, {{#str}} displaydetails, contentbank {{/str}} {{/pix}}
1 efrain 84
</button>