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