Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
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 details.
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/user_action_menu_items
19
 
20
    Template for user action menu items.
21
 
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
35
 
36
    Example context (json):
37
    {
38
        "items": [
39
            {
40
                "link": {
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"
45
                },
46
                "divider": 1
47
            },
48
            {
49
                "submenulink": {
50
                    "title": "Title",
51
                    "submenuid": "86cebd87",
52
                    "pixicon": "t/dashboard",
53
                    "imgsrc": "https://raw.githubusercontent.com/moodle/moodle/master/pix/t/check.png"
54
                },
55
                "divider": 1
56
            }
57
        ]
58
    }
59
}}
60
{{#items}}
61
    {{#link}}
62
        <a href="{{{url}}}" class="dropdown-item" role="menuitem" tabindex="-1">
63
            {{#pixicon}}
64
                {{#pix}}{{pixicon}}{{/pix}}
65
            {{/pixicon}}
66
            {{^pixicon}}
67
                {{#imgsrc}}<img aria-hidden="true" src="{{imgsrc}}" alt="{{title}}"/>{{/imgsrc}}
68
            {{/pixicon}}
69
            {{title}}
70
        </a>
71
    {{/link}}
72
    {{#submenulink}}
73
        <a href="#" class="carousel-navigation-link dropdown-item" role="menuitem" tabindex="-1" data-carousel-target-id="carousel-item-{{submenuid}}">
74
            {{#pixicon}}
75
                {{#pix}}{{pixicon}}{{/pix}}
76
            {{/pixicon}}
77
            {{^pixicon}}
78
                {{#imgsrc}}<img aria-hidden="true" src="{{imgsrc}}" alt="{{title}}"/>{{/imgsrc}}
79
            {{/pixicon}}
80
            {{title}}
81
        </a>
82
    {{/submenulink}}
83
    {{#divider}}<div class="dropdown-divider"></div>{{/divider}}
84
{{/items}}