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