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/user_action_menu_items
20 Template for user action menu items.
22 Context variables required for this template:
23 * items - The different items to be rendered
24 * link - If a link is provided render it.
25 * title - The text to be shown for the link.
26 * url - The href for the link.
27 * pixicon - (Optional) The Moodle icon to use
28 * imgsrc - (Optional) If provided, uses this as source for an image tag. Note: pixicon is preferred.
29 * submenulink - If a submenu link is provided render it.
30 * submenuid - The id of the targeted submenu.
31 * title - The text to be shown for the link.
32 * pixicon - (Optional) The Moodle icon to use.
33 * imgsrc - (Optional) If provided, uses this as source for an image tag. Note: pixicon is preferred.
34 * divider - Whether a divider is to be displayed or not
36 Example context (json):
41 "title": "Github user",
42 "url": "https://raw.githubusercontent.com/",
43 "pixicon": "t/dashboard",
44 "imgsrc": "https://raw.githubusercontent.com/moodle/moodle/master/pix/t/check.png"
51 "submenuid": "86cebd87",
52 "pixicon": "t/dashboard",
53 "imgsrc": "https://raw.githubusercontent.com/moodle/moodle/master/pix/t/check.png"
62 <a href="{{{url}}}" class="dropdown-item" role="menuitem" tabindex="-1">
64 {{#pix}}{{pixicon}}{{/pix}}
67 {{#imgsrc}}<img aria-hidden="true" src="{{imgsrc}}" alt="{{title}}"/>{{/imgsrc}}
73 <a href="#" class="carousel-navigation-link dropdown-item" role="menuitem" tabindex="-1" data-carousel-target-id="carousel-item-{{submenuid}}">
75 {{#pix}}{{pixicon}}{{/pix}}
78 {{#imgsrc}}<img aria-hidden="true" src="{{imgsrc}}" alt="{{title}}"/>{{/imgsrc}}
83 {{#divider}}<div class="dropdown-divider"></div>{{/divider}}