forked from moodle/moodle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
event_details.mustache
113 lines (104 loc) · 4.16 KB
/
event_details.mustache
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
{{!
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 core_calendar/event_details
Calendar event details.
The purpose of this template is to render the event details.
This template is used in the summary modal, day and upcoming views to output event information consistently
across the calendar.
Classes required for JS:
* none
Data attributes required for JS:
* none
Example context (json):
{
"formattedtime": "Wednesday, 17 April, 9:27 AM",
"normalisedeventtype": "Group",
"normalisedeventtypetext": "Group event",
"description": "An random event description",
"location": "Moodle HQ",
"isactionevent": "true",
"course": {
"viewurl": "http://mymoodlesite/course/view.php?id=1",
"fullname": "Course name"
},
"source": "Ical imported",
"groupname": "Group 1",
"iscategoryevent": "true",
"category": {
"nestedname": "Category name"
},
"iscourseevent": "true",
"groupname": "Group name",
"subscription": "true",
"displayeventsource": "true",
"subscriptionname": "Subscription name",
"subscriptionurl": "http://subscriptionurl"
}
}}
<div class="row">
<div class="col-1">{{#pix}} i/calendareventtime, core, {{#str}} when, core_calendar {{/str}} {{/pix}}</div>
<div class="col-11">{{{formattedtime}}}</div>
</div>
{{#normalisedeventtypetext}}
<div class="row mt-1">
<div class="col-1">{{#pix}} i/calendar, core, {{#str}} eventtype, core_calendar {{/str}} {{/pix}}</div>
<div class="col-11">{{normalisedeventtypetext}}</div>
</div>
{{/normalisedeventtypetext}}
{{#description}}
<div class="row mt-1">
<div class="col-1">{{#pix}} i/calendareventdescription, core, {{#str}} description {{/str}} {{/pix}}</div>
<div class="description-content col-11">{{{.}}}</div>
</div>
{{/description}}
{{#location}}
<div class="row mt-1">
<div class="col-1">{{#pix}} i/location, core, {{#str}} location {{/str}} {{/pix}}</div>
<div class="location-content col-11">{{{.}}}</div>
</div>
{{/location}}
{{#iscategoryevent}}
<div class="row mt-1">
<div class="col-1">{{#pix}} i/categoryevent, core, {{#str}} category {{/str}} {{/pix}}</div>
<div class="col-11">{{{category.nestedname}}}</div>
</div>
{{/iscategoryevent}}
{{#course.viewurl}}
<div class="row mt-1">
<div class="col-1">{{#pix}} i/courseevent, core, {{#str}} course {{/str}} {{/pix}}</div>
<div class="col-11"><a href="{{course.viewurl}}">{{{course.fullname}}}</a></div>
</div>
{{/course.viewurl}}
{{#groupname}}
<div class="row mt-1">
<div class="col-1">{{#pix}} i/groupevent, core, {{#str}} group {{/str}} {{/pix}}</div>
<div class="col-11">{{{groupname}}}</div>
</div>
{{/groupname}}
{{#subscription}}
{{#displayeventsource}}
<div class="row mt-1">
<div class="col-1">{{#pix}} i/rss, core, {{#str}} eventsource, core_calendar {{/str}} {{/pix}}</div>
<div class="col-11">
{{#subscriptionurl}}
<p><a href="{{subscriptionurl}}">{{#str}}subscriptionsource, core_calendar, {{{subscriptionname}}}{{/str}}</a></p>
{{/subscriptionurl}}
{{^subscriptionurl}}
<p>{{#str}}subscriptionsource, core_calendar, {{{subscriptionname}}}{{/str}}</p>
{{/subscriptionurl}}
</div>
</div>
{{/displayeventsource}}
{{/subscription}}