2017-08-08 08:11:31 +08:00
|
|
|
{{!
|
|
|
|
This file is part of Moodle - http://moodle.org/
|
|
|
|
|
|
|
|
Moodle is free software: you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
Moodle is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
}}
|
|
|
|
{{!
|
|
|
|
@template calendar/month_detailed
|
|
|
|
|
|
|
|
Calendar month view.
|
|
|
|
|
|
|
|
The purpose of this template is to render the month view.
|
|
|
|
|
|
|
|
Classes required for JS:
|
|
|
|
* none
|
|
|
|
|
|
|
|
Data attributes required for JS:
|
|
|
|
* none
|
|
|
|
|
|
|
|
Example context (json):
|
|
|
|
{
|
|
|
|
}
|
|
|
|
}}
|
2017-08-21 06:27:47 +00:00
|
|
|
<div id="month-detailed-{{uniqid}}" class="calendarwrapper" data-courseid="{{courseid}}" data-current-time="{{time}}">
|
2017-07-19 09:34:34 +08:00
|
|
|
{{> core_calendar/month_header }}
|
|
|
|
{{> core_calendar/month_navigation }}
|
2017-08-08 13:11:42 +08:00
|
|
|
<table class="calendarmonth calendartable card-deck m-b-0">
|
2017-07-19 09:34:34 +08:00
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
{{# daynames }}
|
|
|
|
<th class="header text-xs-center">
|
|
|
|
{{shortname}}
|
|
|
|
</th>
|
|
|
|
{{/ daynames }}
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
{{#weeks}}
|
2017-08-17 06:27:27 +00:00
|
|
|
<tr data-region="month-view-week">
|
2017-07-19 09:34:34 +08:00
|
|
|
{{#prepadding}}
|
|
|
|
<td class="dayblank"> </td>
|
|
|
|
{{/prepadding}}
|
|
|
|
{{#days}}
|
2017-08-21 06:27:47 +00:00
|
|
|
<td class="clickable day text-sm-center text-md-left{{!
|
2017-07-19 09:34:34 +08:00
|
|
|
}}{{#istoday}} today{{/istoday}}{{!
|
|
|
|
}}{{#isweekend}} weekend{{/isweekend}}{{!
|
|
|
|
}}{{#durationevents.0}} duration{{/durationevents.0}}{{!
|
|
|
|
}}{{#durationevents}} duration_{{.}}{{/durationevents}}{{!
|
2017-08-17 06:27:27 +00:00
|
|
|
}}"
|
|
|
|
data-day-timestamp="{{timestamp}}"
|
2017-08-21 06:27:47 +00:00
|
|
|
data-drop-zone="true"
|
|
|
|
data-region="day"
|
|
|
|
data-new-event-timestamp="{{neweventtimestamp}}">
|
2017-07-19 09:34:34 +08:00
|
|
|
<div class="hidden-sm-down text-xs-center">
|
|
|
|
{{#events.0}}
|
2017-08-21 06:27:47 +00:00
|
|
|
<a data-action="view-day-link" href="{{viewdaylink}}" class="day" title="{{viewdaylinktitle}}">{{mday}}</a>
|
2017-07-19 09:34:34 +08:00
|
|
|
{{/events.0}}
|
|
|
|
{{^events.0}}
|
|
|
|
{{mday}}
|
|
|
|
{{/events.0}}
|
|
|
|
{{#events.0}}
|
2017-08-17 06:27:27 +00:00
|
|
|
<div data-region="day-content">
|
|
|
|
<ul>
|
|
|
|
{{#events}}
|
2017-07-19 09:34:34 +08:00
|
|
|
{{#underway}}
|
|
|
|
<li class="events-underway">[{{name}}]</li>
|
|
|
|
{{/underway}}
|
|
|
|
{{^underway}}
|
2017-08-17 06:27:27 +00:00
|
|
|
<li class="calendar_event_{{eventtype}}"
|
2017-08-21 06:27:47 +00:00
|
|
|
data-region="event-item"
|
2017-08-17 06:27:27 +00:00
|
|
|
{{#canedit}}
|
|
|
|
draggable="true"
|
|
|
|
data-drag-type="move"
|
|
|
|
{{/canedit}}>
|
|
|
|
|
2017-07-19 09:34:34 +08:00
|
|
|
<a data-action="view-event" data-event-id="{{id}}" href="{{url}}">{{name}}</a>
|
|
|
|
</li>
|
|
|
|
{{/underway}}
|
2017-08-17 06:27:27 +00:00
|
|
|
{{/events}}
|
|
|
|
</ul>
|
|
|
|
</div>
|
2017-07-19 09:34:34 +08:00
|
|
|
{{/events.0}}
|
|
|
|
</div>
|
2017-08-08 13:11:42 +08:00
|
|
|
<div class="hidden-md-up hidden-desktop">
|
2017-07-19 09:34:34 +08:00
|
|
|
{{#events.0}}
|
|
|
|
<a href="{{viewdaylink}}" class="day" title="{{viewdaylinktitle}}">{{mday}}</a>
|
|
|
|
{{/events.0}}
|
|
|
|
{{^events.0}}
|
2017-08-17 06:27:27 +00:00
|
|
|
<div data-region="day-content">
|
|
|
|
{{mday}}
|
|
|
|
</div>
|
2017-07-19 09:34:34 +08:00
|
|
|
{{/events.0}}
|
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
{{/days}}
|
|
|
|
{{#postpadding}}
|
|
|
|
<td class="dayblank"> </td>
|
|
|
|
{{/postpadding}}
|
|
|
|
</tr>
|
|
|
|
{{/weeks}}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
2017-08-21 06:27:47 +00:00
|
|
|
</div>
|
2017-08-17 06:27:27 +00:00
|
|
|
{{#js}}
|
|
|
|
require(['jquery', 'core_calendar/drag_drop'], function($, DragDrop) {
|
|
|
|
var root = $('#month-detailed-{{uniqid}}');
|
|
|
|
DragDrop.init(root);
|
|
|
|
});
|
|
|
|
{{/js}}
|