Merge branch 'MDL-79937_fixlessonmatching' of https://github.com/catalystfd/moodle
[moodle.git] / course / templates / participants_actionbar.mustache
blob8a3ef8e0b24439244f14ca827c6fc7683a3cdbf7
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/>.
14 {{!
15     @template core_course/participants_actionbar
17     Displays the tertiary nav for the participants page
19     Context variables required for this template:
20     * urlselect Object - The content to be rendered within the url_select
21     * renderedcontent String - Any additional content/actions to be displayed inline with the select box
23     Example context (json):
24     {
25         "navigation" : {
26             "baseid": "select-menuf61834256d7754158",
27             "label": "Participant navigation",
28             "options": [
29                 {
30                     "name":"Enrolments",
31                     "isgroup":true,
32                     "options": [
33                         {
34                             "name":"Enrolled users",
35                             "value":"\/user\/index.php?id=4",
36                             "selected":true
37                         },
38                         {
39                             "name":"Enrolment methods",
40                             "value":"\/enrol\/instances.php?id=4",
41                             "selected":false
42                         }
43                     ]
44                 },
45                 {
46                     "name":"Groups",
47                     "isgroup":true,
48                     "options": [
49                         {
50                             "name":"Groups",
51                             "value":"\/group\/index.php?id=4",
52                             "selected":false
53                         },
54                         {
55                             "name":"Groupings",
56                             "value":"\/group\/groupings.php?id=4",
57                             "selected":false
58                         },
59                         {
60                             "name":"Overview",
61                             "value":"\/group\/overview.php?id=4",
62                             "selected":false
63                         }
64                     ]
65                 },
66                 {
67                     "name":"Permissions",
68                     "isgroup":true,
69                     "options": [
70                         {
71                             "name":"Permissions",
72                             "value":"\/admin\/roles\/permissions.php?contextid=279",
73                             "selected":false
74                         },
75                         {
76                             "name":"Other users",
77                             "value":"\/enrol\/otherusers.php?id=4",
78                             "selected":false
79                         },
80                         {
81                             "name":"Check permissions",
82                             "value":"\/admin\/roles\/check.php?contextid=279",
83                             "selected":false
84                         }
85                     ]
86                 }
87             ],
88             "selectedoption":"Enrolled users",
89             "name":"participantsnavigation",
90             "value":"\/user\/index.php?id=4",
91             "labelattributes":[
92                 {
93                     "name":"class",
94                     "value":"sr-only"
95                 }
96             ]
97         },
98         "renderedcontent":"<div data-region=\"wrapper\" data-table-uniqueid=\"user-index-participants-4\"><\/div>"
99     }
101 <div class="container-fluid tertiary-navigation" id="action_bar">
102     <div class="row">
103         {{#navigation}}
104             <div class="navitem">
105                 {{> core/tertiary_navigation_selector}}
106             </div>
107         {{/navigation}}
108         {{#renderedcontent}}
109             <div class="navitem">
110                 {{{renderedcontent}}}
111             </div>
112         {{/renderedcontent}}
113     </div>
114 </div>