weekly release 3.4dev
[moodle.git] / calendar / templates / month_detailed.mustache
CommitLineData
a4af4c96
SL
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 calendar/month_detailed
19
20 Calendar month view.
21
22 The purpose of this template is to render the month view.
23
24 Classes required for JS:
25 * none
26
27 Data attributes required for JS:
28 * none
29
30 Example context (json):
31 {
32 }
33}}
5ca142dc 34<span id="month-detailed-{{uniqid}}" class="calendarwrapper" data-courseid="{{courseid}}" data-current-time="{{time}}">
64ff737a
AN
35 {{> core_calendar/month_header }}
36 {{> core_calendar/month_navigation }}
836aa3f6 37 <table class="calendarmonth calendartable card-deck m-b-0">
64ff737a
AN
38 <thead>
39 <tr>
40 {{# daynames }}
41 <th class="header text-xs-center">
42 {{shortname}}
43 </th>
44 {{/ daynames }}
45 </tr>
46 </thead>
47 <tbody>
48 {{#weeks}}
5ca142dc 49 <tr data-region="month-view-week">
64ff737a
AN
50 {{#prepadding}}
51 <td class="dayblank">&nbsp;</td>
52 {{/prepadding}}
53 {{#days}}
54 <td class="day text-sm-center text-md-left{{!
55 }}{{#istoday}} today{{/istoday}}{{!
56 }}{{#isweekend}} weekend{{/isweekend}}{{!
57 }}{{#durationevents.0}} duration{{/durationevents.0}}{{!
58 }}{{#durationevents}} duration_{{.}}{{/durationevents}}{{!
5ca142dc
RW
59 }}"
60 data-day-timestamp="{{timestamp}}"
61 data-drop-zone="true">
64ff737a
AN
62 <div class="hidden-sm-down text-xs-center">
63 {{#events.0}}
64 <a href="{{viewdaylink}}" class="day" title="{{viewdaylinktitle}}">{{mday}}</a>
65 {{/events.0}}
66 {{^events.0}}
67 {{mday}}
68 {{/events.0}}
69 {{#events.0}}
5ca142dc
RW
70 <div data-region="day-content">
71 <ul>
72 {{#events}}
64ff737a
AN
73 {{#underway}}
74 <li class="events-underway">[{{name}}]</li>
75 {{/underway}}
76 {{^underway}}
5ca142dc
RW
77 <li class="calendar_event_{{eventtype}}"
78 {{#canedit}}
79 draggable="true"
80 data-drag-type="move"
81 {{/canedit}}>
82
64ff737a
AN
83 <a data-action="view-event" data-event-id="{{id}}" href="{{url}}">{{name}}</a>
84 </li>
85 {{/underway}}
5ca142dc
RW
86 {{/events}}
87 </ul>
88 </div>
64ff737a
AN
89 {{/events.0}}
90 </div>
836aa3f6 91 <div class="hidden-md-up hidden-desktop">
64ff737a
AN
92 {{#events.0}}
93 <a href="{{viewdaylink}}" class="day" title="{{viewdaylinktitle}}">{{mday}}</a>
94 {{/events.0}}
95 {{^events.0}}
5ca142dc
RW
96 <div data-region="day-content">
97 {{mday}}
98 </div>
64ff737a
AN
99 {{/events.0}}
100 </div>
101 </td>
102 {{/days}}
103 {{#postpadding}}
104 <td class="dayblank">&nbsp;</td>
105 {{/postpadding}}
106 </tr>
107 {{/weeks}}
108 </tbody>
109 </table>
110</span>
5ca142dc
RW
111{{#js}}
112require(['jquery', 'core_calendar/drag_drop'], function($, DragDrop) {
113 var root = $('#month-detailed-{{uniqid}}');
114 DragDrop.init(root);
115});
116{{/js}}