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