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