xref: /webtrees/resources/views/individual-page-title.phtml (revision b11cdcd45131b1585d66693fab363cfeb18c51a4)
1<?php
2
3declare(strict_types=1);
4
5use Fisharebest\Webtrees\Auth;
6use Fisharebest\Webtrees\Http\RequestHandlers\UserListPage;
7use Fisharebest\Webtrees\Individual;
8use Fisharebest\Webtrees\User;
9use Illuminate\Support\Collection;
10
11/**
12 * @var string               $age
13 * @var Individual           $record
14 * @var Collection<int,User> $users
15 */
16?>
17
18<?php if ($record->getBirthDate()->isOK() || $record->getDeathDate()->isOK()) : ?>
19    <?= $record->fullName() ?>, <?= $record->lifespan() ?>
20<?php else : ?>
21    <?= $record->fullName() ?>
22<?php endif ?></?>
23<?= $age ?>
24<?php if (Auth::isAdmin()) : ?>
25    <?php foreach ($users as $user) : ?>
26        — <a href="<?= e(route(UserListPage::class, ['filter' => $user->email()])) ?>">
27            <?= e($user->userName()) ?>
28        </a>
29    <?php endforeach ?>
30<?php endif ?>
31