<?php use Fisharebest\Webtrees\I18N; ?>
<?php use Fisharebest\Webtrees\Individual; ?>

<?php foreach ($facts as $fact) : ?>
    <?php $record = $fact->record(); ?>
    <a href="<?= e($record->url()) ?>" class="list_item name2">
        <?= $record->getFullName() ?>
    </a>
    <?php if ($record instanceof Individual) : ?>
        <?= $record->getSexImage() ?>
    <?php endif ?>
    <div class="indent">
        <?= $fact->label() . ' — ' . $fact->date()->display(true); ?>
        <?= ' (' . I18N::timeAgo($fact->anniv * 365 * 24 * 60 * 60) . ')'; ?>
        <?php if (!$fact->place()->isEmpty()) : ?>
            <?= ' — <a href="' . e($fact->place()->url()) . '">' . $fact->place()->getFullName() . '</a>'; ?>
        <?php endif ?>
    </div>
<?php endforeach ?>
