xref: /webtrees/resources/views/individual-page.phtml (revision 828e3b20a7f2cd6a03b43c72b27a29fd3b7ac641)
1<?php
2
3use Fisharebest\Webtrees\Fact;
4use Fisharebest\Webtrees\Http\RequestHandlers\UserListPage;
5use Fisharebest\Webtrees\I18N;
6use Fisharebest\Webtrees\Individual;
7use Fisharebest\Webtrees\Media;
8use Fisharebest\Webtrees\Module\ModuleSidebarInterface;
9use Fisharebest\Webtrees\Module\ModuleTabInterface;
10use Fisharebest\Webtrees\Tree;
11use Fisharebest\Webtrees\User;
12use Illuminate\Support\Collection;
13
14/**
15 * @var string                             $age
16 * @var Collection<Fact>                   $clipboard_facts
17 * @var Collection<Media>                  $individual_media
18 * @var Individual                         $record
19 * @var Collection<string>                 $shares
20 * @var Collection<ModuleSidebarInterface> $sidebars
21 * @var Collection<ModuleTabInterface>     $tabs
22 * @var Tree                               $tree
23 * @var Collection<User>                   $users
24 */
25?>
26
27<?= view('individual-page-pending', ['record' => $record]) ?>
28
29<div class="d-flex mb-4">
30    <h2 class="wt-page-title mx-auto">
31        <?= $record->fullName() ?>, <?= $record->lifespan() ?> <?= $age ?>
32        <?php foreach ($users as $user) : ?>
33            — <a href="<?= e(route(UserListPage::class, ['filter' => $user->email()])) ?>">
34                <?= e($user->userName()) ?>
35            </a>
36        <?php endforeach ?>
37    </h2>
38
39    <?php if ($record->canEdit()) : ?>
40        <?= view('individual-page-menu', ['clipboard_facts' => $clipboard_facts, 'record' => $record, 'shares' => $shares]) ?>
41    <?php endif ?>
42</div>
43
44<div class="row">
45    <div class="col">
46        <div class="row mb-4">
47            <?= view('individual-page-images', ['individual_media' => $individual_media, 'record' => $record, 'tree' => $tree]) ?>
48
49            <?= view('individual-page-names', ['record' => $record]) ?>
50        </div>
51
52        <?= view('individual-page-tabs', ['record' => $record, 'tabs' => $tabs]) ?>
53    </div>
54
55    <?php if ($sidebars->isNotEmpty()) : ?>
56        <?= view('individual-page-sidebars', ['record' => $record, 'sidebars' => $sidebars]) ?>
57    <?php endif ?>
58</div>
59
60<?= view('modals/ajax') ?>
61<?= view('modals/shares', ['shares' => $shares, 'title' => I18N::translate('Share') . ' — ' . $record->fullName()]) ?>
62