MDL-37624 calendar: Added location support
[moodle.git] / calendar / templates / event_item.mustache
CommitLineData
146d3713
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/event_item
19
20 Calendar event item.
21
22 The purpose of this template is to render the event item.
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}}
e00aed51
AN
34<div{{!
35 }} data-type="event"{{!
36 }} data-course-id="{{course.id}}"{{!
37 }} data-event-id="{{id}}"{{!
38 }} class="event"{{!
39 }} data-eventtype-{{calendareventtype}}="1"{{!
40 }} data-event-title="{{name}}"{{!
41 }} data-event-count="{{eventcount}}"{{!
42 }}>
146d3713
SL
43 <div class="card">
44 <div class="box card-header clearfix p-y-1">
45 <div class="commands pull-xs-right">
46 {{#canedit}}
47 {{#candelete}}
e00aed51 48 <a href="{{deleteurl}}" data-action="delete">
146d3713
SL
49 {{#pix}}t/delete, core, {{#str}}delete{{/str}}{{/pix}}
50 </a>
51 {{/candelete}}
e00aed51 52 <a href="{{editurl}}" data-action="edit">
146d3713
SL
53 {{#pix}}t/edit, core, {{#str}}edit{{/str}}{{/pix}}
54 </a>
55 {{/canedit}}
56 </div>
ef4e04ee
MH
57 {{#icon}}<div class="d-inline-block mt-1 align-top">{{#pix}} {{key}}, {{component}}, {{alttext}} {{/pix}}</div>{{/icon}}
58 <div class="d-inline-block">
59 <h3 class="name d-inline-block">{{name}}</h3>
60 <span class="date pull-xs-right m-r-1">{{{formattedtime}}}</span>
61 <div class="location">{{#location}}{{{location}}}{{/location}}</div>
62 </div>
146d3713
SL
63 </div>
64 <div class="description card-block calendar_event_{{eventtype}}">
65 <p>{{{description}}}</p>
66 {{#iscourseevent}}
67 <div><a href="{{url}}">{{course.fullname}}</a></div>
68 {{/iscourseevent}}
69 {{> core_calendar/event_subscription}}
70 {{#isactionevent}}
71 <a href="{{url}}">{{#str}} gotoactivity, core_calendar {{/str}}</a>
72 {{/isactionevent}}
73 {{#groupname}}
74 <div><a href="{{url}}">{{{course.fullname}}}</a></div>
75 <div>{{{groupname}}}</div>
76 {{/groupname}}
77 </div>
78 </div>
e00aed51 79</div>