![]() System : Linux absol.cf 5.4.0-198-generic #218-Ubuntu SMP Fri Sep 27 20:18:53 UTC 2024 x86_64 User : www-data ( 33) PHP Version : 7.4.33 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, Directory : /var/www/html/webtrees/resources/views/modules/lifespans-chart/ |
Upload File : |
<?php declare(strict_types=1); use Fisharebest\Webtrees\Gedcom; /** * @var string $dir * @var int $end_year * @var array<object> $lifespans * @var int $max_rows * @var int $start_year * @var string $subtitle */ ?> <p class="wt-lifespans-subtitle"> <?= $subtitle ?> </p> <div class="wt-lifespans-scale"> <?php for ($year = $start_year; $year < $end_year; $year += 10) : ?><div class="wt-lifespans-decade"><?= $year ?></div><?php endfor ?> </div> <div class="wt-lifespans-individuals position-relative" style="height: <?= (5 + $max_rows) * 1.5 ?>rem; width: <?= ($end_year - $start_year) * 7 ?>px;"> <?php foreach ($lifespans as $lifespan) : ?> <a href="#" data-bs-toggle="collapse" data-bs-target="#<?= e($lifespan->id) ?>" aria-expanded="false" aria-controls="<?= e($lifespan->id) ?>"> <div class="wt-lifespans-individual position-absolute text-nowrap text-truncate" dir="auto" style="background: <?= $lifespan->background ?>; <?= $dir === 'ltr' ? 'left' : 'right' ?>:<?= ($lifespan->birth_year - $start_year) * 7 ?>px; top:<?= $lifespan->row * 1.5 ?>rem; width:<?= ($lifespan->death_year - $lifespan->birth_year) * 7 + 5 ?>px;"> <?= $lifespan->individual->fullName() ?> <?= strip_tags($lifespan->individual->lifespan()) ?> </div> </a> <div class="wt-lifespans-summary collapse position-absolute" id="<?= e($lifespan->id) ?>" style="<?= $dir === 'ltr' ? 'left' : 'right' ?>:<?= (min($lifespan->birth_year, $end_year - 50) - $start_year) * 7 ?>px; top:<?= ($lifespan->row + 1) * 1.5 ?>rem; width:350px;"> <a class="wt-lifespans-summary-link" href="<?= e($lifespan->individual->url()) ?>"> <?= $lifespan->individual->fullName() ?> </a> <?php foreach ($lifespan->individual->facts(array_merge(Gedcom::BIRTH_EVENTS, Gedcom::DEATH_EVENTS), true) as $fact) : ?> <?= $fact->summary() ?> <?php endforeach ?> </div> <?php endforeach ?> </div>