diff --git a/calendar/templates/event_summary_body.mustache b/calendar/templates/event_summary_body.mustache index 2a672334454..0770cc501a3 100644 --- a/calendar/templates/event_summary_body.mustache +++ b/calendar/templates/event_summary_body.mustache @@ -37,24 +37,57 @@ }} data-action-event="{{isactionevent}}"{{! }} data-edit-url="{{editurl}}"{{! }}> -

{{#str}} when, core_calendar {{/str}}

- {{#userdate}} {{timestart}}, {{#str}} strftimerecentfull {{/str}} {{/userdate}} -
- {{#description}} -

{{#str}} description {{/str}}

- {{{description}}} - {{/description}} -

{{#str}} eventtype, core_calendar {{/str}}

- {{eventtype}} - {{#iscategoryevent}} -
{{{category.nestedname}}}
- {{/iscategoryevent}} - {{#iscourseevent}} -
{{course.fullname}}
- {{/iscourseevent}} - {{> core_calendar/event_subscription}} - {{#groupname}} -
{{{course.fullname}}}
-
{{{groupname}}}
- {{/groupname}} +
+
+
{{#pix}} i/calendareventtime, core, {{#str}} when, core_calendar {{/str}} {{/pix}}
+
{{#userdate}} {{timestart}}, {{#str}} strftimerecentfull {{/str}} {{/userdate}}
+
+
+
{{#pix}} i/calendar, core, {{#str}} eventtype, core_calendar {{/str}} {{/pix}}
+
{{eventtype}}
+
+ {{#description}} +
+
{{#pix}} i/calendareventdescription, core, {{#str}} description {{/str}} {{/pix}}
+
{{{.}}}
+
+ {{/description}} + {{#iscategoryevent}} +
+
{{#pix}} i/categoryevent, core, {{#str}} category {{/str}} {{/pix}}
+
{{{category.nestedname}}}
+
+ {{/iscategoryevent}} + {{#iscourseevent}} +
+
{{#pix}} i/courseevent, core, {{#str}} course {{/str}} {{/pix}}
+ +
+ {{/iscourseevent}} + {{#groupname}} +
+
{{#pix}} i/courseevent, core, {{#str}} course {{/str}} {{/pix}}
+ +
+
+
{{#pix}} i/groupevent, core, {{#str}} group {{/str}} {{/pix}}
+
{{{groupname}}}
+
+ {{/groupname}} + {{#subscription}} + {{#displayeventsource}} +
+
{{#pix}} i/rss, core, {{#str}} eventsource, core_calendar {{/str}} {{/pix}}
+
+ {{#url}} + {{#str}}subscriptionsource, core_calendar, {{name}}{{/str}} + {{/url}} + {{^url}} +

{{#str}}subscriptionsource, core_calendar, {{name}}{{/str}}

+ {{/url}} +
+
+ {{/displayeventsource}} + {{/subscription}} +
diff --git a/lang/en/calendar.php b/lang/en/calendar.php index 01dcd4fa605..206ebb217f6 100644 --- a/lang/en/calendar.php +++ b/lang/en/calendar.php @@ -108,6 +108,7 @@ $string['eventrepeat'] = 'Repeats'; $string['eventsall'] = 'All events'; $string['eventsdeleted'] = 'Events deleted'; $string['eventsimported'] = 'Events imported: {$a}'; +$string['eventsource'] = 'Event source'; $string['eventsupdated'] = 'Events updated: {$a}'; $string['eventsfor'] = '{$a} events'; $string['eventskey'] = 'Events key'; diff --git a/lib/classes/output/icon_system_fontawesome.php b/lib/classes/output/icon_system_fontawesome.php index 055857a20cc..d7e858a42b1 100644 --- a/lib/classes/output/icon_system_fontawesome.php +++ b/lib/classes/output/icon_system_fontawesome.php @@ -195,6 +195,8 @@ class icon_system_fontawesome extends icon_system_font { 'core:i/badge' => 'fa-shield', 'core:i/calc' => 'fa-calculator', 'core:i/calendar' => 'fa-calendar', + 'core:i/calendareventdescription' => 'fa-align-left', + 'core:i/calendareventtime' => 'fa-clock-o', 'core:i/caution' => 'fa-exclamation text-warning', 'core:i/checked' => 'fa-check', 'core:i/checkpermissions' => 'fa-unlock-alt', diff --git a/pix/i/calendareventdescription.png b/pix/i/calendareventdescription.png new file mode 100644 index 00000000000..5ab349c814c Binary files /dev/null and b/pix/i/calendareventdescription.png differ diff --git a/pix/i/calendareventdescription.svg b/pix/i/calendareventdescription.svg new file mode 100644 index 00000000000..986b0a2bb59 --- /dev/null +++ b/pix/i/calendareventdescription.svg @@ -0,0 +1,3 @@ + +]> \ No newline at end of file diff --git a/pix/i/calendareventtime.png b/pix/i/calendareventtime.png new file mode 100644 index 00000000000..944f36b10d3 Binary files /dev/null and b/pix/i/calendareventtime.png differ diff --git a/pix/i/calendareventtime.svg b/pix/i/calendareventtime.svg new file mode 100644 index 00000000000..94f355b0cfb --- /dev/null +++ b/pix/i/calendareventtime.svg @@ -0,0 +1,3 @@ + +]> \ No newline at end of file diff --git a/theme/bootstrapbase/templates/core_calendar/event_summary_body.mustache b/theme/bootstrapbase/templates/core_calendar/event_summary_body.mustache new file mode 100644 index 00000000000..bcb3c567f74 --- /dev/null +++ b/theme/bootstrapbase/templates/core_calendar/event_summary_body.mustache @@ -0,0 +1,93 @@ +{{! + 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 . +}} +{{! + @template core_calendar/event_summary_body + + This template renders the body of calendar events summary modal. + + Example context (json): + { + "timestart": 1490320388, + "description": "An random event description", + "eventtype": "User", + "source": "Ical imported", + "groupname": "Group 1" + } +}} + +
+
+
{{#pix}} i/calendareventtime, core, {{#str}} when, core_calendar {{/str}} {{/pix}}
+
{{#userdate}} {{timestart}}, {{#str}} strftimerecentfull {{/str}} {{/userdate}}
+
+
+
{{#pix}} i/calendar, core, {{#str}} eventtype, core_calendar {{/str}} {{/pix}}
+
{{eventtype}}
+
+ {{#description}} +
+
{{#pix}} i/calendareventdescription, core, {{#str}} description {{/str}} {{/pix}}
+
{{{.}}}
+
+ {{/description}} + {{#iscategoryevent}} +
+
{{#pix}} i/categoryevent, core, {{#str}} category {{/str}} {{/pix}}
+
{{{category.nestedname}}}
+
+ {{/iscategoryevent}} + {{#iscourseevent}} +
+
{{#pix}} i/courseevent, core, {{#str}} course {{/str}} {{/pix}}
+ +
+ {{/iscourseevent}} + {{#groupname}} +
+
{{#pix}} i/courseevent, core, {{#str}} course {{/str}} {{/pix}}
+ +
+
+
{{#pix}} i/groupevent, core, {{#str}} group {{/str}} {{/pix}}
+
{{{groupname}}}
+
+ {{/groupname}} + {{#subscription}} + {{#displayeventsource}} +
+
{{#pix}} i/rss, core, {{#str}} eventsource, core_calendar {{/str}} {{/pix}}
+
+ {{#url}} + {{#str}}subscriptionsource, core_calendar, {{name}}{{/str}} + {{/url}} + {{^url}} +

{{#str}}subscriptionsource, core_calendar, {{name}}{{/str}}

+ {{/url}} +
+
+ {{/displayeventsource}} + {{/subscription}} +
+