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_lesson/override_action_menu
19
 
20
    A select menu and button for user and group overrides.
21
 
22
    Classes required for JS:
23
    * none
24
 
25
    Context variables required for this template:
26
    * see mod/lesson/classes/output/override_action_menu.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
            "link": "https://moodle.org",
66
            "text": "Add override"
67
        },
68
        "headinglevel": 3,
69
        "heading": "Some heading"
70
    }
71
 
72
}}
73
<div class="container-fluid tertiary-navigation">
74
    <div class="row">
75
        {{#urlselect}}
76
            <div class="navitem">
77
                {{>core/url_select}}
78
            </div>
79
        {{/urlselect}}
80
        {{#addoverride}}
81
            <div class="navitem">
82
                <a class="btn btn-primary" href="{{link}}">{{text}}</a>
83
            </div>
84
        {{/addoverride}}
85
    </div>
86
</div>
87
<h{{headinglevel}}>{{heading}}</h{{headinglevel}}>