Permalink
Browse files

Merge branch 'MDL-59383-fix-1' of https://github.com/lameze/moodle

  • Loading branch information...
dmonllao committed Jul 12, 2017
2 parents 5e96167 + 19ab239 commit 347be35d757389e7304b20701afb157d014b3eaa

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
@@ -69,7 +69,13 @@ define(['jquery', 'core/ajax', 'core/str', 'core/templates', 'core/notification'
}).then(function(eventdata) {
return modalPromise.done(function(modal) {
modal.setTitle(eventdata.name);
modal.setBody(Templates.render('core_calendar/event_summary_body', eventdata));
Templates.render(
'core_calendar/event_summary_body',
eventdata
).done(function(html, js) {
Templates.replaceNodeContents(modal.getBody(), html, js);
});
// Hide edit and delete buttons if I don't have permission.
if (eventdata.caneditevent == false) {
@@ -719,6 +719,7 @@ public static function get_calendar_event_by_id($eventid) {
// We need to get events asked for eventids.
$event = calendar_get_events_by_id([$eventid]);
$eventobj = calendar_event::load($eventid);
list($event[$eventid]->description, $event[$eventid]->format) = $eventobj->format_external_text();
$event[$eventid]->caneditevent = calendar_edit_event_allowed($eventobj);
return array('event' => $event[$eventid], 'warnings' => $warnings);
@@ -26,7 +26,7 @@
"eventtype": "open",
}
}}
<div class="container">
<div>
<h4>{{#str}} when, core_calendar {{/str}}</h4>
{{#userdate}} {{timestart}}, {{#str}} strftimerecentfull {{/str}} {{/userdate}}
<br>
@@ -26,7 +26,7 @@
}}
{{< core/modal }}
{{$footer}}
<button type="button" class="btn btn-secondary pull-xs-left" data-action="delete">{{#str}} delete {{/str}}</button>
<button type="button" class="btn btn-secondary" data-action="delete">{{#str}} delete {{/str}}</button>
<button type="button" class="btn btn-primary" data-action="edit">{{#str}} edit {{/str}}</button>
{{/footer}}
{{/ core/modal }}

0 comments on commit 347be35

Please sign in to comment.