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
    Moodle is free software: you can redistribute it and/or modify
4
    it under the terms of the GNU General Public License as published by
5
    the Free Software Foundation, either version 3 of the License, or
6
    (at your option) any later version.
7
    Moodle is distributed in the hope that it will be useful,
8
    but WITHOUT ANY WARRANTY; without even the implied warranty of
9
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
10
    GNU General Public License for more details.
11
    You should have received a copy of the GNU General Public License
12
    along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
13
}}
14
{{!
15
    @template mod_glossary/standard_action_menu
16
    Actions panel at the bottom of the assignment grading UI.
17
    Classes required for JS:
18
        * none
19
    Data attributes required for JS:
20
        * none
21
    Context variables required for this template:
22
        * see mod/glossary/classes/output/standard_action_bar.php
23
    Example context (json):
24
    {
25
        "addnewbutton": {
26
            "method" : "get",
27
            "url" : "#",
28
            "primary" : true,
29
            "tooltip" : "This is a tooltip",
30
            "label" : "This is a the button text",
31
            "attributes": [
32
                {
33
                  "name": "data-attribute",
34
                  "value": "yeah"
35
                }
36
            ]
37
        },
38
        "tools": {
39
            "button": {
40
                "method" : "get",
41
                "url" : "#",
42
                "primary" : true,
43
                "tooltip" : "This is a tooltip",
44
                "label" : "This is a the button text",
45
                "attributes": [
46
                    {
47
                      "name": "data-attribute",
48
                      "value": "yeah"
49
                    }
50
                ]
51
            },
52
            "select": {
53
                "options": [
54
                    {
55
                        "url": "www.google.com",
56
                        "string": "Google"
57
                    },
58
                    {
59
                        "url": "www.yahoo.com",
60
                        "string": "Yahoo"
61
                    }
62
                ]
63
            }
64
        },
65
        "tabjumps":
66
        {
67
            "id": "url_select_test",
68
            "action": "https://example.com/post",
69
            "formid": "url_select_form",
70
            "sesskey": "sesskey",
71
            "label": "core/url_select",
72
            "helpicon": {
73
                "title": "Help with something",
74
                "text": "Help with something",
75
                "url": "http://example.org/help",
76
                "linktext": "",
77
                "icon":{
78
                    "extraclasses": "iconhelp",
79
                    "attributes": [
80
                        {"name": "src", "value": "../../../pix/help.svg"},
81
                        {"name": "alt", "value": "Help icon"}
82
                    ]
83
                }
84
            },
85
            "showbutton": "Go",
86
            "options": [{
87
                "name": "Group 1", "isgroup": true, "options":
88
                [
89
                    {"name": "Item 1", "isgroup": false, "value": "1"},
90
                    {"name": "Item 2", "isgroup": false, "value": "2"}
91
                ]},
92
                {"name": "Group 2", "isgroup": true, "options":
93
                [
94
                    {"name": "Item 3", "isgroup": false, "value": "3"},
95
                    {"name": "Item 4", "isgroup": false, "value": "4"}
96
                ]}],
97
            "disabled": false,
98
            "title": "Some cool title"
99
        },
100
        "searchbox": {
101
            "action": "http://localhost/stable/mod/glossary/view.php",
102
            "hiddenfields": [
103
                {
104
                    "name": "id",
105
                    "value": 23
106
                },
107
                {
108
                    "name": "mode",
109
                    "value": "search"
110
                }
111
            ],
112
            "otherfields": "<input type='checkbox'>Rendered checkbox",
113
            "inputname": "hook",
114
            "query": "hook",
115
            "searchstring": "Search"
116
        }
117
    }
118
}}
119
<div class="container-fluid tertiary-navigation">
120
    <div class="row">
121
        {{#addnewbutton}}
122
            <div class="navitem">
123
                {{> core/single_button }}
124
            </div>
125
        {{/addnewbutton}}
126
 
127
        <div class="d-flex ml-sm-auto">
128
            {{#tools}}
129
                {{#button}}
130
                    <div class="navitem">
131
                        {{> core/single_button}}
132
                    </div>
133
                {{/button}}
134
                {{#select}}
135
                    <div class="navitem">
136
                        <div class="dropdown">
137
                            <button type="button" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
138
                                ...
139
                                <span class="sr-only">{{#str}} exportentries, mod_glossary {{/str}}</span>
140
                            </button>
141
                            <div class="dropdown-menu dropdown-menu-right">
142
                                {{#options}}
143
                                    <a class="dropdown-item" href="{{url}}"
144
                                    {{#openinnewwindow}}target="_blank"{{/openinnewwindow}}>{{string}}</a>
145
                                {{/options}}
146
                            </div>
147
                        </div>
148
                    </div>
149
                {{/select}}
150
            {{/tools}}
151
        </div>
152
    </div>
153
    <div class="row">
154
        {{#tabjumps}}
155
            <div class="navitem">
156
                {{> core/url_select }}
157
            </div>
158
        {{/tabjumps}}
159
        {{#searchbox}}
160
            <div class="navitem">
161
                {{> core/search_input }}
162
            </div>
163
        {{/searchbox}}
164
    </div>
165
</div>