Merge branch 'MDL-65071-master-new' of git://github.com/mihailges/moodle
[moodle.git] / calendar / templates / event_summary_body.mustache
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/>.
16 }}
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         "location": "13th floor, building 42",
27         "eventtype": "User",
28         "source": "Ical imported",
29         "groupname": "Group 1"
30     }
31 }}
32 <div{{!
33     }} class="summary-modal-container"{{!
34     }} data-region="summary-modal-container"{{!
35     }} data-event-id="{{id}}"{{!
36     }} data-event-title="{{name}}"{{!
37     }} data-event-count="{{eventcount}}"{{!
38     }} data-event-="{{repeatid}}"{{!
39     }} data-action-event="{{isactionevent}}"{{!
40     }} data-edit-url="{{editurl}}"{{!
41     }}>
42     <div class="container-fluid">
43         <div class="row">
44             <div class="col-xs-1">{{#pix}} i/calendareventtime, core, {{#str}} when, core_calendar {{/str}} {{/pix}}</div>
45             <div class="col-xs-11">{{{formattedtime}}}</div>
46         </div>
47         <div class="row mt-1">
48             <div class="col-xs-1">{{#pix}} i/calendar, core, {{#str}} eventtype, core_calendar {{/str}} {{/pix}}</div>
49             <div class="col-xs-11">{{eventtype}}</div>
50         </div>
51         {{#description}}
52         <div class="row mt-1">
53             <div class="col-xs-1">{{#pix}} i/calendareventdescription, core, {{#str}} description {{/str}} {{/pix}}</div>
54             <div class="description-content col-xs-11">{{{.}}}</div>
55         </div>
56         {{/description}}
57         {{#location}}
58         <div class="row mt-1">
59             <div class="col-xs-1">{{#pix}} i/location, core, {{#str}} location {{/str}} {{/pix}}</div>
60             <div class="location-content col-xs-11">{{{.}}}</div>
61         </div>
62         {{/location}}
63         {{#isactionevent}}
64         <div class="row mt-1">
65             <div class="col-xs-1">{{#pix}} i/courseevent, core, {{#str}} course {{/str}} {{/pix}}</div>
66             <div class="col-xs-11"><a href="{{course.viewurl}}">{{{course.fullname}}}</a></div>
67         </div>
68         {{/isactionevent}}
69         {{#iscategoryevent}}
70         <div class="row mt-1">
71             <div class="col-xs-1">{{#pix}} i/categoryevent, core, {{#str}} category {{/str}} {{/pix}}</div>
72             <div class="col-xs-11">{{{category.nestedname}}}</div>
73         </div>
74         {{/iscategoryevent}}
75         {{#iscourseevent}}
76         <div class="row mt-1">
77             <div class="col-xs-1">{{#pix}} i/courseevent, core, {{#str}} course {{/str}} {{/pix}}</div>
78             <div class="col-xs-11"><a href="{{url}}">{{{course.fullname}}}</a></div>
79         </div>
80         {{/iscourseevent}}
81         {{#groupname}}
82         <div class="row mt-1">
83             <div class="col-xs-1">{{#pix}} i/courseevent, core, {{#str}} course {{/str}} {{/pix}}</div>
84             <div class="col-xs-11"><a href="{{url}}">{{{course.fullname}}}</a></div>
85         </div>
86         <div class="row mt-1">
87             <div class="col-xs-1">{{#pix}} i/groupevent, core, {{#str}} group {{/str}} {{/pix}}</div>
88             <div class="col-xs-11">{{{groupname}}}</div>
89         </div>
90         {{/groupname}}
91         {{#subscription}}
92             {{#displayeventsource}}
93                 <div class="row mt-1">
94                     <div class="col-xs-1">{{#pix}} i/rss, core, {{#str}} eventsource, core_calendar {{/str}} {{/pix}}</div>
95                     <div class="col-xs-11">
96                         {{#subscriptionurl}}
97                             <p><a href="{{subscriptionurl}}">{{#str}}subscriptionsource, core_calendar, {{{subscriptionname}}}{{/str}}</a></p>
98                         {{/subscriptionurl}}
99                         {{^subscriptionurl}}
100                             <p>{{#str}}subscriptionsource, core_calendar, {{{subscriptionname}}}{{/str}}</p>
101                         {{/subscriptionurl}}
102                     </div>
103                 </div>
104             {{/displayeventsource}}
105         {{/subscription}}
106     </div>
107 </div>