1<?php 2 3use Fisharebest\Webtrees\Family; 4use Fisharebest\Webtrees\I18N; 5use Fisharebest\Webtrees\Individual; 6use Fisharebest\Webtrees\Media; 7use Fisharebest\Webtrees\Note; 8use Fisharebest\Webtrees\Source; 9use Fisharebest\Webtrees\Tree; 10use Illuminate\Support\Collection; 11 12/** 13 * @var string $details 14 * @var ?Collection<Family> $linked_families 15 * @var ?Collection<Individual> $linked_individuals 16 * @var ?Collection<Media> $linked_media_objects 17 * @var ?Collection<Note> $linked_notes 18 * @var ?Collection<Source> $linked_sources 19 * @var Tree $tree 20 */ 21 22?> 23 24<ul class="nav nav-tabs" role="tablist"> 25 <li class="nav-item" role="presentation"> 26 <a class="nav-link active" data-bs-toggle="tab" role="tab" href="#details"> 27 <?= I18N::translate('Details') ?> 28 </a> 29 </li> 30 31 <?php if ($linked_individuals instanceof Collection) : ?> 32 <li class="nav-item" role="presentation"> 33 <a class="nav-link" data-bs-toggle="tab" role="tab" href="#individuals"> 34 <?= I18N::translate('Individuals') ?> 35 <?= view('components/badge', ['count' => $linked_individuals->count()]) ?> 36 </a> 37 </li> 38 <?php endif ?> 39 40 <?php if ($linked_families instanceof Collection) : ?> 41 <li class="nav-item" role="presentation"> 42 <a class="nav-link" data-bs-toggle="tab" role="tab" href="#families"> 43 <?= I18N::translate('Families') ?> 44 <?= view('components/badge', ['count' => $linked_families->count()]) ?> 45 </a> 46 </li> 47 <?php endif ?> 48 49 <?php if ($linked_media_objects instanceof Collection) : ?> 50 <li class="nav-item" role="presentation"> 51 <a class="nav-link" data-bs-toggle="tab" role="tab" href="#media"> 52 <?= I18N::translate('Media objects') ?> 53 <?= view('components/badge', ['count' => $linked_media_objects->count()]) ?> 54 </a> 55 </li> 56 <?php endif ?> 57 58 <?php if ($linked_sources instanceof Collection) : ?> 59 <li class="nav-item" role="presentation"> 60 <a class="nav-link" data-bs-toggle="tab" role="tab" href="#sources"> 61 <?= I18N::translate('Sources') ?> 62 <?= view('components/badge', ['count' => $linked_sources->count()]) ?> 63 </a> 64 </li> 65 <?php endif ?> 66 67 <?php if ($linked_notes instanceof Collection) : ?> 68 <li class="nav-item" role="presentation"> 69 <a class="nav-link" data-bs-toggle="tab" role="tab" href="#notes"> 70 <?= I18N::translate('Notes') ?> 71 <?= view('components/badge', ['count' => $linked_notes->count()]) ?> 72 </a> 73 </li> 74 <?php endif ?> 75</ul> 76 77<div class="tab-content"> 78 <div class="tab-pane fade show active" role="tabpanel" id="details"> 79 <?= $details ?> 80 </div> 81 82 <?php if ($linked_individuals instanceof Collection) : ?> 83 <div class="tab-pane fade" role="tabpanel" id="individuals"> 84 <?= view('lists/individuals-table', ['individuals' => $linked_individuals, 'sosa' => false, 'tree' => $tree]) ?> 85 </div> 86 <?php endif ?> 87 88 <?php if ($linked_families instanceof Collection) : ?> 89 <div class="tab-pane fade" role="tabpanel" id="families"> 90 <?= view('lists/families-table', ['families' => $linked_families, 'tree' => $tree]) ?> 91 </div> 92 <?php endif ?> 93 94 <?php if ($linked_media_objects instanceof Collection) : ?> 95 <div class="tab-pane fade" role="tabpanel" id="media"> 96 <?= view('lists/media-table', ['media_objects' => $linked_media_objects, 'tree' => $tree]) ?> 97 </div> 98 <?php endif ?> 99 100 <?php if ($linked_sources instanceof Collection) : ?> 101 <div class="tab-pane fade" role="tabpanel" id="sources"> 102 <?= view('lists/sources-table', ['sources' => $linked_sources, 'tree' => $tree]) ?> 103 </div> 104 <?php endif ?> 105 106 <?php if ($linked_notes instanceof Collection) : ?> 107 <div class="tab-pane fade" role="tabpanel" id="notes"> 108 <?= view('lists/notes-table', ['notes' => $linked_notes, 'tree' => $tree]) ?> 109 </div> 110 <?php endif ?> 111</div> 112