Merge branch 'MDL-62069-master' of git://github.com/bmbrands/moodle
[moodle.git] / calendar / templates / event_filter.mustache
blob4e6e789e143a0b266b86efac1c5579ea41f3142b
1 {{!
2     This file is part of Moodle - http://moodle.org/
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.
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.
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/>.
17 {{!
18     @template calendar/event_filter
20     Filter to select which event types displayed on this page.
22     Classes required for JS:
23     * none
25     Data attributes required for JS:
26     * none
28     Example context (json):
29     {
30     }
32 <div id="event-filter-{{uniqid}}" class="calendar_filters m-t-2">
33     <ul>
34         {{#eventtypes}}
35             <li>
36                 {{> core_calendar/event_filter_key }}
37             </li>
38         {{/eventtypes}}
39     </ul>
40 </div>
41 {{#js}}
42 require(['jquery', 'core_calendar/calendar_filter'], function($, CalendarFilter) {
43     CalendarFilter.init($("#event-filter-{{uniqid}}"));
44 });
45 {{/js}}