$indifacts * @var array $individuals */ ?>
'; 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, true); if ($col === false) { // Marriage event - use the color of the husband $col = array_search($event->record()->husband(), $individuals, true); } if ($col === false) { // Marriage event - use the color of the wife $col = array_search($event->record()->wife(), $individuals, true); } $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(); foreach ($record->spouses() as $spouse) { if ($spouse->getBirthDate()->isOK()) { $age = (string) new Age($spouse->getBirthDate(), $gdate); if ($spouse->sex() === 'F') { echo ' ', I18N::translate('Wife’s age'), ' ', $age, ''; } else { echo ' ', I18N::translate('Husband’s age'), ' ', $age, ''; } } } } 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 '
'; 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) : ?>