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 gradereport_singleview/action_bar
19
 
20
    Context variables required for this template:
21
    * generalnavselector - The data object containing the required properties to render the general navigation selector.
22
    * groupselector - (optional) HTML that outputs the group selector
23
    * itemselector - (optional) HTML that outputs the user or grade item selector
24
    * pagetoggler - (optional) HTML that outputs the user/grade item view toggler
25
    * bulkactions - (optional) HTML that outputs the bulk actione menu
26
 
27
        Example context (json):
28
    {
29
        "generalnavselector": {
30
            "name": "Gradebook tertiary navigation selector",
31
            "value": "opt2",
32
            "baseid": "select-menu56789",
33
            "selectedoption": "Gradebook setup",
34
            "options": [
35
                {
36
                    "selected": false,
37
                     "isgroup": {
38
                         "name": "View",
39
                         "id": "select-menu-group1",
40
                         "options": [
41
                             {
42
                                 "name": "Grader report",
43
                                 "value": "opt1",
44
                                 "id": "select-menu-option1",
45
                                 "selected": false
46
                             }
47
                         ]
48
                     }
49
                },
50
                {
51
                    "selected": false,
52
                    "isgroup": {
53
                        "name": "Setup",
54
                        "id": "select-menu-group2",
55
                        "options": [
56
                            {
57
                                "name": "Gradebook setup",
58
                                "value": "opt2",
59
                                "id": "select-menu-option2",
60
                                "selected": true
61
                            }
62
                        ]
63
                    }
64
                }
65
            ]
66
        },
67
        "groupselector": "<div class='group-selector'></div>",
68
        "itemselector": "<div class='user-selector'></div>",
69
        "pagetoggler": "<div class='page-toggler'></div>",
70
        "bulkactions": "<div class='action-menu'></div>"
71
    }
72
}}
73
<div class="container-fluid tertiary-navigation full-width-bottom-border">
74
    <div class="row w-100">
75
        {{#generalnavselector}}
76
            <div class="navitem order-1">
77
                {{>core/tertiary_navigation_selector}}
78
            </div>
79
            <div class="navitem-divider d-none d-sm-flex order-1"></div>
80
        {{/generalnavselector}}
81
        {{#groupselector}}
82
            <div class="navitem order-2">
83
                {{{.}}}
84
            </div>
85
            <div class="navitem-divider d-none d-sm-flex order-2"></div>
86
        {{/groupselector}}
87
        {{#itemselector}}
88
            <div class="navitem order-3">
89
                {{{.}}}
90
            </div>
91
            <div class="navitem-divider d-none d-sm-flex order-3"></div>
92
        {{/itemselector}}
93
        {{#pagetoggler}}
94
            <div class="d-flex row ml-auto order-4">
95
                {{#bulkactions}}
96
                    <div class="d-flex navitem ml-0 ml-sm-auto mr-3">{{{bulkactions}}}</div>
97
                    {{#js}}
98
                        require(['gradereport_singleview/bulkactions'], function(bulkactions) {
99
                        bulkactions.init();
100
                        });
101
                    {{/js}}
102
                    <div class="navitem-divider d-none d-sm-flex"></div>
103
                {{/bulkactions}}
104
                <div class="d-flex navitem ml-0 mr-auto mr-sm-0 ml-sm-auto">
105
                    {{>gradereport_singleview/page_toggler}}
106
                </div>
107
            </div>
108
        {{/pagetoggler}}
109
    </div>
110
</div>