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/contentbankmenu
|
|
|
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 |
* options - JSON object - the options available in the dropdown
|
|
|
30 |
|
|
|
31 |
Example context (json):
|
|
|
32 |
{
|
|
|
33 |
"options": [
|
|
|
34 |
{
|
|
|
35 |
"url": "www.google.com",
|
|
|
36 |
"label": "Google",
|
|
|
37 |
"attributes": [
|
|
|
38 |
{
|
|
|
39 |
"name": "data-attrib",
|
|
|
40 |
"value": "1"
|
|
|
41 |
}
|
|
|
42 |
]
|
|
|
43 |
}
|
|
|
44 |
]
|
|
|
45 |
}
|
|
|
46 |
}}
|
|
|
47 |
<div class="dropdown d-flex">
|
|
|
48 |
<button aria-label="{{#str}}actionsmenu{{/str}}" class="btn btn-secondary dropdown-toggle" id="dropdown-actions" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
|
|
49 |
{{#str}}more, core_contentbank{{/str}}
|
|
|
50 |
</button>
|
|
|
51 |
{{! dropdown-menu-right style to fix RTL placement }}
|
|
|
52 |
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="dropdown-actions">
|
|
|
53 |
{{#options}}
|
|
|
54 |
<a class="dropdown-item {{extraclasses}}" {{#attributes}}{{name}}="{{value}}"{{/attributes}} href="{{url}}">{{label}}</a>
|
|
|
55 |
{{/options}}
|
|
|
56 |
</div>
|
|
|
57 |
</div>
|