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 comments.
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/viewcontent/toolbarview
19
 
20
    Contentbank view toolbar.
21
 
22
    Classes required for JS:
23
    * none
24
 
25
    Data attributes required for JS:
26
    * none
27
 
28
    Context variables required for this template:
29
    * contenthtml - string - content html.
30
    * usercanedit - boolean - whether the user has permission to edit the content.
31
    * editcontenturl - string - edit page URL.
32
    * closeurl - string - close landing page.
33
 
34
    Example context (json):
35
    {
36
        "usercanedit" : true,
37
        "heading" : "This is a heading",
38
        "editcontenturl" : "http://something/contentbank/edit.php?contextid=1&plugin=h5p&id=1",
39
        "closeurl" : "http://moodle.test/h5pcb/moodle/contentbank/index.php",
40
        "actionmenu": {
41
            "options": [
42
                {
43
                    "url": "www.google.com",
44
                    "label": "Google",
45
                    "attributes": [
46
                        {
47
                            "name": "data-attrib",
48
                            "value": "1"
49
                        }
50
                    ]
51
                }
52
            ]
53
        }
54
    }
55
}}
56
 
57
{{#heading}}<h4 class=" rui-main-content-title rui-main-content-title--h4">{{heading}}</h4>{{/heading}}
58
{{#usercanedit}}
59
<div class="cb-toolbar-container w-100 m-0 text-right">
60
    <div class="d-inline-flex">
61
        <a href="{{editcontenturl}}" class="btn btn-primary" data-action="edit-content">
62
            <svg width="20" height="20" fill="none" viewBox="0 0 24 24">
63
                <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4.75 19.25L9 18.25L18.2929 8.95711C18.6834 8.56658 18.6834 7.93342 18.2929 7.54289L16.4571 5.70711C16.0666 5.31658 15.4334 5.31658 15.0429 5.70711L5.75 15L4.75 19.25Z"></path>
64
                <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19.25 19.25H13.75"></path>
65
            </svg>
66
            <span class="ml-1">{{#str}}edit{{/str}}</span>
67
        </a>
68
        {{#actionmenu}}
69
        <div class="mx-2">
70
            {{> core_contentbank/contentbankmenu }}
71
        </div>
72
        {{/actionmenu}}
73
 
74
        <div class="ml-auto">
75
            <a href="{{closeurl}}" class="btn btn-secondary ml-4" data-action="close-content">
76
                <span class="mr-1">{{#str}}exit, core_contentbank{{/str}}</span>
77
                <svg width="20" height="20" fill="none" viewBox="0 0 24 24">
78
                    <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M15.75 8.75L19.25 12L15.75 15.25"></path>
79
                    <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M19 12H10.75"></path>
80
                    <path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M15.25 4.75H6.75C5.64543 4.75 4.75 5.64543 4.75 6.75V17.25C4.75 18.3546 5.64543 19.25 6.75 19.25H15.25"></path>
81
                </svg>
82
            </a>
83
        </div>
84
    </div>
85
</div>
86
{{/usercanedit}}
87
 
88
{{^usercanedit}}
89
    {{#actionmenu}}
90
        {{> core_contentbank/contentbankmenu }}
91
    {{/actionmenu}}
92
{{/usercanedit}}