1<?php 2 3use Fisharebest\Webtrees\Family; 4use Fisharebest\Webtrees\I18N; 5use Fisharebest\Webtrees\Individual; 6use Fisharebest\Webtrees\Location; 7use Fisharebest\Webtrees\Media; 8use Fisharebest\Webtrees\Note; 9use Fisharebest\Webtrees\Repository; 10use Fisharebest\Webtrees\Source; 11use Fisharebest\Webtrees\Submitter; 12use Fisharebest\Webtrees\Tree; 13use Illuminate\Support\Collection; 14 15/** 16 * @var string $details 17 * @var ?Collection<int,Family> $linked_families 18 * @var ?Collection<int,Individual> $linked_individuals 19 * @var ?Collection<int,Location> $linked_locations 20 * @var ?Collection<int,Media> $linked_media_objects 21 * @var ?Collection<int,Note> $linked_notes 22 * @var ?Collection<int,Repository> $linked_repositories 23 * @var ?Collection<int,Source> $linked_sources 24 * @var ?Collection<int,Submitter> $linked_submitters 25 * @var Tree $tree 26 */ 27 28?> 29 30<ul class="nav nav-tabs" role="tablist"> 31 <li class="nav-item" role="presentation"> 32 <a class="nav-link active" data-bs-toggle="tab" role="tab" href="#details"> 33 <?= I18N::translate('Details') ?> 34 </a> 35 </li> 36 37 <?php if ($linked_individuals instanceof Collection) : ?> 38 <li class="nav-item" role="presentation"> 39 <a class="nav-link" data-bs-toggle="tab" role="tab" href="#individuals"> 40 <?= I18N::translate('Individuals') ?> 41 <?= view('components/badge', ['count' => $linked_individuals->count()]) ?> 42 </a> 43 </li> 44 <?php endif ?> 45 46 <?php if ($linked_families instanceof Collection) : ?> 47 <li class="nav-item" role="presentation"> 48 <a class="nav-link" data-bs-toggle="tab" role="tab" href="#families"> 49 <?= I18N::translate('Families') ?> 50 <?= view('components/badge', ['count' => $linked_families->count()]) ?> 51 </a> 52 </li> 53 <?php endif ?> 54 55 <?php if ($linked_media_objects instanceof Collection) : ?> 56 <li class="nav-item" role="presentation"> 57 <a class="nav-link" data-bs-toggle="tab" role="tab" href="#media"> 58 <?= I18N::translate('Media objects') ?> 59 <?= view('components/badge', ['count' => $linked_media_objects->count()]) ?> 60 </a> 61 </li> 62 <?php endif ?> 63 64 <?php if ($linked_sources instanceof Collection) : ?> 65 <li class="nav-item" role="presentation"> 66 <a class="nav-link" data-bs-toggle="tab" role="tab" href="#sources"> 67 <?= I18N::translate('Sources') ?> 68 <?= view('components/badge', ['count' => $linked_sources->count()]) ?> 69 </a> 70 </li> 71 <?php endif ?> 72 73 <?php if ($linked_notes instanceof Collection) : ?> 74 <li class="nav-item" role="presentation"> 75 <a class="nav-link" data-bs-toggle="tab" role="tab" href="#notes"> 76 <?= I18N::translate('Notes') ?> 77 <?= view('components/badge', ['count' => $linked_notes->count()]) ?> 78 </a> 79 </li> 80 <?php endif ?> 81 82 <?php if ($linked_repositories instanceof Collection) : ?> 83 <li class="nav-item" role="presentation"> 84 <a class="nav-link" data-bs-toggle="tab" role="tab" href="#repositories"> 85 <?= I18N::translate('Repositories') ?> 86 <?= view('components/badge', ['count' => $linked_repositories->count()]) ?> 87 </a> 88 </li> 89 <?php endif ?> 90 91 <?php if ($linked_submitters instanceof Collection) : ?> 92 <li class="nav-item" role="presentation"> 93 <a class="nav-link" data-bs-toggle="tab" role="tab" href="#submitters"> 94 <?= I18N::translate('Submitters') ?> 95 <?= view('components/badge', ['count' => $linked_submitters->count()]) ?> 96 </a> 97 </li> 98 <?php endif ?> 99 100 <?php if ($linked_locations instanceof Collection) : ?> 101 <li class="nav-item" role="presentation"> 102 <a class="nav-link" data-bs-toggle="tab" role="tab" href="#locations"> 103 <?= I18N::translate('Locations') ?> 104 <?= view('components/badge', ['count' => $linked_locations->count()]) ?> 105 </a> 106 </li> 107 <?php endif ?> 108</ul> 109 110<div class="tab-content"> 111 <div class="tab-pane fade show active" role="tabpanel" id="details"> 112 <?= $details ?> 113 </div> 114 115 <?php if ($linked_individuals instanceof Collection) : ?> 116 <div class="tab-pane fade" role="tabpanel" id="individuals"> 117 <?= view('lists/individuals-table', ['individuals' => $linked_individuals, 'sosa' => false, 'tree' => $tree]) ?> 118 </div> 119 <?php endif ?> 120 121 <?php if ($linked_families instanceof Collection) : ?> 122 <div class="tab-pane fade" role="tabpanel" id="families"> 123 <?= view('lists/families-table', ['families' => $linked_families, 'tree' => $tree]) ?> 124 </div> 125 <?php endif ?> 126 127 <?php if ($linked_media_objects instanceof Collection) : ?> 128 <div class="tab-pane fade" role="tabpanel" id="media"> 129 <?= view('lists/media-table', ['media_objects' => $linked_media_objects, 'tree' => $tree]) ?> 130 </div> 131 <?php endif ?> 132 133 <?php if ($linked_sources instanceof Collection) : ?> 134 <div class="tab-pane fade" role="tabpanel" id="sources"> 135 <?= view('lists/sources-table', ['sources' => $linked_sources, 'tree' => $tree]) ?> 136 </div> 137 <?php endif ?> 138 139 <?php if ($linked_notes instanceof Collection) : ?> 140 <div class="tab-pane fade" role="tabpanel" id="notes"> 141 <?= view('lists/notes-table', ['notes' => $linked_notes, 'tree' => $tree]) ?> 142 </div> 143 <?php endif ?> 144 145 <?php if ($linked_repositories instanceof Collection) : ?> 146 <div class="tab-pane fade" role="tabpanel" id="repositories"> 147 <?= view('lists/repositories-table', ['repositories' => $linked_repositories, 'tree' => $tree]) ?> 148 </div> 149 <?php endif ?> 150 151 <?php if ($linked_submitters instanceof Collection) : ?> 152 <div class="tab-pane fade" role="tabpanel" id="submitters"> 153 <?= view('lists/submitters-table', ['submitters' => $linked_submitters, 'tree' => $tree]) ?> 154 </div> 155 <?php endif ?> 156 157 <?php if ($linked_locations instanceof Collection) : ?> 158 <div class="tab-pane fade" role="tabpanel" id="locations"> 159 <?= view('lists/locations-table', ['locations' => $linked_locations, 'tree' => $tree]) ?> 160 </div> 161 <?php endif ?> 162</div> 163