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/fields_action_bar
|
|
|
16 |
|
|
|
17 |
Actions bar at the top of the field pages in the database activity.
|
|
|
18 |
|
|
|
19 |
Context variables required for this template:
|
|
|
20 |
* d - The database id.
|
|
|
21 |
* fieldselect - The data object containing the required properties to render core/single_select.
|
|
|
22 |
|
|
|
23 |
Example context (json):
|
|
|
24 |
{
|
|
|
25 |
"tertiarytitle": "Manage fields",
|
|
|
26 |
"fieldselect": {
|
|
|
27 |
"id": "single_select_test",
|
|
|
28 |
"name": "fieldselector",
|
|
|
29 |
"method": "get",
|
|
|
30 |
"action": "https://example.com/post",
|
|
|
31 |
"formid": "single_select_form",
|
|
|
32 |
"sesskey": "sesskey",
|
|
|
33 |
"classes": "singleselect",
|
|
|
34 |
"label": "",
|
|
|
35 |
"helpicon": false,
|
|
|
36 |
"options": [
|
|
|
37 |
{
|
|
|
38 |
"name": "Some name",
|
|
|
39 |
"value": "somevalue",
|
|
|
40 |
"selected": false,
|
|
|
41 |
"optgroup": false
|
|
|
42 |
}
|
|
|
43 |
],
|
|
|
44 |
"disabled": false,
|
|
|
45 |
"title": null
|
|
|
46 |
},
|
|
|
47 |
"hasback" : true,
|
|
|
48 |
"backurl": "https://moodlesite.com/mod/data/preset.php",
|
|
|
49 |
"backtitle": "Back"
|
|
|
50 |
}
|
|
|
51 |
}}
|
|
|
52 |
<div class="container-fluid tertiary-navigation">
|
|
|
53 |
<div class="row">
|
|
|
54 |
<div class="d-flex">
|
|
|
55 |
{{#hasback}}
|
|
|
56 |
<div class="navitem mb-0 backbutton border-right">
|
|
|
57 |
<a href="{{backurl}}" role="button" title="{{backtitle}}" class="d-flex align-items-center">{{!
|
|
|
58 |
}}{{#pix}} i/previous, moodle {{/pix}}{{!
|
|
|
59 |
}}</a>
|
|
|
60 |
</div>
|
|
|
61 |
{{/hasback}}
|
|
|
62 |
{{#urlselect}}
|
|
|
63 |
<div class="navitem mb-0">
|
|
|
64 |
{{>core/url_select}}
|
|
|
65 |
</div>
|
|
|
66 |
{{/urlselect}}
|
|
|
67 |
{{#tertiarytitle}}
|
|
|
68 |
<div class="navitem mb-0 title d-flex align-items-center">
|
|
|
69 |
<h2>{{tertiarytitle}}</h2>
|
|
|
70 |
</div>
|
|
|
71 |
{{/tertiarytitle}}
|
|
|
72 |
</div>
|
|
|
73 |
<div class="ml-sm-auto d-flex">
|
|
|
74 |
{{#fieldselect}}
|
|
|
75 |
<div class='navitem mb-0 fieldadd'>
|
|
|
76 |
{{>core/action_menu}}
|
|
|
77 |
</div>
|
|
|
78 |
{{/fieldselect}}
|
|
|
79 |
</div>
|
|
|
80 |
</div>
|
|
|
81 |
</div>
|
|
|
82 |
<hr/>
|