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 mod_assign/override_actionmenu
19
 
20
    Override select menu for users and groups.
21
 
22
    Classes required for JS:
23
    * none
24
 
25
    Context variables required for this template:
26
    * see mod/lesson/classes/output/override_actionmenu.php
27
 
28
    Example context (json):
29
    {
30
        "urlselect": {
31
            "id": "url_select_test",
32
            "action": "https://example.com/post",
33
            "formid": "url_select_form",
34
            "sesskey": "sesskey",
35
            "label": "core/url_select",
36
            "helpicon": {
37
                "title": "Help with something",
38
                "text": "Help with something",
39
                "url": "http://example.org/help",
40
                "linktext": "",
41
                "icon": {
42
                    "extraclasses": "iconhelp",
43
                    "attributes": [
44
                        {"name": "src", "value": "../../../pix/help.svg"},
45
                        {"name": "alt", "value": "Help icon"}
46
                    ]
47
                }
48
            },
49
            "showbutton": "Go",
50
            "options": [{
51
                "name": "Group 1", "isgroup": true, "options":
52
                [
53
                    {"name": "Item 1", "isgroup": false, "value": "1"},
54
                    {"name": "Item 2", "isgroup": false, "value": "2"}
55
                ]},
56
                {"name": "Group 2", "isgroup": true, "options":
57
                [
58
                    {"name": "Item 3", "isgroup": false, "value": "3"},
59
                    {"name": "Item 4", "isgroup": false, "value": "4"}
60
                ]}],
61
            "disabled": false,
62
            "title": "Some cool title"
63
        },
64
        "addoverride": {
65
            "method" : "get",
66
            "url" : "#",
67
            "formid": "1",
68
            "primary" : true,
69
            "tooltip" : "This is a tooltip",
70
            "label" : "This is a the button text",
71
            "attributes": [
72
                {
73
                    "name": "data-attribute",
74
                    "value": "yeah"
75
                }
76
            ]
77
        }
78
    }
79
 
80
}}
81
<div class="container-fluid tertiary-navigation">
82
    <div class="row">
83
        {{#urlselect}}
84
            <div class="navitem">
85
                {{>core/url_select}}
86
            </div>
87
        {{/urlselect}}
88
        {{#addoverride}}
89
            <div class="navitem">
90
                {{>core/single_button}}
91
            </div>
92
        {{/addoverride}}
93
    </div>
94
</div>