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/>.
18 @template core_calendar/event_details
20 Calendar event details.
22 The purpose of this template is to render the event details.
24 This template is used in the summary modal, day and upcoming views to output event information consistently
27 Classes required for JS:
30 Data attributes required for JS:
33 Example context (json):
35 "formattedtime": "Wednesday, 17 April, 9:27 AM",
36 "normalisedeventtype": "Group",
37 "normalisedeventtypetext": "Group event",
38 "description": "An random event description",
39 "location": "Moodle HQ",
40 "isactionevent": "true",
42 "viewurl": "http://mymoodlesite/course/view.php?id=1",
43 "fullname": "Course name"
45 "source": "Ical imported",
46 "groupname": "Group 1",
47 "iscategoryevent": "true",
49 "nestedname": "Category name"
51 "iscourseevent": "true",
52 "groupname": "Group name",
53 "subscription": "true",
54 "displayeventsource": "true",
55 "subscriptionname": "Subscription name",
56 "subscriptionurl": "http://subscriptionurl"
60 <div class="col-1">{{#pix}} i/calendareventtime, core, {{#str}} when, core_calendar {{/str}} {{/pix}}</div>
61 <div class="col-11">{{{formattedtime}}}</div>
63 {{#normalisedeventtypetext}}
64 <div class="row mt-1">
65 <div class="col-1">{{#pix}} i/calendar, core, {{#str}} eventtype, core_calendar {{/str}} {{/pix}}</div>
66 <div class="col-11">{{normalisedeventtypetext}}</div>
68 {{/normalisedeventtypetext}}
70 <div class="row mt-1">
71 <div class="col-1">{{#pix}} i/calendareventdescription, core, {{#str}} description {{/str}} {{/pix}}</div>
72 <div class="description-content col-11">{{{.}}}</div>
76 <div class="row mt-1">
77 <div class="col-1">{{#pix}} i/location, core, {{#str}} location {{/str}} {{/pix}}</div>
78 <div class="location-content col-11">{{{.}}}</div>
82 <div class="row mt-1">
83 <div class="col-1">{{#pix}} i/categoryevent, core, {{#str}} category {{/str}} {{/pix}}</div>
84 <div class="col-11">{{{category.nestedname}}}</div>
88 <div class="row mt-1">
89 <div class="col-1">{{#pix}} i/courseevent, core, {{#str}} course {{/str}} {{/pix}}</div>
90 <div class="col-11"><a href="{{course.viewurl}}">{{{course.fullname}}}</a></div>
94 <div class="row mt-1">
95 <div class="col-1">{{#pix}} i/groupevent, core, {{#str}} group {{/str}} {{/pix}}</div>
96 <div class="col-11">{{{groupname}}}</div>
100 {{#displayeventsource}}
101 <div class="row mt-1">
102 <div class="col-1">{{#pix}} i/rss, core, {{#str}} eventsource, core_calendar {{/str}} {{/pix}}</div>
105 <p><a href="{{subscriptionurl}}">{{#str}}subscriptionsource, core_calendar, {{{subscriptionname}}}{{/str}}</a></p>
108 <p>{{#str}}subscriptionsource, core_calendar, {{{subscriptionname}}}{{/str}}</p>
112 {{/displayeventsource}}