MDL-78324 core: Convert core/tag to esm
[moodle.git] / lib / templates / action_menu_link.mustache
blob55143816d2affb1aa7cfe7d429a78c38b041a336
1 {{!
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/>.
17 {{!
18     @template core/action_menu_link
20     Action menu link.
22     Example context (json):
23     {
24         "text": "Example link text",
25         "showtext": true,
26         "url": "http://example.com/link"
27     }
29 {{^disabled}}
30     <a href="{{url}}" class="{{$actionmenulinkclasses}}aabtn {{classes}}{{/actionmenulinkclasses}}" {{#attributes}}{{name}}="{{value}}" {{/attributes}}{{#showtext}}aria-labelledby="actionmenuaction-{{instance}}"{{/showtext}}>
31         {{#icon}}
32             {{#pix}}{{key}}, {{component}}, {{title}}{{/pix}}
33         {{/icon}}
34         {{#showtext}}
35             <span class="menu-action-text" id="actionmenuaction-{{instance}}">{{{text}}}</span>
36         {{/showtext}}
37     </a>
38 {{/disabled}}
39 {{#disabled}}
40     <span class="currentlink" role="menuitem">{{#icon}}{{#pix}}{{key}},{{component}},{{title}}{{/pix}}{{/icon}}{{{text}}}</span>
41 {{/disabled}}