function js_hover(Event $aterm) { global $user; $jscript_text = '<b>' . _("Zusammenfassung:") . ' </b>' . htmlReady($aterm->getTitle()) . '<hr>'; if ($aterm instanceof SeminarEvent || $aterm instanceof SeminarCalendarEvent) { $jscript_text .= '<b>' . _("Veranstaltung:") . ' </b> ' . htmlReady($aterm->getSemName()) . '<br>'; } if ($aterm->getDescription()) { $jscript_text .= '<b>' . _("Beschreibung:") . ' </b> ' . htmlReady(mila($aterm->getDescription(), 300)) . '<br>'; } if ($categories = $aterm->toStringCategories()) { $jscript_text .= '<b>' . _("Kategorie:") . ' </b> ' . htmlReady($categories) . '<br>'; } if ($aterm->getLocation()) { $jscript_text .= '<b>' . _("Ort:") . ' </b> ' . htmlReady($aterm->getLocation()) . '<br>'; } if (!($aterm instanceof SeminarEvent)) { if ($aterm->toStringPriority()) { $jscript_text .= '<b>' . _("Priorität:") . ' </b>' . htmlReady($aterm->toStringPriority()) . '<br>'; } $jscript_text .= '<b>' . _("Zugriff:") . ' </b>' . htmlReady($aterm->toStringAccessibility()) . '<br>'; $jscript_text .= '<b>' . _("Wiederholung:") . ' </b>' . htmlReady($aterm->toStringRecurrence()) . '<br>'; if (get_config('CALENDAR_GROUP_ENABLE')) { $jscript_text .= sprintf(_('<span style="font-weight: bold;">Eingetragen am:</span> %s von %s'), strftime('%x, %X', $aterm->getMakeDate()), htmlReady(get_fullname($aterm->getAuthorId(), 'no_title'))) . '<br>'; if ($aterm->getMakeDate() < $aterm->getChangeDate()) { $jscript_text .= sprintf(_('<span style="font-weight: bold;">Zuletzt bearbeitet am:</span> %s von %s'), strftime('%x, %X', $aterm->getChangeDate()), htmlReady(get_fullname($aterm->getEditorId(), 'no_title'))) . '<br>'; } } else { $jscript_text .= sprintf(_('<span style="font-weight: bold;">Eingetragen am:</span> %s'), strftime('%x, %X', $aterm->getMakeDate())) . '<br>'; if ($aterm->getMakeDate() < $aterm->getChangeDate()) { $jscript_text .= sprintf(_('<span style="font-weight: bold;">Zuletzt bearbeitet am:</span> %s'), strftime('%x, %X', $aterm->getChangeDate())) . '<br>'; } } } else { // related groups $related_groups = $aterm->getRelatedGroups(); if (sizeof($related_groups)) { $jscript_text .= '<b>' . _("Betroffene Gruppen:") . ' </b>' . htmlReady(implode(', ', array_map( function ($group) { return $group->name; }, $related_groups))) . '<br>'; } } $jscript_text .= '<br>'; return " onmouseover=\"STUDIP.CalendarDialog.openCalendarHover('" . JSReady($aterm->toStringDate('SHORT_DAY'), 'inline-single') . "', '" . JSReady($jscript_text, 'inline-single') . "', this);\" onmouseout=\"STUDIP.CalendarDialog.closeCalendarHover();\""; }