1d70512abSGreg Roach<?php 2d70512abSGreg Roach 3dc270d8cSGreg Roachuse Fisharebest\Webtrees\Family; 4d70512abSGreg Roachuse Fisharebest\Webtrees\I18N; 5dc270d8cSGreg Roachuse Fisharebest\Webtrees\Individual; 6058ba724SGreg Roachuse Fisharebest\Webtrees\Location; 7dc270d8cSGreg Roachuse Fisharebest\Webtrees\Note; 8dc270d8cSGreg Roachuse Fisharebest\Webtrees\Repository; 9dc270d8cSGreg Roachuse Fisharebest\Webtrees\Source; 10dc270d8cSGreg Roachuse Fisharebest\Webtrees\Tree; 11dc270d8cSGreg Roachuse Fisharebest\Webtrees\View; 12dc270d8cSGreg Roachuse Illuminate\Support\Collection; 13dc270d8cSGreg Roach 14dc270d8cSGreg Roach/** 15dc270d8cSGreg Roach * @var Collection<Family> $families 16dc270d8cSGreg Roach * @var Collection<Individual> $individuals 17058ba724SGreg Roach * @var Collection<Location> $locations 18dc270d8cSGreg Roach * @var Collection<Note> $notes 19dc270d8cSGreg Roach * @var Collection<Repository> $repositories 20dc270d8cSGreg Roach * @var Collection<Source> $sources 21dc270d8cSGreg Roach * @var bool $search_families 22dc270d8cSGreg Roach * @var bool $search_individuals 23058ba724SGreg Roach * @var bool $search_locations 24dc270d8cSGreg Roach * @var bool $search_notes 25dc270d8cSGreg Roach * @var bool $search_repositories 26dc270d8cSGreg Roach * @var bool $search_sources 27dc270d8cSGreg Roach * @var Tree $tree 28dc270d8cSGreg Roach */ 29d70512abSGreg Roach 30d70512abSGreg Roach?> 31dd6b2bfcSGreg Roach 32dd6b2bfcSGreg Roach<div class="wt-search-results"> 33dd6b2bfcSGreg Roach <ul class="nav nav-tabs wt-search-results-tabs" role="tablist"> 34dd6b2bfcSGreg Roach <?php if ($search_individuals) : ?> 356a4003b9SGreg Roach <li class="nav-item" role="presentation"> 36*a6b8f374SGreg Roach <button class="nav-link <?= $individuals->isEmpty() ? 'text-muted' : '' ?>" data-bs-target="#individuals" data-bs-toggle="tab" href="#individuals" role="tab" aria-controls="individuals"> 37dd6b2bfcSGreg Roach <?= I18N::translate('Individuals') ?> 38dd6b2bfcSGreg Roach <span class="badge badge-secondary"> 39dd6b2bfcSGreg Roach <?= I18N::number(count($individuals)) ?> 40dd6b2bfcSGreg Roach </span> 41*a6b8f374SGreg Roach </button> 42dd6b2bfcSGreg Roach </li> 43dd6b2bfcSGreg Roach <?php endif ?> 44dd6b2bfcSGreg Roach 45dd6b2bfcSGreg Roach <?php if ($search_families) : ?> 466a4003b9SGreg Roach <li class="nav-item" role="presentation"> 47*a6b8f374SGreg Roach <button class="nav-link <?= $families->isEmpty() ? 'text-muted' : '' ?>" data-bs-target="#families" data-bs-toggle="tab" href="#families" role="tab" aria-controls="families"> 48dd6b2bfcSGreg Roach <?= I18N::translate('Families') ?> 49dd6b2bfcSGreg Roach <span class="badge badge-secondary"> 50dd6b2bfcSGreg Roach <?= I18N::number(count($families)) ?> 51dd6b2bfcSGreg Roach </span> 52*a6b8f374SGreg Roach </button> 53dd6b2bfcSGreg Roach </li> 54dd6b2bfcSGreg Roach <?php endif ?> 55dd6b2bfcSGreg Roach 56dd6b2bfcSGreg Roach <?php if ($search_sources) : ?> 576a4003b9SGreg Roach <li class="nav-item" role="presentation"> 58*a6b8f374SGreg Roach <button class="nav-link <?= $sources->isEmpty() ? 'text-muted' : '' ?>" data-bs-target="#sources" data-bs-toggle="tab" href="#sources" role="tab" aria-controls="sources"> 59dd6b2bfcSGreg Roach <?= I18N::translate('Sources') ?> 60dd6b2bfcSGreg Roach <span class="badge badge-secondary"> 61dd6b2bfcSGreg Roach <?= I18N::number(count($sources)) ?> 62dd6b2bfcSGreg Roach </span> 63*a6b8f374SGreg Roach </button> 64dd6b2bfcSGreg Roach </li> 65dd6b2bfcSGreg Roach <?php endif ?> 66dd6b2bfcSGreg Roach 67dd6b2bfcSGreg Roach <?php if ($search_repositories) : ?> 686a4003b9SGreg Roach <li class="nav-item" role="presentation"> 69*a6b8f374SGreg Roach <button class="nav-link <?= $repositories->isEmpty() ? 'text-muted' : '' ?>" data-bs-target="#repositories" data-bs-toggle="tab" href="#repositories" role="tab" aria-controls="repositories"> 70dd6b2bfcSGreg Roach <?= I18N::translate('Repositories') ?> 71dd6b2bfcSGreg Roach <span class="badge badge-secondary"> 72dd6b2bfcSGreg Roach <?= I18N::number(count($repositories)) ?> 73dd6b2bfcSGreg Roach </span> 74*a6b8f374SGreg Roach </button> 75dd6b2bfcSGreg Roach </li> 76dd6b2bfcSGreg Roach <?php endif ?> 77dd6b2bfcSGreg Roach 78dd6b2bfcSGreg Roach <?php if ($search_notes) : ?> 796a4003b9SGreg Roach <li class="nav-item" role="presentation"> 80*a6b8f374SGreg Roach <button class="nav-link <?= $notes->isEmpty() ? 'text-muted' : '' ?>" data-bs-target="#notes" data-bs-toggle="tab" href="#notes" role="tab" aria-controls="notes"> 81dd6b2bfcSGreg Roach <?= I18N::translate('Notes') ?> 82dd6b2bfcSGreg Roach <span class="badge badge-secondary"> 83dd6b2bfcSGreg Roach <?= I18N::number(count($notes)) ?> 84dd6b2bfcSGreg Roach </span> 85*a6b8f374SGreg Roach </button> 86dd6b2bfcSGreg Roach </li> 87dd6b2bfcSGreg Roach <?php endif ?> 88058ba724SGreg Roach 89058ba724SGreg Roach <?php if ($search_locations) : ?> 90058ba724SGreg Roach <li class="nav-item" role="presentation"> 91*a6b8f374SGreg Roach <button class="nav-link <?= $locations->isEmpty() ? 'text-muted' : '' ?>" data-bs-target="#locations" data-bs-toggle="tab" href="#locations" role="tab" aria-controls="locations"> 92058ba724SGreg Roach <?= I18N::translate('Locations') ?> 93058ba724SGreg Roach <span class="badge badge-secondary"> 94058ba724SGreg Roach <?= I18N::number(count($locations)) ?> 95058ba724SGreg Roach </span> 96*a6b8f374SGreg Roach </button> 97058ba724SGreg Roach </li> 98058ba724SGreg Roach <?php endif ?> 99dd6b2bfcSGreg Roach </ul> 100dd6b2bfcSGreg Roach 101dd6b2bfcSGreg Roach <div class="tab-content wt-search-results-content"> 102dd6b2bfcSGreg Roach <?php if ($search_individuals) : ?> 103*a6b8f374SGreg Roach <div class="tab-pane" id="individuals" role="tabpanel" aria-labelledby="individuals-tab"> 104dd6b2bfcSGreg Roach <?= view('lists/individuals-table', ['individuals' => $individuals, 'sosa' => false, 'tree' => $tree]) ?> 105dd6b2bfcSGreg Roach </div> 106dd6b2bfcSGreg Roach <?php endif ?> 107dd6b2bfcSGreg Roach 108dd6b2bfcSGreg Roach <?php if ($search_families) : ?> 109*a6b8f374SGreg Roach <div class="tab-pane" id="families" role="tabpanel" aria-labelledby="families-tab"> 110dd6b2bfcSGreg Roach <?= view('lists/families-table', ['families' => $families, 'tree' => $tree]) ?> 111dd6b2bfcSGreg Roach </div> 112dd6b2bfcSGreg Roach <?php endif ?> 113dd6b2bfcSGreg Roach 114dd6b2bfcSGreg Roach <?php if ($search_sources) : ?> 115*a6b8f374SGreg Roach <div class="tab-pane" id="sources" role="tabpanel" aria-labelledby="sources-tab"> 116dd6b2bfcSGreg Roach <?= view('lists/sources-table', ['sources' => $sources, 'tree' => $tree]) ?> 117dd6b2bfcSGreg Roach </div> 118dd6b2bfcSGreg Roach <?php endif ?> 119dd6b2bfcSGreg Roach 120dd6b2bfcSGreg Roach <?php if ($search_repositories) : ?> 121*a6b8f374SGreg Roach <div class="tab-pane" id="repositories" role="tabpanel" aria-labelledby="repositories-tab"> 122dd6b2bfcSGreg Roach <?= view('lists/repositories-table', ['repositories' => $repositories, 'tree' => $tree]) ?> 123dd6b2bfcSGreg Roach </div> 124dd6b2bfcSGreg Roach <?php endif ?> 125dd6b2bfcSGreg Roach 126dd6b2bfcSGreg Roach <?php if ($search_notes) : ?> 127*a6b8f374SGreg Roach <div class="tab-pane" id="notes" role="tabpanel" aria-labelledby="notes-tab"> 128dd6b2bfcSGreg Roach <?= view('lists/notes-table', ['notes' => $notes, 'tree' => $tree]) ?> 129dd6b2bfcSGreg Roach </div> 130dd6b2bfcSGreg Roach <?php endif ?> 131058ba724SGreg Roach 132058ba724SGreg Roach <?php if ($search_locations) : ?> 133*a6b8f374SGreg Roach <div class="tab-pane" id="locations" role="tabpanel" aria-labelledby="locations-tab"> 134058ba724SGreg Roach <?= view('lists/locations-table', ['locations' => $locations, 'tree' => $tree]) ?> 135058ba724SGreg Roach </div> 136058ba724SGreg Roach <?php endif ?> 137dd6b2bfcSGreg Roach </div> 138dd6b2bfcSGreg Roach</div> 139dd6b2bfcSGreg Roach 140dd6b2bfcSGreg Roach<?php View::push('javascript') ?> 141dd6b2bfcSGreg Roach<script> 142*a6b8f374SGreg Roach document.querySelector('.wt-search-results-tabs li button').click(); 143dd6b2bfcSGreg Roach</script> 144dd6b2bfcSGreg Roach<?php View::endpush() ?> 145