1f5402f3dSGreg Roach<?php 2f5402f3dSGreg Roach 3*058ba724SGreg Roachuse Fisharebest\Webtrees\Family; 4f5402f3dSGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\SearchGeneralAction; 5f5402f3dSGreg Roachuse Fisharebest\Webtrees\I18N; 6*058ba724SGreg Roachuse Fisharebest\Webtrees\Individual; 7*058ba724SGreg Roachuse Fisharebest\Webtrees\Location; 8*058ba724SGreg Roachuse Fisharebest\Webtrees\Note; 9*058ba724SGreg Roachuse Fisharebest\Webtrees\Repository; 10*058ba724SGreg Roachuse Fisharebest\Webtrees\Source; 11dc270d8cSGreg Roachuse Fisharebest\Webtrees\Tree; 12ca2d6785SGreg Roachuse Illuminate\Support\Collection; 13dc270d8cSGreg Roach 14dc270d8cSGreg Roach/** 15ca2d6785SGreg Roach * @var Collection<Tree> $all_trees 16*058ba724SGreg Roach * @var bool $exist_locations 17*058ba724SGreg Roach * @var bool $exist_notes 18*058ba724SGreg Roach * @var bool $exist_repositories 19*058ba724SGreg Roach * @var bool $exist_sources 20*058ba724SGreg Roach * @var Collection<Family> $families 21*058ba724SGreg Roach * @var Collection<Individual> $individuals 22*058ba724SGreg Roach * @var Collection<Location> $locations 23*058ba724SGreg Roach * @var Collection<Note> $notes 24dc270d8cSGreg Roach * @var string $query 25*058ba724SGreg Roach * @var Collection<Repository> $repositories 26*058ba724SGreg Roach * @var Collection<Source> $sources 27dc270d8cSGreg Roach * @var bool $search_families 28dc270d8cSGreg Roach * @var bool $search_individuals 29*058ba724SGreg Roach * @var bool $search_locations 30dc270d8cSGreg Roach * @var bool $search_notes 31dc270d8cSGreg Roach * @var bool $search_repositories 32dc270d8cSGreg Roach * @var bool $search_sources 33ca2d6785SGreg Roach * @var Collection<Tree> $search_trees 34dc270d8cSGreg Roach * @var string $title 35dc270d8cSGreg Roach * @var Tree $tree 36dc270d8cSGreg Roach */ 37f5402f3dSGreg Roach 38f5402f3dSGreg Roach?> 39dd6b2bfcSGreg Roach 40dd6b2bfcSGreg Roach<h2 class="wt-page-title"> 41dd6b2bfcSGreg Roach <?= $title ?> 42dd6b2bfcSGreg Roach</h2> 43dd6b2bfcSGreg Roach 44dc270d8cSGreg Roach<form method="post" action="<?= e(route(SearchGeneralAction::class, ['tree' => $tree->name()])) ?>" 45dc270d8cSGreg Roach class="wt-page-options wt-page-options-search hidden-print mb-4" name="searchform"> 46f5402f3dSGreg Roach <?= csrf_field() ?> 47dd6b2bfcSGreg Roach <div class="row form-group"> 48dd6b2bfcSGreg Roach <label class="col-sm-3 col-form-label wt-page-options-label" for="query"> 49dd6b2bfcSGreg Roach <?= I18N::translate('Search for') ?> 50dd6b2bfcSGreg Roach </label> 51dd6b2bfcSGreg Roach <div class="col-sm-9 wt-page-options-value"> 520d2905f7SGreg Roach <div class="input-group"> 537dca5265SGreg Roach <input id="query" class="form-control" type="text" name="query" value="<?= e($query) ?>" required="required"> 54dd6b2bfcSGreg Roach <?= view('edit/input-addon-keyboard', ['id' => 'query']) ?> 55dd6b2bfcSGreg Roach </div> 56dd6b2bfcSGreg Roach </div> 57dd6b2bfcSGreg Roach </div> 58dd6b2bfcSGreg Roach <fieldset class="form-group"> 59dd6b2bfcSGreg Roach <div class="row"> 60dd6b2bfcSGreg Roach <label class="col-sm-3 col-form-label wt-page-options-label"> 61dd6b2bfcSGreg Roach <?= I18N::translate('Records') ?> 62dd6b2bfcSGreg Roach </label> 63dd6b2bfcSGreg Roach <div class="col-sm-9 wt-page-options-value"> 64dd6b2bfcSGreg Roach <div class="form-check form-check-inline"> 65dd6b2bfcSGreg Roach <label class="form-check-label"> 66dc270d8cSGreg Roach <input class="form-check-input" <?= $search_individuals ? 'checked' : '' ?> 67dc270d8cSGreg Roach name="search_individuals" type="checkbox"> 68dd6b2bfcSGreg Roach <?= I18N::translate('Individuals') ?> 69dd6b2bfcSGreg Roach </label> 70dd6b2bfcSGreg Roach </div> 71dd6b2bfcSGreg Roach 72dd6b2bfcSGreg Roach <div class="form-check form-check-inline"> 73dd6b2bfcSGreg Roach <label class="form-check-label"> 74dc270d8cSGreg Roach <input class="form-check-input" <?= $search_families ? 'checked' : '' ?> name="search_families" 75dc270d8cSGreg Roach type="checkbox"> 76dd6b2bfcSGreg Roach <?= I18N::translate('Families') ?> 77dd6b2bfcSGreg Roach </label> 78dd6b2bfcSGreg Roach </div> 79dd6b2bfcSGreg Roach 80*058ba724SGreg Roach <?php if ($exist_sources) : ?> 81dd6b2bfcSGreg Roach <div class="form-check form-check-inline"> 82dd6b2bfcSGreg Roach <label class="form-check-label"> 83dc270d8cSGreg Roach <input class="form-check-input" <?= $search_sources ? 'checked' : '' ?> name="search_sources" 84dc270d8cSGreg Roach type="checkbox"> 85dd6b2bfcSGreg Roach <?= I18N::translate('Sources') ?> 86dd6b2bfcSGreg Roach </label> 87dd6b2bfcSGreg Roach </div> 88*058ba724SGreg Roach <?php endif ?> 89dd6b2bfcSGreg Roach 90*058ba724SGreg Roach <?php if ($exist_repositories) : ?> 91dd6b2bfcSGreg Roach <div class="form-check form-check-inline"> 92dd6b2bfcSGreg Roach <label class="form-check-label"> 93dc270d8cSGreg Roach <input class="form-check-input" <?= $search_repositories ? 'checked' : '' ?> 94dc270d8cSGreg Roach name="search_repositories" type="checkbox"> 95dd6b2bfcSGreg Roach <?= I18N::translate('Repositories') ?> 96dd6b2bfcSGreg Roach </label> 97dd6b2bfcSGreg Roach </div> 98*058ba724SGreg Roach <?php endif ?> 99dd6b2bfcSGreg Roach 100*058ba724SGreg Roach <?php if ($exist_notes) : ?> 101dd6b2bfcSGreg Roach <div class="form-check form-check-inline"> 102dd6b2bfcSGreg Roach <label class="form-check-label"> 103dc270d8cSGreg Roach <input class="form-check-input" <?= $search_notes ? 'checked' : '' ?> name="search_notes" 104dc270d8cSGreg Roach type="checkbox"> 105dd6b2bfcSGreg Roach <?= I18N::translate('Shared notes') ?> 106dd6b2bfcSGreg Roach </label> 107dd6b2bfcSGreg Roach </div> 108*058ba724SGreg Roach <?php endif ?> 109*058ba724SGreg Roach 110*058ba724SGreg Roach <?php if ($exist_locations) : ?> 111*058ba724SGreg Roach <div class="form-check form-check-inline"> 112*058ba724SGreg Roach <label class="form-check-label"> 113*058ba724SGreg Roach <input class="form-check-input" <?= $search_locations ? 'checked' : '' ?> name="search_locations" 114*058ba724SGreg Roach type="checkbox"> 115*058ba724SGreg Roach <?= I18N::translate('Locations') ?> 116*058ba724SGreg Roach </label> 117*058ba724SGreg Roach </div> 118*058ba724SGreg Roach <?php endif ?> 119dd6b2bfcSGreg Roach </div> 120dd6b2bfcSGreg Roach </div> 121dd6b2bfcSGreg Roach </fieldset> 122dd6b2bfcSGreg Roach 123ca2d6785SGreg Roach <?= view('search-trees', ['all_trees' => $all_trees, 'search_trees' => $search_trees]) ?> 124dd6b2bfcSGreg Roach 125dd6b2bfcSGreg Roach <div class="row form-group"> 126dd6b2bfcSGreg Roach <label class="col-sm-3 col-form-label wt-page-options-label"></label> 127dd6b2bfcSGreg Roach <div class="col-sm-9 wt-page-options-value"> 128dc270d8cSGreg Roach <input type="submit" class="btn btn-primary" value="<?= /* I18N: A button label. */ 129dc270d8cSGreg Roach I18N::translate('search') ?>"> 130dd6b2bfcSGreg Roach </div> 131dd6b2bfcSGreg Roach </div> 132dd6b2bfcSGreg Roach</form> 133dd6b2bfcSGreg Roach 134dd6b2bfcSGreg Roach<?php if ($query !== '') : ?> 135*058ba724SGreg Roach <?php if ($individuals->isEmpty() && $families->isEmpty() && $locations->isEmpty() && $repositories->isEmpty() && $sources->isEmpty() && $notes->isEmpty()) : ?> 136dd6b2bfcSGreg Roach <div class="alert alert-info row"> 137dd6b2bfcSGreg Roach <?= I18N::translate('No results found.') ?> 138dd6b2bfcSGreg Roach </div> 139dd6b2bfcSGreg Roach <?php else : ?> 140*058ba724SGreg Roach <?= view('search-results', ['families' => $families, 'individuals' => $individuals, 'locations' => $locations, 'notes' => $notes, 'repositories' => $repositories, 'sources' => $sources, 'search_families' => $search_families, 'search_individuals' => $search_individuals, 'search_locations' => $search_locations, 'search_notes' => $search_notes, 'search_repositories' => $search_repositories, 'search_sources' => $search_sources, 'tree' => $tree]) ?> 141dd6b2bfcSGreg Roach <?php endif ?> 142dd6b2bfcSGreg Roach<?php endif ?> 143dd6b2bfcSGreg Roach 144dd6b2bfcSGreg Roach<?= view('modals/on-screen-keyboard') ?> 145