Proyectos de Subversion Moodle

Rev

| 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}}
61
    {{^dropdown}}
62
        <a href="{{ link }}" class="rui-icon-no-margin btn btn-secondary" title="{{ name }}" data-action="{{ action }}">
63
            <span class="mr-2">
64
            <svg width="26" height="26" fill="none" viewBox="0 0 24 24">
65
                <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M4.75 14.75V16.25C4.75 17.9069 6.09315 19.25 7.75 19.25H16.25C17.9069 19.25 19.25 17.9069 19.25 16.25V14.75"></path>
66
                <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M12 14.25L12 5"></path>
67
                <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M8.75 8.25L12 4.75L15.25 8.25"></path>
68
            </svg>
69
            </span>
70
            {{{ name }}}
71
        </a>
72
    {{/dropdown}}
73
{{/tools}}
74
<div class="rui-contentbank-view-btns d-inline-flex align-items-center">
75
    <button class="rui-icon-no-margin btn btn-sm p-2 btn-secondary {{^viewlist}}active{{/viewlist}} ml-4"
76
    title="{{#str}}  displayicons, contentbank  {{/str}}"
77
    data-action="viewgrid">
78
        <svg width="26" height="26" fill="none" viewBox="0 0 24 24">
79
            <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M4.75 5.75C4.75 5.19772 5.19772 4.75 5.75 4.75H9.25C9.80228 4.75 10.25 5.19772 10.25 5.75V9.25C10.25 9.80228 9.80228 10.25 9.25 10.25H5.75C5.19772 10.25 4.75 9.80228 4.75 9.25V5.75Z"/>
80
            <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M4.75 14.75C4.75 14.1977 5.19772 13.75 5.75 13.75H9.25C9.80228 13.75 10.25 14.1977 10.25 14.75V18.25C10.25 18.8023 9.80228 19.25 9.25 19.25H5.75C5.19772 19.25 4.75 18.8023 4.75 18.25V14.75Z"/>
81
            <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M13.75 5.75C13.75 5.19772 14.1977 4.75 14.75 4.75H18.25C18.8023 4.75 19.25 5.19772 19.25 5.75V9.25C19.25 9.80228 18.8023 10.25 18.25 10.25H14.75C14.1977 10.25 13.75 9.80228 13.75 9.25V5.75Z"/>
82
            <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M13.75 14.75C13.75 14.1977 14.1977 13.75 14.75 13.75H18.25C18.8023 13.75 19.25 14.1977 19.25 14.75V18.25C19.25 18.8023 18.8023 19.25 18.25 19.25H14.75C14.1977 19.25 13.75 18.8023 13.75 18.25V14.75Z"/>
83
        </svg>
84
    </button>
85
    <button class="rui-icon-no-margin btn btn-sm p-2 btn-secondary {{#viewlist}}active{{/viewlist}}"
86
    title="{{#str}} displaydetails, contentbank {{/str}}"
87
    data-action="viewlist">
88
        <svg width="26" height="26" fill="none" viewBox="0 0 24 24">
89
            <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M4.75 6.75C4.75 5.64543 5.64543 4.75 6.75 4.75H17.25C18.3546 4.75 19.25 5.64543 19.25 6.75V17.25C19.25 18.3546 18.3546 19.25 17.25 19.25H6.75C5.64543 19.25 4.75 18.3546 4.75 17.25V6.75Z"></path>
90
            <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M19 12L5 12"></path>
91
        </svg>
92
    </button>
93
</div>