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