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 "text": "Example link text",
25 "title": "Example link title",
26 "url": "http://example.com/link",
27 "classes": "icon menu-action",
29 "triggerextraclasses": "",
31 {"name": "role", "value": "menuitem" },
32 {"name": "data-title", "value": "mymoodle,admin" }
35 "classes": "menu align-tr-br",
36 "dropdownalignment": "dropdown-menu-right",
38 {"name": "id", "value": "action-menu-0-menu"},
39 {"name": "data-rel", "value": "menu-content"},
40 {"name": "role", "value": "menu"},
41 {"name": "data-align", "value": "tr-br"}
46 "id": "action_link59ecf8394a68078",
49 "url": "http://example.com/link",
55 "classes": "icon menu-action",
57 {"name": "role", "value": "menuitem"},
58 {"name": "data-title", "value": "mymoodle,admin"}
66 "id": "action_link59ecf8394a68079",
73 {"name": "role", "value": "menuitem"}
81 <div class="dropdown{{^secondary.items}} hidden{{/secondary.items}}">
82 <a href="#" tabindex="0" class="{{triggerextraclasses}} dropdown-toggle icon-no-margin" id="action-menu-toggle-{{instance}}" aria-label="{{title}}" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false" aria-controls="action-menu-{{instance}}-menu">
87 {{key}},{{component}},{{title}}
90 {{#rawicon}}{{{.}}}{{/rawicon}}
96 <div class="dropdown-menu {{classes}} {{dropdownalignment}}"{{#attributes}} {{name}}="{{value}}"{{/attributes}}>
99 {{< core/action_menu_link}}
100 {{$actionmenulinkclasses}}dropdown-item {{classes}}{{/actionmenulinkclasses}}
101 {{/ core/action_menu_link}}
103 {{#actionmenufiller}}
104 <div class="dropdown-divider" role="presentation"><span class="filler"> </span></div>
105 {{/actionmenufiller}}
107 {{^actionmenufiller}}
108 <div class="dropdown-item">{{> core/action_menu_item }}</div>
109 {{/actionmenufiller}}