526fc8e6c7df6cab6b7c92bcad9cc6f1e782f73e
[moodle.git] / theme / bootstrapbase / templates / block_myoverview / course-event-list.mustache
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/>.
16 }}
17 {{!
18     @template block_myoverview/course-event-list
20     This template renders a list of events for the myoverview block
21     sort by courses view.
23     Example context (json):
24     {
25     }
26 }}
27 <div data-region="event-list-container"
28      data-limit="{{$limit}}20{{/limit}}"
29      data-course-id="{{$courseid}}{{/courseid}}"
30      data-last-id="{{$lastid}}{{/lastid}}"
31      id="event-list-container-{{$courseid}}{{/courseid}}">
33     <div data-region="event-list-content">
34         {{< block_myoverview/event-list-group }}
35             {{$title}}{{#str}} recentlyoverdue, block_myoverview {{/str}}{{/title}}
36             {{$extratitleclasses}}text-danger{{/extratitleclasses}}
37             {{$startday}}-14{{/startday}}
38             {{$endday}}0{{/endday}}
39             {{$eventlistitems}}
40                 {{> block_myoverview/course-event-list-items }}
41             {{/eventlistitems}}
42         {{/ block_myoverview/event-list-group }}
43         {{< block_myoverview/event-list-group }}
44             {{$title}}{{#str}} today {{/str}}{{/title}}
45             {{$extratitleclasses}}{{/extratitleclasses}}
46             {{$startday}}0{{/startday}}
47             {{$endday}}1{{/endday}}
48             {{$eventlistitems}}
49                 {{> block_myoverview/course-event-list-items }}
50             {{/eventlistitems}}
51         {{/ block_myoverview/event-list-group }}
52         {{< block_myoverview/event-list-group }}
53             {{$title}}{{#str}} next7days, block_myoverview {{/str}}{{/title}}
54             {{$extratitleclasses}}{{/extratitleclasses}}
55             {{$startday}}1{{/startday}}
56             {{$endday}}7{{/endday}}
57             {{$eventlistitems}}
58                 {{> block_myoverview/course-event-list-items }}
59             {{/eventlistitems}}
60         {{/ block_myoverview/event-list-group }}
61         {{< block_myoverview/event-list-group }}
62             {{$title}}{{#str}} next30days, block_myoverview {{/str}}{{/title}}
63             {{$extratitleclasses}}{{/extratitleclasses}}
64             {{$startday}}7{{/startday}}
65             {{$endday}}30{{/endday}}
66             {{$eventlistitems}}
67                 {{> block_myoverview/course-event-list-items }}
68             {{/eventlistitems}}
69         {{/ block_myoverview/event-list-group }}
70         {{< block_myoverview/event-list-group }}
71             {{$title}}{{#str}} future, block_myoverview {{/str}}{{/title}}
72             {{$extratitleclasses}}{{/extratitleclasses}}
73             {{$startday}}30{{/startday}}
74             {{$endday}}{{/endday}}
75             {{$eventlistitems}}
76                 {{> block_myoverview/course-event-list-items }}
77             {{/eventlistitems}}
78         {{/ block_myoverview/event-list-group }}
80         <div class="text-xs-center text-center m-b-1">
81             <button type="button" class="btn btn-secondary" data-action="view-more">
82                 {{#str}} viewmore {{/str}}
83                 <span class="hidden" data-region="loading-icon-container">
84                     {{> core/loading }}
85                 </span>
86             </button>
87         </div>
88     </div>
89     <div class="hidden text-xs-center text-center m-y-3" data-region="empty-message">
90         <img class="empty-placeholder-image-sm"
91              src="{{urls.noevents}}"
92              alt="{{#str}} noevents, block_myoverview {{/str}}">
93         <p class="text-muted m-t-1">{{#str}} noevents, block_myoverview {{/str}}</p>
94         <a href="{{viewurl}}" class="btn btn-secondary text-primary">
95             {{#str}} viewcourse, block_myoverview {{/str}}
96         </a>
97     </div>
98 </div>
99 {{#js}}
100 require(['jquery', 'block_myoverview/event_list'], function($, EventList) {
101     var root = $("#event-list-container-{{$courseid}}{{/courseid}}");
102     EventList.registerEventListeners(root);
103 });
104 {{/js}}