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