mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 06:18:28 +01:00
MDL-36621 calendar: Display subscription info in calendar event popups
This commit is contained in:
parent
8a7326ed4e
commit
07c03ff96a
@ -314,7 +314,7 @@ function calendar_get_mini($courses, $groups, $users, $cal_month = false, $cal_y
|
||||
if (!isset($events[$eventid])) {
|
||||
continue;
|
||||
}
|
||||
$event = $events[$eventid];
|
||||
$event = new calendar_event($events[$eventid]);
|
||||
$popupalt = '';
|
||||
$component = 'moodle';
|
||||
if(!empty($event->modulename)) {
|
||||
@ -335,7 +335,14 @@ function calendar_get_mini($courses, $groups, $users, $cal_month = false, $cal_y
|
||||
|
||||
$popupcontent .= html_writer::start_tag('div');
|
||||
$popupcontent .= $OUTPUT->pix_icon($popupicon, $popupalt, $component);
|
||||
$popupcontent .= html_writer::link($dayhref, format_string($event->name, true));
|
||||
$name = format_string($event->name, true);
|
||||
if (!empty($event->subscription)) {
|
||||
$a = new stdClass();
|
||||
$a->name = $name;
|
||||
$a->source = $event->subscription->name;
|
||||
$name = get_string('namewithsource', 'calendar', $a);
|
||||
}
|
||||
$popupcontent .= html_writer::link($dayhref, $name);
|
||||
$popupcontent .= html_writer::end_tag('div');
|
||||
}
|
||||
|
||||
|
@ -125,6 +125,7 @@ $string['monthly'] = 'Monthly';
|
||||
$string['monthlyview'] = 'Monthly view';
|
||||
$string['monthnext'] = 'Next month';
|
||||
$string['monththis'] = 'This month';
|
||||
$string['namewithsource'] = '{$a->name}({$a->source})';
|
||||
$string['never'] = 'Never';
|
||||
$string['newevent'] = 'New event';
|
||||
$string['notitle'] = 'no title';
|
||||
|
Loading…
x
Reference in New Issue
Block a user