MDL-59864 core_calendar: add link to activity on module events
authorSimey Lameze <simey@moodle.com>
Thu, 31 Aug 2017 01:39:14 +0000 (09:39 +0800)
committerSimey Lameze <simey@moodle.com>
Mon, 4 Sep 2017 00:37:30 +0000 (08:37 +0800)
calendar/amd/build/calendar.min.js
calendar/amd/src/calendar.js
calendar/templates/event_summary_modal.mustache
lang/en/calendar.php

index 9d29445..212a648 100644 (file)
Binary files a/calendar/amd/build/calendar.min.js and b/calendar/amd/build/calendar.min.js differ
index ea10975..a5e69c8 100644 (file)
@@ -140,7 +140,9 @@ define([
                 body: Templates.render('core_calendar/event_summary_body', eventData),
                 templateContext: {
                     canedit: eventData.canedit,
-                    candelete: eventData.candelete
+                    candelete: eventData.candelete,
+                    isactionevent: eventData.isactionevent,
+                    url: eventData.url
                 }
             };
 
index 845331a..583f500 100644 (file)
@@ -32,5 +32,8 @@
     {{/candelete}}
     <button type="button" class="btn btn-primary" data-action="edit">{{#str}} edit {{/str}}</button>
 {{/canedit}}
+{{#isactionevent}}
+    <a href="{{url}}">{{#str}} gotoactivity, core_calendar {{/str}}</a>
+{{/isactionevent}}
 {{/footer}}
 {{/ core/modal }}
index eccd233..405046d 100644 (file)
@@ -130,6 +130,7 @@ $string['generateurlbutton'] = 'Get calendar URL';
 $string['global'] = 'Global';
 $string['globalevent'] = 'Global event';
 $string['globalevents'] = 'Global events';
+$string['gotoactivity'] = 'Go to activity';
 $string['gotocalendar'] = 'Go to calendar';
 $string['group'] = 'Group';
 $string['groupevent'] = 'Group event';