xref: /webtrees/resources/views/individual-page-title.phtml (revision 10e0649788c8d7d4974d81c048ca2b225df8f22e)
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