xref: /webtrees/resources/views/record-page-links.phtml (revision 36779af1bd0601de7819554b13a393f6edb92507)
10f5fd22fSGreg Roach<?php
20f5fd22fSGreg Roach
30f5fd22fSGreg Roachuse Fisharebest\Webtrees\Family;
40f5fd22fSGreg Roachuse Fisharebest\Webtrees\I18N;
50f5fd22fSGreg Roachuse Fisharebest\Webtrees\Individual;
60f5fd22fSGreg Roachuse Fisharebest\Webtrees\Media;
70f5fd22fSGreg Roachuse Fisharebest\Webtrees\Note;
80f5fd22fSGreg Roachuse Fisharebest\Webtrees\Source;
90f5fd22fSGreg Roachuse Fisharebest\Webtrees\Tree;
100f5fd22fSGreg Roachuse Illuminate\Support\Collection;
110f5fd22fSGreg Roach
120f5fd22fSGreg Roach/**
130f5fd22fSGreg Roach * @var string                      $details
14*36779af1SGreg Roach * @var ?Collection<int,Family>     $linked_families
15*36779af1SGreg Roach * @var ?Collection<int,Individual> $linked_individuals
16*36779af1SGreg Roach * @var ?Collection<int,Media>      $linked_media_objects
17*36779af1SGreg Roach * @var ?Collection<int,Note>       $linked_notes
18*36779af1SGreg Roach * @var ?Collection<int,Source>     $linked_sources
190f5fd22fSGreg Roach * @var Tree                        $tree
200f5fd22fSGreg Roach */
210f5fd22fSGreg Roach
220f5fd22fSGreg Roach?>
230f5fd22fSGreg Roach
240f5fd22fSGreg Roach<ul class="nav nav-tabs" role="tablist">
250f5fd22fSGreg Roach    <li class="nav-item" role="presentation">
26315eb316SGreg Roach        <a class="nav-link active" data-bs-toggle="tab" role="tab" href="#details">
270f5fd22fSGreg Roach            <?= I18N::translate('Details') ?>
280f5fd22fSGreg Roach        </a>
290f5fd22fSGreg Roach    </li>
300f5fd22fSGreg Roach
310f5fd22fSGreg Roach    <?php if ($linked_individuals instanceof Collection) : ?>
320f5fd22fSGreg Roach        <li class="nav-item" role="presentation">
33315eb316SGreg Roach            <a class="nav-link" data-bs-toggle="tab" role="tab" href="#individuals">
340f5fd22fSGreg Roach                <?= I18N::translate('Individuals') ?>
350f5fd22fSGreg Roach                <?= view('components/badge', ['count' => $linked_individuals->count()]) ?>
360f5fd22fSGreg Roach            </a>
370f5fd22fSGreg Roach        </li>
380f5fd22fSGreg Roach    <?php endif ?>
390f5fd22fSGreg Roach
400f5fd22fSGreg Roach    <?php if ($linked_families instanceof Collection) : ?>
410f5fd22fSGreg Roach        <li class="nav-item" role="presentation">
42315eb316SGreg Roach            <a class="nav-link" data-bs-toggle="tab" role="tab" href="#families">
430f5fd22fSGreg Roach                <?= I18N::translate('Families') ?>
440f5fd22fSGreg Roach                <?= view('components/badge', ['count' => $linked_families->count()]) ?>
450f5fd22fSGreg Roach            </a>
460f5fd22fSGreg Roach        </li>
470f5fd22fSGreg Roach    <?php endif ?>
480f5fd22fSGreg Roach
490f5fd22fSGreg Roach    <?php if ($linked_media_objects instanceof Collection) : ?>
500f5fd22fSGreg Roach        <li class="nav-item" role="presentation">
51315eb316SGreg Roach            <a class="nav-link" data-bs-toggle="tab" role="tab" href="#media">
520f5fd22fSGreg Roach                <?= I18N::translate('Media objects') ?>
530f5fd22fSGreg Roach                <?= view('components/badge', ['count' => $linked_media_objects->count()]) ?>
540f5fd22fSGreg Roach            </a>
550f5fd22fSGreg Roach        </li>
560f5fd22fSGreg Roach    <?php endif ?>
570f5fd22fSGreg Roach
580f5fd22fSGreg Roach    <?php if ($linked_sources instanceof Collection) : ?>
590f5fd22fSGreg Roach        <li class="nav-item" role="presentation">
60315eb316SGreg Roach            <a class="nav-link" data-bs-toggle="tab" role="tab" href="#sources">
610f5fd22fSGreg Roach                <?= I18N::translate('Sources') ?>
620f5fd22fSGreg Roach                <?= view('components/badge', ['count' => $linked_sources->count()]) ?>
630f5fd22fSGreg Roach            </a>
640f5fd22fSGreg Roach        </li>
650f5fd22fSGreg Roach    <?php endif ?>
660f5fd22fSGreg Roach
670f5fd22fSGreg Roach    <?php if ($linked_notes instanceof Collection) : ?>
680f5fd22fSGreg Roach        <li class="nav-item" role="presentation">
69315eb316SGreg Roach            <a class="nav-link" data-bs-toggle="tab" role="tab" href="#notes">
700f5fd22fSGreg Roach                <?= I18N::translate('Notes') ?>
710f5fd22fSGreg Roach                <?= view('components/badge', ['count' => $linked_notes->count()]) ?>
720f5fd22fSGreg Roach            </a>
730f5fd22fSGreg Roach        </li>
740f5fd22fSGreg Roach    <?php endif ?>
750f5fd22fSGreg Roach</ul>
760f5fd22fSGreg Roach
770f5fd22fSGreg Roach<div class="tab-content">
780f5fd22fSGreg Roach    <div class="tab-pane fade show active" role="tabpanel" id="details">
790f5fd22fSGreg Roach        <?= $details ?>
800f5fd22fSGreg Roach    </div>
810f5fd22fSGreg Roach
820f5fd22fSGreg Roach    <?php if ($linked_individuals instanceof Collection) : ?>
830f5fd22fSGreg Roach        <div class="tab-pane fade" role="tabpanel" id="individuals">
840f5fd22fSGreg Roach            <?= view('lists/individuals-table', ['individuals' => $linked_individuals, 'sosa' => false, 'tree' => $tree]) ?>
850f5fd22fSGreg Roach        </div>
860f5fd22fSGreg Roach    <?php endif ?>
870f5fd22fSGreg Roach
880f5fd22fSGreg Roach    <?php if ($linked_families instanceof Collection) : ?>
890f5fd22fSGreg Roach        <div class="tab-pane fade" role="tabpanel" id="families">
900f5fd22fSGreg Roach            <?= view('lists/families-table', ['families' => $linked_families, 'tree' => $tree]) ?>
910f5fd22fSGreg Roach        </div>
920f5fd22fSGreg Roach    <?php endif ?>
930f5fd22fSGreg Roach
940f5fd22fSGreg Roach    <?php if ($linked_media_objects instanceof Collection) : ?>
950f5fd22fSGreg Roach        <div class="tab-pane fade" role="tabpanel" id="media">
960f5fd22fSGreg Roach            <?= view('lists/media-table', ['media_objects' => $linked_media_objects, 'tree' => $tree]) ?>
970f5fd22fSGreg Roach        </div>
980f5fd22fSGreg Roach    <?php endif ?>
990f5fd22fSGreg Roach
1000f5fd22fSGreg Roach    <?php if ($linked_sources instanceof Collection) : ?>
1010f5fd22fSGreg Roach        <div class="tab-pane fade" role="tabpanel" id="sources">
1020f5fd22fSGreg Roach            <?= view('lists/sources-table', ['sources' => $linked_sources, 'tree' => $tree]) ?>
1030f5fd22fSGreg Roach        </div>
1040f5fd22fSGreg Roach    <?php endif ?>
1050f5fd22fSGreg Roach
1060f5fd22fSGreg Roach    <?php if ($linked_notes instanceof Collection) : ?>
1070f5fd22fSGreg Roach        <div class="tab-pane fade" role="tabpanel" id="notes">
1080f5fd22fSGreg Roach            <?= view('lists/notes-table', ['notes' => $linked_notes, 'tree' => $tree]) ?>
1090f5fd22fSGreg Roach        </div>
1100f5fd22fSGreg Roach    <?php endif ?>
1110f5fd22fSGreg Roach</div>
112