Merge branch 'MDL-76842-401' of https://github.com/snake/moodle into MOODLE_401_STABLE
[moodle.git] / course / templates / participants_actionbar.mustache
blob8b265269fa8e519a86237fe42f4600620fd97a54
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         "urlselect" : {
26             "formid": "url_select_f61834256d7754158",
27             "classes": "urlselect",
28             "label": "",
29             "disabled": false,
30             "title":null,
31             "id":"url_select61834256d7754159",
32             "sesskey":"LWILINyZMH",
33             "action":"http:\/\/localhost\/stable_master\/course\/jumpto.php",
34             "showbutton":null,
35             "options": [
36                 {
37                     "name":"Enrolments",
38                     "isgroup":true,
39                     "options": [
40                         {
41                             "name":"Enrolled users",
42                             "value":"\/user\/index.php?id=4",
43                             "selected":true
44                         },
45                         {
46                             "name":"Enrolment methods",
47                             "value":"\/enrol\/instances.php?id=4",
48                             "selected":false
49                         }
50                     ]
51                 },
52                 {
53                     "name":"Groups",
54                     "isgroup":true,
55                     "options": [
56                         {
57                             "name":"Groups",
58                             "value":"\/group\/index.php?id=4",
59                             "selected":false
60                         },
61                         {
62                             "name":"Groupings",
63                             "value":"\/group\/groupings.php?id=4",
64                             "selected":false
65                         },
66                         {
67                             "name":"Overview",
68                             "value":"\/group\/overview.php?id=4",
69                             "selected":false
70                         }
71                     ]
72                 },
73                 {
74                     "name":"Permissions",
75                     "isgroup":true,
76                     "options": [
77                         {
78                             "name":"Permissions",
79                             "value":"\/admin\/roles\/permissions.php?contextid=279",
80                             "selected":false
81                         },
82                         {
83                             "name":"Other users",
84                             "value":"\/enrol\/otherusers.php?id=4",
85                             "selected":false
86                         },
87                         {
88                             "name":"Check permissions",
89                             "value":"\/admin\/roles\/check.php?contextid=279",
90                             "selected":false
91                         }
92                     ]
93                 }
94             ],
95             "labelattributes":[],
96             "helpicon":false,
97             "attributes":[]
98         },
99         "renderedcontent":"<div data-region=\"wrapper\" data-table-uniqueid=\"user-index-participants-4\"><\/div>"
100     }
102 <div class="container-fluid tertiary-navigation" id="action_bar">
103     <div class="row">
104         {{#urlselect}}
105             <div class="navitem">
106                 {{> core/url_select }}
107             </div>
108         {{/urlselect}}
109         {{#renderedcontent}}
110             <div class="navitem">
111                 {{{renderedcontent}}}
112             </div>
113         {{/renderedcontent}}
114     </div>
115 </div>