Skip to content

Commit

Permalink
Fix for bug 1416:
Browse files Browse the repository at this point in the history
Now the module icon is shown before the event name in the mini-month tooltips.
Maybe this would be better with the module name instead, but I don't know.
Comment in the bugtracker if this isn't what we want.
  • Loading branch information
defacer committed May 18, 2004
1 parent 6be91aa commit 4e17c6f
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions calendar/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
function calendar_get_mini($courses, $groups, $users, $cal_month = false, $cal_year = false) {
global $CFG, $USER;

$display = &New object;
$display = &New stdClass;
$display->minwday = get_user_preferences('calendar_startwday', CALENDAR_STARTING_WEEKDAY);
$display->maxwday = $display->minwday + 6;

Expand Down Expand Up @@ -166,7 +166,12 @@ function calendar_get_mini($courses, $groups, $users, $cal_month = false, $cal_y
// OverLib popup
$popupcontent = '';
foreach($eventsbyday[$day] as $eventid) {
$popupcontent .= '<div><a href=\\\''.CALENDAR_URL.'view.php?view=event&amp;id='.$events[$eventid]->id.'\\\'>'.addslashes(htmlspecialchars($events[$eventid]->name)).'</a></div>';
if(!empty($events[$eventid]->modulename)) {
$popupcontent .= '<div><img src=\\\''.$CFG->modpixpath.'/'.$events[$eventid]->modulename.'/icon.gif\\\' style=\\\'vertical-align: middle; margin-right: 4px;\\\' alt=\\\''.$events[$eventid]->modulename.'\\\' /><a href=\\\''.CALENDAR_URL.'view.php?view=event&amp;id='.$events[$eventid]->id.'\\\'>'.addslashes(htmlspecialchars($events[$eventid]->name)).'</a></div>';
}
else {
$popupcontent .= '<div style=\\\'padding-left: 20px;\\\'><a href=\\\''.CALENDAR_URL.'view.php?view=event&amp;id='.$events[$eventid]->id.'\\\'>'.addslashes(htmlspecialchars($events[$eventid]->name)).'</a></div>';
}
}

$popupcaption = get_string('eventsfor', 'calendar', userdate($events[$eventid]->timestart, get_string('strftimedayshort')));
Expand Down

0 comments on commit 4e17c6f

Please sign in to comment.