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 mod_feedback/main_action_menu
16
    Tertiary nav for the feedback module
17
    Classes required for JS:
18
        * none
19
    Data attributes required for JS:
20
        * data-region
21
    Context variables required for this template:
22
        * see mod/feedback/classes/output/edit_action_bar.php
23
        * see mod/feedback/classes/output/edit_template_action_bar.php
24
        * see mod/feedback/classes/output/responses_action_bar.php
25
        * see mod/feedback/classes/output/standard_action_bar.php
26
    Example context (json):
27
    {
28
        "left": {
29
            "actionlink": {
30
                "disabled": false,
31
                "url": "#",
32
                "id": "test-id",
33
                "classes": "btn btn-link",
34
                "attributes": [
35
                    {
36
                        "name": "title",
37
                        "value": "Action link's title"
38
                    }
39
                ],
40
                "icon": {
41
                    "attributes": [
42
                        {"name": "src", "value": "https://raw.githubusercontent.com/moodle/moodle/master/pix/t/check.png"},
43
                        {"name": "alt", "value": "Action link's icon"}
44
                    ]
45
                },
46
                "text": "This is an action link"
47
            },
48
            "urlselect": {
49
                "id": "url_select_test",
50
                "action": "https://example.com/post",
51
                "formid": "url_select_form",
52
                "sesskey": "sesskey",
53
                "label": "core/url_select",
54
                "helpicon": {
55
                    "title": "Help with something",
56
                    "text": "Help with something",
57
                    "url": "http://example.org/help",
58
                    "linktext": "",
59
                    "icon":{
60
                        "extraclasses": "iconhelp",
61
                        "attributes": [
62
                            {"name": "src", "value": "../../../pix/help.svg"},
63
                            {"name": "alt", "value": "Help icon"}
64
                        ]
65
                    }
66
                },
67
                "showbutton": "Go",
68
                "options": [{
69
                    "name": "Group 1", "isgroup": true, "options":
70
                    [
71
                        {"name": "Item 1", "isgroup": false, "value": "1"},
72
                        {"name": "Item 2", "isgroup": false, "value": "2"}
73
                    ]},
74
                    {"name": "Group 2", "isgroup": true, "options":
75
                    [
76
                        {"name": "Item 3", "isgroup": false, "value": "3"},
77
                        {"name": "Item 4", "isgroup": false, "value": "4"}
78
                    ]}],
79
                "disabled": false,
80
                "title": "Some cool title"
81
            },
82
            "singleselect": {
83
                "name": "lang",
84
                "method": "get",
85
                "action": "http://localhost/stable_master/mod/scorm/player.php",
86
                "classes": "langmenu",
87
                "label": "Zombies are coming...",
88
                "disabled": false,
89
                "title": null,
90
                "formid": "randomid",
91
                "id": "single_select5833dd4f4b08d108",
92
                "params": [
93
                    {
94
                        "name": "scoid",
95
                        "value": "12"
96
                    },
97
                    {
98
                        "name": "cm",
99
                        "value": "15"
100
                    },
101
                    {
102
                        "name": "mode",
103
                        "value": "review"
104
                    },
105
                    {
106
                        "name": "currentorg",
107
                        "value": "eXeMapADrive4823c6301cf72b22b72"
108
                    }
109
                ],
110
                "options": [
111
                    {
112
                        "value": "en",
113
                        "name": "English ‎(en)‎",
114
                        "selected": true,
115
                        "optgroup": false
116
                    },
117
                    {
118
                        "value": "ar",
119
                        "name": "Muhaaaa..",
120
                        "selected": false,
121
                        "optgroup": false
122
                    }
123
                ],
124
                "labelattributes": [],
125
                "helpicon": false
126
            }
127
        },
128
        "usetemplate": {
129
            "id": 1,
130
            "templateid": 2
131
        },
132
        "export": {
133
            "disabled": false,
134
            "url": "#",
135
            "id": "test-id",
136
            "classes": "btn btn-link",
137
            "attributes": [
138
                {
139
                    "name": "title",
140
                    "value": "Action link's title"
141
                }
142
            ],
143
            "icon": {
144
                "attributes": [
145
                    {"name": "src", "value": "https://raw.githubusercontent.com/moodle/moodle/master/pix/t/check.png"},
146
                    {"name": "alt", "value": "Action link's icon"}
147
                ]
148
            },
149
            "text": "This is an action link"
150
        }
151
    }
152
}}
153
<div class="container-fluid tertiary-navigation">
154
    <div class="row">
155
        {{#left}}
156
            {{#actionlink}}
157
                <div class="navitem">
158
                    {{> core/action_link}}
159
                </div>
160
            {{/actionlink}}
161
            {{#urlselect}}
162
                <div class="navitem">
163
                    {{> core/url_select}}
164
                </div>
165
            {{/urlselect}}
166
            {{#singleselect}}
167
                <div class="navitem">
168
                    {{> core/single_select}}
169
                </div>
170
            {{/singleselect}}
171
        {{/left}}
172
        {{#usetemplate }}
173
            <div class="navitem">
174
                {{> mod_feedback/use_template }}
175
            </div>
176
        {{/usetemplate}}
177
        {{#export}}
178
            <div class="navitem ml-sm-auto">
179
                {{> core/action_link }}
180
            </div>
181
        {{/export}}
182
    </div>
183
</div>