xref: /webtrees/resources/views/record-page.phtml (revision 1ff45046fabc22237b5d0d8e489c96f031fc598d)
1<?php
2
3declare(strict_types=1);
4
5use Fisharebest\Webtrees\Fact;
6use Fisharebest\Webtrees\Family;
7use Fisharebest\Webtrees\GedcomRecord;
8use Fisharebest\Webtrees\Individual;
9use Fisharebest\Webtrees\Location;
10use Fisharebest\Webtrees\Media;
11use Fisharebest\Webtrees\Note;
12use Fisharebest\Webtrees\Repository;
13use Fisharebest\Webtrees\Source;
14use Fisharebest\Webtrees\Submitter;
15use Fisharebest\Webtrees\Tree;
16use Illuminate\Support\Collection;
17
18/**
19 * @var Collection<int,Fact>|null       $clipboard_facts
20 * @var Collection<int,Family>|null     $linked_families
21 * @var Collection<int,Individual>|null $linked_individuals
22 * @var Collection<int,Location>|null   $linked_locations
23 * @var Collection<int,Media>|null      $linked_media_objects
24 * @var Collection<int,Note>|null       $linked_notes
25 * @var Collection<int,Repository>|null $linked_repositories
26 * @var Collection<int,Source>|null     $linked_sources
27 * @var Collection<int,Submitter>|null  $linked_submitters
28 * @var GedcomRecord                    $record
29 * @var Tree                            $tree
30 */
31
32?>
33
34<?= view('record-page-pending', ['record' => $record]) ?>
35
36<div class="d-flex mb-4">
37    <h2 class="wt-page-title mx-auto">
38        <?= $record->fullName() ?>
39    </h2>
40    <?php if ($record->canEdit()) : ?>
41        <?= view('record-page-menu', ['clipboard_facts' => $clipboard_facts, 'record' => $record]) ?>
42    <?php endif ?>
43</div>
44
45<div class="wt-page-content">
46    <?php if ($linked_families instanceof Collection || $linked_individuals instanceof Collection || $linked_locations instanceof Collection || $linked_media_objects instanceof Collection || $linked_notes instanceof Collection || $linked_repositories instanceof Collection || $linked_sources instanceof Collection) : ?>
47        <?= view('record-page-links', [
48            'details'              => view('record-page-details', ['record' => $record]),
49            'linked_families'      => $linked_families,
50            'linked_individuals'   => $linked_individuals,
51            'linked_locations'     => $linked_locations,
52            'linked_media_objects' => $linked_media_objects,
53            'linked_notes'         => $linked_notes,
54            'linked_repositories'  => $linked_repositories,
55            'linked_sources'       => $linked_sources,
56            'linked_submitters'    => $linked_submitters,
57            'tree'                 => $tree,
58        ]) ?>
59    <?php else : ?>
60        <?= view('record-page-details', ['clipboard_facts' => $clipboard_facts, 'record' => $record]) ?>
61    <?php endif ?>
62</div>
63
64<?= view('modals/ajax') ?>
65