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_data/action_bar
16
 
17
    General actions bar at the top of the pages in the database activity.
18
 
19
    Context variables required for this template:
20
    * d - The database instance id.
21
    * urlselect - The data object containing the required properties to render core/url_select.
22
    * fieldselect - The data object containing the required properties to render core/single_select.
23
    * saveaspreset - Whether to display the save as preset button (mod_data/save_as_preset).
24
    * exportpreset - The data object containing the required properties to render core/single_button.
25
 
26
    Example context (json):
27
    {
28
        "d": 1,
29
        "hasback": true,
30
        "backurl": "https://example.com",
31
        "backtitle": "Back",
32
        "title": "Some title",
33
        "urlselect": {
34
            "id": "url_select_test",
35
            "action": "https://example.com/post",
36
            "formid": "url_select_form",
37
            "sesskey": "sesskey",
38
            "classes": "urlselect",
39
            "label": "",
40
            "helpicon": false,
41
            "showbutton": null,
42
            "options": [
43
                {
44
                    "name": "Some name",
45
                    "value": "/mod/data/someurl.php",
46
                    "selected": false
47
                }
48
            ],
49
            "disabled": false,
50
            "title": null
51
        },
52
        "extraurlselect": {
53
            "id": "extra_url_select_test",
54
            "action": "https://example.com/post",
55
            "formid": "extra_url_select_form",
56
            "sesskey": "sesskey",
57
            "classes": "urlselect",
58
            "label": "",
59
            "helpicon": false,
60
            "showbutton": null,
61
            "options": [
62
                {
63
                    "name": "Some name",
64
                    "value": "/mod/data/someurl.php",
65
                    "selected": false
66
                }
67
            ],
68
            "disabled": false,
69
            "title": null
70
        },
71
        "buttons": {
72
            "id": "single_button_test",
73
            "method" : "post",
74
            "formid": "single_button_form",
75
            "url" : "https://example.com/post",
76
            "primary" : false,
77
            "tooltip" : null,
78
            "label" : "Label",
79
            "attributes": []
80
        }
81
    }
82
}}
83
<div class="container-fluid tertiary-navigation">
84
    <div class="row">
85
        <div class="d-flex">
86
            {{#hasback}}
87
                <div class="navitem mb-0 backbutton border-right">
88
                    <a href="{{backurl}}" role="button" title="{{backtitle}}" class="d-flex align-items-center">{{!
89
                    }}{{#pix}} i/previous, moodle {{/pix}}{{!
90
                    }}</a>
91
                </div>
92
            {{/hasback}}
93
            {{#urlselect}}
94
                <div class="navitem mb-0">
95
                    {{>core/url_select}}
96
                </div>
97
            {{/urlselect}}
98
            {{#title}}
99
                <div class="navitem mb-0 title d-flex align-items-center">
100
                    <h2>{{title}}</h2>
101
                </div>
102
            {{/title}}
103
        </div>
104
        <div class="ml-sm-auto d-flex">
105
            {{#extraurlselect}}
106
                <div class="navitem mb-0">
107
                    {{>core/url_select}}
108
                </div>
109
            {{/extraurlselect}}
110
            {{#buttons}}
111
                <div class="navitem mb-0">
112
                    {{>core/single_button}}
113
                </div>
114
            {{/buttons}}
115
        </div>
116
    </div>
117
</div>
118
<hr/>