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
    Moodle is free software: you can redistribute it and/or modify
4
    it under the terms of the GNU General Public License as published by
5
    the Free Software Foundation, either version 3 of the License, or
6
    (at your option) any later version.
7
    Moodle is distributed in the hope that it will be useful,
8
    but WITHOUT ANY WARRANTY; without even the implied warranty of
9
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
10
    GNU General Public License for more details.
11
    You should have received a copy of the GNU General Public License
12
    along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
13
}}
14
{{!
15
    @template core_badges/award_badge
16
    Displays the tertiary nav for the badge recipients page
17
 
18
    Context variables required for this template:
19
    * button stdClass - The back button to be rendered
20
    * urlselect stdClass - The URL select to be rendered
21
    * awardbutton stdClass - The award badge button to be rendered
22
 
23
    Example context (json):
24
    {
25
        "button": {
26
            "id": "buttons_button",
27
            "method" : "get",
28
            "url" : "#",
29
            "primary" : true,
30
            "tooltip" : "This is a tooltip",
31
            "label" : "Button2",
32
            "attributes": [
33
                {
34
                  "name": "data-attribute",
35
                  "value": "yeah"
36
                }
37
            ]
38
        },
39
        "urlselect": {
40
            "id": "url_select_test",
41
            "action": "https://example.com/post",
42
            "formid": "url_select_form",
43
            "sesskey": "sesskey",
44
            "label": "core/url_select",
45
            "helpicon": {
46
                "title": "Help with something",
47
                "text": "Help with something",
48
                "url": "http://example.org/help",
49
                "linktext": "",
50
                "icon":{
51
                    "extraclasses": "iconhelp",
52
                    "attributes": [
53
                        {"name": "src", "value": "../../../pix/help.svg"},
54
                        {"name": "alt", "value": "Help icon"}
55
                    ]
56
                }
57
            },
58
            "showbutton": "Go",
59
            "options": [{
60
                "name": "Group 1", "isgroup": true, "options":
61
                [
62
                    {"name": "Item 1", "isgroup": false, "value": "1"},
63
                    {"name": "Item 2", "isgroup": false, "value": "2"}
64
                ]},
65
                {"name": "Group 2", "isgroup": true, "options":
66
                [
67
                    {"name": "Item 3", "isgroup": false, "value": "3"},
68
                    {"name": "Item 4", "isgroup": false, "value": "4"}
69
                ]}],
70
            "disabled": false,
71
            "title": "Some cool title"
72
        },
73
        "awardbutton": {
74
            "id" : "id_id",
75
            "method" : "get",
76
            "url" : "#",
77
            "primary" : true,
78
            "tooltip" : "This is a tooltip",
79
            "label" : "Button2",
80
            "attributes": [
81
                {
82
                  "name": "data-attribute",
83
                  "value": "yeah"
84
                }
85
            ]
86
        }
87
    }
88
}}
89
<div class="container-fluid tertiary-navigation" id="action_bar">
90
    <div class="row">
91
        {{#button}}
92
            <div class="navitem">
93
                {{> core/single_button }}
94
            </div>
95
        {{/button}}
96
        {{#urlselect}}
97
            <div class="navitem">
98
                {{> core/url_select }}
99
            </div>
100
        {{/urlselect}}
101
        {{#awardbutton}}
102
            <div class="navitem">
103
                {{> core/single_button }}
104
            </div>
105
        {{/awardbutton}}
106
        {{> core_badges/badge_more_nav }}
107
    </div>
108
</div>