Merge branch 'MDL-62069-master' of git://github.com/bmbrands/moodle
[moodle.git] / calendar / templates / event_summary_body.mustache
blobde5424e0ae08c228289dc39d0702ccf1f8b3b858
1 {{!
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/>.
17 {{!
18     @template core_calendar/event_summary_body
20     This template renders the body of calendar events summary modal.
22     Example context (json):
23     {
24         "timestart": 1490320388,
25         "description": "An random event description",
26         "eventtype": "User",
27         "source": "Ical imported",
28         "groupname": "Group 1"
29     }
31 <div{{!
32     }} class="summary-modal-container"{{!
33     }} data-region="summary-modal-container"{{!
34     }} data-event-id="{{id}}"{{!
35     }} data-event-title="{{name}}"{{!
36     }} data-event-count="{{eventcount}}"{{!
37     }} data-event-="{{repeatid}}"{{!
38     }} data-action-event="{{isactionevent}}"{{!
39     }} data-edit-url="{{editurl}}"{{!
40     }}>
41     <div class="container-fluid">
42         <div class="row">
43             <div class="col-xs-1">{{#pix}} i/calendareventtime, core, {{#str}} when, core_calendar {{/str}} {{/pix}}</div>
44             <div class="col-xs-11">{{#userdate}} {{timestart}}, {{#str}} strftimerecentfull {{/str}} {{/userdate}}</div>
45         </div>
46         <div class="row m-t-1">
47             <div class="col-xs-1">{{#pix}} i/calendar, core, {{#str}} eventtype, core_calendar {{/str}} {{/pix}}</div>
48             <div class="col-xs-11">{{eventtype}}</div>
49         </div>
50         {{#description}}
51         <div class="row m-t-1">
52             <div class="col-xs-1">{{#pix}} i/calendareventdescription, core, {{#str}} description {{/str}} {{/pix}}</div>
53             <div class="description-content col-xs-11">{{{.}}}</div>
54         </div>
55         {{/description}}
56         {{#isactionevent}}
57         <div class="row m-t-1">
58             <div class="col-xs-1">{{#pix}} i/courseevent, core, {{#str}} course {{/str}} {{/pix}}</div>
59             <div class="col-xs-11"><a href="{{course.viewurl}}">{{{course.fullname}}}</a></div>
60         </div>
61         {{/isactionevent}}
62         {{#iscategoryevent}}
63         <div class="row m-t-1">
64             <div class="col-xs-1">{{#pix}} i/categoryevent, core, {{#str}} category {{/str}} {{/pix}}</div>
65             <div class="col-xs-11">{{{category.nestedname}}}</div>
66         </div>
67         {{/iscategoryevent}}
68         {{#iscourseevent}}
69         <div class="row m-t-1">
70             <div class="col-xs-1">{{#pix}} i/courseevent, core, {{#str}} course {{/str}} {{/pix}}</div>
71             <div class="col-xs-11"><a href="{{url}}">{{{course.fullname}}}</a></div>
72         </div>
73         {{/iscourseevent}}
74         {{#groupname}}
75         <div class="row m-t-1">
76             <div class="col-xs-1">{{#pix}} i/courseevent, core, {{#str}} course {{/str}} {{/pix}}</div>
77             <div class="col-xs-11"><a href="{{url}}">{{{course.fullname}}}</a></div>
78         </div>
79         <div class="row m-t-1">
80             <div class="col-xs-1">{{#pix}} i/groupevent, core, {{#str}} group {{/str}} {{/pix}}</div>
81             <div class="col-xs-11">{{{groupname}}}</div>
82         </div>
83         {{/groupname}}
84         {{#subscription}}
85             {{#displayeventsource}}
86                 <div class="row m-t-1">
87                     <div class="col-xs-1">{{#pix}} i/rss, core, {{#str}} eventsource, core_calendar {{/str}} {{/pix}}</div>
88                     <div class="col-xs-11">
89                         {{#subscriptionurl}}
90                             <p><a href="{{subscriptionurl}}">{{#str}}subscriptionsource, core_calendar, {{{subscriptionname}}}{{/str}}</a></p>
91                         {{/subscriptionurl}}
92                         {{^subscriptionurl}}
93                             <p>{{#str}}subscriptionsource, core_calendar, {{{subscriptionname}}}{{/str}}</p>
94                         {{/subscriptionurl}}
95                     </div>
96                 </div>
97             {{/displayeventsource}}
98         {{/subscription}}
99     </div>
100 </div>