xref: /webtrees/resources/views/individual-page.phtml (revision 99125a335d0be11b975e213c69fc4ede0c5303f1)
1<?php
2
3use Fisharebest\Webtrees\Fact;
4use Fisharebest\Webtrees\I18N;
5use Fisharebest\Webtrees\Individual;
6use Fisharebest\Webtrees\Media;
7use Fisharebest\Webtrees\Module\ModuleSidebarInterface;
8use Fisharebest\Webtrees\Module\ModuleTabInterface;
9use Fisharebest\Webtrees\Tree;
10use Illuminate\Support\Collection;
11
12/**
13 * @var string                             $age
14 * @var Collection<Fact>                   $clipboard_facts
15 * @var Collection<Media>                  $individual_media
16 * @var Collection<Fact>                   $name_records
17 * @var Individual                         $record
18 * @var Collection<Fact>                   $sex_records
19 * @var Collection<string>                 $shares
20 * @var Collection<ModuleSidebarInterface> $sidebars
21 * @var Collection<ModuleTabInterface>     $tabs
22 * @var Tree                               $tree
23 * @var string                             $user_link
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() ?><?= $user_link ?>, <?= $record->lifespan() ?> <?= $age ?>
32    </h2>
33
34    <?php if ($record->canEdit()) : ?>
35        <?= view('individual-page-menu', ['clipboard_facts' => $clipboard_facts, 'record' => $record, 'shares' => $shares]) ?>
36    <?php endif ?>
37</div>
38
39<div class="row">
40    <div class="col">
41        <div class="row mb-4">
42            <?= view('individual-page-images', ['individual_media' => $individual_media, 'record' => $record, 'tree' => $tree]) ?>
43
44            <?= view('individual-page-names', ['name_records' => $name_records, 'sex_records' => $sex_records]) ?>
45        </div>
46
47        <?= view('individual-page-tabs', ['record' => $record, 'tabs' => $tabs]) ?>
48    </div>
49
50    <?php if ($sidebars->isNotEmpty()) : ?>
51        <?= view('individual-page-sidebars', ['record' => $record, 'sidebars' => $sidebars]) ?>
52    <?php endif ?>
53</div>
54
55<?= view('modals/ajax') ?>
56<?= view('modals/shares', ['shares' => $shares, 'title' => I18N::translate('Share') . ' — ' . $record->fullName()]) ?>
57