';
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()->husband(), $individuals);
}
if ($col === false) {
// Marriage event - use the color of the wife
$col = array_search($event->record()->wife(), $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()->fullName() . ' — ';
}
$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->husband() && $record->husband()->getBirthDate()->isOK()) {
$ageh = FunctionsDate::getAgeAtEvent(Date::getAgeGedcom($record->husband()->getBirthDate(), $gdate));
} else {
$ageh = null;
}
if ($record->wife() && $record->wife()->getBirthDate()->isOK()) {
$agew = FunctionsDate::getAgeAtEvent(Date::getAgeGedcom($record->wife()->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()->gedcomName() !== '') {
echo ' — ' . $event->place()->shortName();
}
// Print spouses names for family events
if ($event->record() instanceof Family) {
echo ' — ', $event->record()->fullName(), '';
}
echo ' |