2 This file is part of Moodle - http://moodle.org/
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.
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.
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/>.
18 @template core/action_menu_trigger
22 Example context (json):
24 "actiontext": "Example link text",
25 "title": "Example link title",
26 "triggerrole": "button",
27 "triggerattributes": [
28 {"name": "data-boundary", "value": "window" }
30 "url": "http://example.com/link",
31 "classes": "icon menu-action",
33 "triggerextraclasses": "",
35 {"name": "role", "value": "menuitem" },
36 {"name": "data-title", "value": "mymoodle,admin" }
39 "classes": "menu align-tr-br",
40 "dropdownalignment": "dropdown-menu-right",
42 {"name": "id", "value": "action-menu-0-menu"},
43 {"name": "data-rel", "value": "menu-content"},
44 {"name": "role", "value": "menu"},
45 {"name": "data-align", "value": "tr-br"}
50 "id": "action_link59ecf8394a68078",
53 "url": "http://example.com/link",
59 "classes": "menu-action",
61 {"name": "role", "value": "menuitem"},
62 {"name": "data-title", "value": "mymoodle,admin"}
70 "id": "action_link59ecf8394a68079",
77 {"name": "role", "value": "menuitem"}
85 <div class="dropdown{{^secondary.items}} hidden{{/secondary.items}}">
89 class="{{triggerextraclasses}} dropdown-toggle icon-no-margin"
90 id="action-menu-toggle-{{instance}}"
91 aria-label="{{title}}"
92 data-toggle="dropdown"
93 role="{{triggerrole}}"
96 aria-controls="action-menu-{{instance}}-menu"
97 {{#triggerattributes}}
99 {{/triggerattributes}}
105 {{key}},{{component}},{{title}}
108 {{#rawicon}}{{{.}}}{{/rawicon}}
110 <b class="caret"></b>
114 <div class="dropdown-menu {{classes}} {{dropdownalignment}}"{{#attributes}} {{name}}="{{value}}"{{/attributes}}>
117 {{< core/action_menu_link}}
118 {{$actionmenulinkclasses}}dropdown-item {{classes}}{{/actionmenulinkclasses}}
119 {{/ core/action_menu_link}}
121 {{#actionmenufiller}}
122 <div class="dropdown-divider" role="presentation"><span class="filler"> </span></div>
123 {{/actionmenufiller}}
125 {{> core/local/action_menu/subpanel}}
128 <div class="dropdown-item">{{> core/action_menu_item }}</div>