';
echo '';
} else {
echo 'right: 3px;">';
}
$col = array_search($event->record(), $individuals);
if ($col === false) {
// Marriage event - use the color of the husband
$col = array_search($event->record()->getHusband(), $individuals);
}
if ($col === false) {
// Marriage event - use the color of the wife
$col = array_search($event->record()->getWife(), $individuals);
}
$col = $col % 6;
echo ' | ';
if (count($individuals) > 6) {
// We only have six colours, so show naes if more than this number
echo $event->record()->getFullName() . ' — ';
}
$record = $event->record();
echo $event->label();
echo ' — ';
if ($record instanceof Individual) {
echo FunctionsPrint::formatFactDate($event, $record, false, false);
} elseif ($record instanceof Family) {
echo $gdate->display();
if ($record->getHusband() && $record->getHusband()->getBirthDate()->isOK()) {
$ageh = FunctionsDate::getAgeAtEvent(Date::getAgeGedcom($record->getHusband()->getBirthDate(), $gdate));
} else {
$ageh = null;
}
if ($record->getWife() && $record->getWife()->getBirthDate()->isOK()) {
$agew = FunctionsDate::getAgeAtEvent(Date::getAgeGedcom($record->getWife()->getBirthDate(), $gdate));
} else {
$agew = null;
}
if ($ageh && $agew) {
echo ' ', I18N::translate('Husband’s age'), ' ', $ageh, ' ', I18N::translate('Wife’s age'), ' ', $agew, '';
} elseif ($ageh) {
echo ' ', I18N::translate('Age'), ' ', $ageh, '';
} elseif ($agew) {
echo ' ', I18N::translate('Age'), ' ', $ageh, '';
}
}
echo ' ' . e($desc);
if (!$event->place()->isEmpty()) {
echo ' — ' . $event->place()->getShortName();
}
// Print spouses names for family events
if ($event->record() instanceof Family) {
echo ' — ', $event->record()->getFullName(), '';
}
echo ' |