'; echo $i; echo '
'; } } echo ''; ?>
$event) : ?> value(); $gdate = $event->date(); $date = $gdate->minimumDate(); $date = $date->convertToCalendar('gregorian'); $year = $date->year(); $month = max(1, $date->month()); $day = max(1, $date->day()); $xoffset = 0 + 22; $yoffset = 0 + (($year - $baseyear) * $scale) - ($scale); $yoffset = $yoffset + (($month / 12) * $scale); $yoffset = $yoffset + (($day / 30) * ($scale / 12)); $yoffset = (int) ($yoffset); $place = (int) ($yoffset / $bheight); $i = 1; $j = 0; $tyoffset = 0; while (isset($placements[$place])) { if ($i === $j) { $tyoffset = $bheight * $i; $i++; } else { $tyoffset = -1 * $bheight * $j; $j++; } $place = (int) (($yoffset + $tyoffset) / $bheight); } $yoffset += $tyoffset; $xoffset += abs($tyoffset); $placements[$place] = $yoffset; echo "
'; echo '
'; 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()->gedcomName() !== '') { echo ' — ' . $event->place()->shortName(); } // Print spouses names for family events if ($event->record() instanceof Family) { echo ' — ', $event->record()->getFullName(), ''; } echo '
'; echo '
'; if (I18N::direction() === 'ltr') { $img = asset('css/images/dline2.png'); $ypos = '0%'; } else { $img = asset('css/images/dline.png'); $ypos = '100%'; } $dyoffset = ($yoffset - $tyoffset) + $bheight / 3; if ($tyoffset < 0) { $dyoffset = $yoffset + $bheight / 3; if (I18N::direction() === 'ltr') { $img = asset('css/images/dline.png'); $ypos = '100%'; } else { $img = asset('css/images/dline2.png'); $ypos = '0%'; } } ?>
$indi) : ?>