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/presets_action_bar
16
 
17
    Actions bar at the top of the presets page in the database activity.
18
 
19
    Context variables required for this template:
20
    * actionsselect - The presets actions selector.
21
    * id - The database course module id (cmid).
22
 
23
    Example context (json):
24
    {
25
        "actionsselect": {
26
            "classes": "moodle-actionmenu",
27
            "instance": "1",
28
            "triggerrole": "button",
29
            "primary": {
30
                "attributes": [
31
                    {"name": "id", "value": "action-menu-1"},
32
                    {"name": "role", "value": "menu"}
33
                ],
34
                "items": [
35
                    {
36
                        "attributes": [
37
                            {"name": "role", "value": "menuitem"}
38
                        ],
39
                        "rawhtml": "Actions"
40
                    }
41
                ]
42
            },
43
            "secondary": {
44
                "attributes": [
45
                    {"name": "id", "value": "action-menu-1-menu"},
46
                    {"name": "role", "value": "menuitem"}
47
                ],
48
                "items": [
49
                    {
50
                        "rawhtml": "Import preset"
51
                    },
52
                    {
53
                        "rawhtml": "Export preset"
54
                    }
55
                ]
56
            }
57
        },
58
        "id" : 1
59
    }
60
}}
61
<div class="container-fluid tertiary-navigation p-0 m-0">
62
    <div class="row">
63
        <div class="col">
64
            <h2>{{#str}}presets, mod_data{{/str}}</h2>
65
        </div>
66
        <div class="col-auto">
67
            {{#actionsselect}}
68
                <div class='navitem mb-0 presetsactions'>
69
                    {{>core/action_menu}}
70
                </div>
71
            {{/actionsselect}}
72
        </div>
73
    </div>
74
</div>
75
<hr />
76
{{#js}}
77
    require(['mod_data/saveaspreset', 'mod_data/importpresets'], (saveAsPreset, importPresets) => {
78
        saveAsPreset.init();
79
        importPresets.init();
80
    });
81
{{/js}}