1*dd6b2bfcSGreg Roach<?php use Fisharebest\Webtrees\I18N; ?> 2*dd6b2bfcSGreg Roach 3*dd6b2bfcSGreg Roach<h2 class="wt-page-title"> 4*dd6b2bfcSGreg Roach <?= $title ?> 5*dd6b2bfcSGreg Roach</h2> 6*dd6b2bfcSGreg Roach 7*dd6b2bfcSGreg Roach<form class="wt-page-options wt-page-options-search hidden-print mb-4" name="searchform"> 8*dd6b2bfcSGreg Roach <input type="hidden" name="route" value="search-general"> 9*dd6b2bfcSGreg Roach <input type="hidden" name="ged" value="<?= e($tree->getName()) ?>"> 10*dd6b2bfcSGreg Roach <div class="row form-group"> 11*dd6b2bfcSGreg Roach <label class="col-sm-3 col-form-label wt-page-options-label" for="query"> 12*dd6b2bfcSGreg Roach <?= I18N::translate('Search for') ?> 13*dd6b2bfcSGreg Roach </label> 14*dd6b2bfcSGreg Roach <div class="col-sm-9 wt-page-options-value"> 15*dd6b2bfcSGreg Roach <div class="input-group input-group-sm"> 16*dd6b2bfcSGreg Roach <input id="query" class="form-control form-control-sm" type="text" name="query" value="<?= e($query) ?>" required> 17*dd6b2bfcSGreg Roach <?= view('edit/input-addon-keyboard', ['id' => 'query']) ?> 18*dd6b2bfcSGreg Roach </div> 19*dd6b2bfcSGreg Roach </div> 20*dd6b2bfcSGreg Roach </div> 21*dd6b2bfcSGreg Roach <fieldset class="form-group"> 22*dd6b2bfcSGreg Roach <div class="row"> 23*dd6b2bfcSGreg Roach <label class="col-sm-3 col-form-label wt-page-options-label"> 24*dd6b2bfcSGreg Roach <?= I18N::translate('Records') ?> 25*dd6b2bfcSGreg Roach </label> 26*dd6b2bfcSGreg Roach <div class="col-sm-9 wt-page-options-value"> 27*dd6b2bfcSGreg Roach <div class="form-check form-check-inline"> 28*dd6b2bfcSGreg Roach <label class="form-check-label"> 29*dd6b2bfcSGreg Roach <input class="form-check-input" <?= $search_individuals ? 'checked' : '' ?> name="search_individuals" type="checkbox"> 30*dd6b2bfcSGreg Roach <?= I18N::translate('Individuals') ?> 31*dd6b2bfcSGreg Roach </label> 32*dd6b2bfcSGreg Roach </div> 33*dd6b2bfcSGreg Roach 34*dd6b2bfcSGreg Roach <div class="form-check form-check-inline"> 35*dd6b2bfcSGreg Roach <label class="form-check-label"> 36*dd6b2bfcSGreg Roach <input class="form-check-input" <?= $search_families ? 'checked' : '' ?> name="search_families" type="checkbox"> 37*dd6b2bfcSGreg Roach <?= I18N::translate('Families') ?> 38*dd6b2bfcSGreg Roach </label> 39*dd6b2bfcSGreg Roach </div> 40*dd6b2bfcSGreg Roach 41*dd6b2bfcSGreg Roach <div class="form-check form-check-inline"> 42*dd6b2bfcSGreg Roach <label class="form-check-label"> 43*dd6b2bfcSGreg Roach <input class="form-check-input" <?= $search_sources ? 'checked' : '' ?> name="search_sources" type="checkbox"> 44*dd6b2bfcSGreg Roach <?= I18N::translate('Sources') ?> 45*dd6b2bfcSGreg Roach </label> 46*dd6b2bfcSGreg Roach </div> 47*dd6b2bfcSGreg Roach 48*dd6b2bfcSGreg Roach <div class="form-check form-check-inline"> 49*dd6b2bfcSGreg Roach <label class="form-check-label"> 50*dd6b2bfcSGreg Roach <input class="form-check-input" <?= $search_repositories ? 'checked' : '' ?> name="search_repositories" type="checkbox"> 51*dd6b2bfcSGreg Roach <?= I18N::translate('Repositories') ?> 52*dd6b2bfcSGreg Roach </label> 53*dd6b2bfcSGreg Roach </div> 54*dd6b2bfcSGreg Roach 55*dd6b2bfcSGreg Roach <div class="form-check form-check-inline"> 56*dd6b2bfcSGreg Roach <label class="form-check-label"> 57*dd6b2bfcSGreg Roach <input class="form-check-input" <?= $search_notes ? 'checked' : '' ?> name="search_notes" type="checkbox"> 58*dd6b2bfcSGreg Roach <?= I18N::translate('Shared notes') ?> 59*dd6b2bfcSGreg Roach </label> 60*dd6b2bfcSGreg Roach </div> 61*dd6b2bfcSGreg Roach </div> 62*dd6b2bfcSGreg Roach </div> 63*dd6b2bfcSGreg Roach </fieldset> 64*dd6b2bfcSGreg Roach 65*dd6b2bfcSGreg Roach <?php if (count($all_trees) > 1) : ?> 66*dd6b2bfcSGreg Roach <fieldset class="form-group"> 67*dd6b2bfcSGreg Roach <div class="row"> 68*dd6b2bfcSGreg Roach <label class="col-sm-3 col-form-label wt-page-options-label"> 69*dd6b2bfcSGreg Roach <?= I18N::translate('Family trees') ?> 70*dd6b2bfcSGreg Roach </label> 71*dd6b2bfcSGreg Roach <div class="col-sm-9 wt-page-options-value pt-2"> 72*dd6b2bfcSGreg Roach <div class="d-flex justify-content-between"> 73*dd6b2bfcSGreg Roach <div id="search-trees" class="form-check"> 74*dd6b2bfcSGreg Roach <?php foreach ($all_trees as $tree) : ?> 75*dd6b2bfcSGreg Roach <div class="col px-0"> 76*dd6b2bfcSGreg Roach <label class="form-check-label"> 77*dd6b2bfcSGreg Roach <input class="form-check form-check-input" type="checkbox" <?= in_array($tree, $search_trees) ? 'checked' : '' ?> value="<?= ($tree->getName()) ?>" name="search_trees[]"> 78*dd6b2bfcSGreg Roach <?= e($tree->getTitle()) ?> 79*dd6b2bfcSGreg Roach </label> 80*dd6b2bfcSGreg Roach </div> 81*dd6b2bfcSGreg Roach <?php endforeach ?> 82*dd6b2bfcSGreg Roach </div> 83*dd6b2bfcSGreg Roach <?php if (count($all_trees) > 3) : ?> 84*dd6b2bfcSGreg Roach <div class="d-row align-self-end mb-2"> 85*dd6b2bfcSGreg Roach <input type="button" class="btn btn-sm btn-secondary mx-1" value="<?= /* I18N: select all (of the family trees) */ I18N::translate('select all') ?>" onclick="$('#search-trees :checkbox').each(function(){$(this).attr('checked', true);});return false;"> 86*dd6b2bfcSGreg Roach <input type="button" class="btn btn-sm btn-secondary mx-1" value="<?= /* I18N: select none (of the family trees) */ I18N::translate('select none') ?>" onclick="$('#search-trees :checkbox').each(function(){$(this).attr('checked', false);});return false;"> 87*dd6b2bfcSGreg Roach <?php if (count($all_trees) > 10) : ?> 88*dd6b2bfcSGreg Roach <input type="button" value="<?= I18N::translate('invert selection') ?>" onclick="$('#search-trees :checkbox').each(function(){$(this).attr('checked', !$(this).attr('checked'));});return false;"> 89*dd6b2bfcSGreg Roach <?php endif ?> 90*dd6b2bfcSGreg Roach </div> 91*dd6b2bfcSGreg Roach <?php endif ?> 92*dd6b2bfcSGreg Roach </div> 93*dd6b2bfcSGreg Roach </div> 94*dd6b2bfcSGreg Roach </div> 95*dd6b2bfcSGreg Roach </fieldset> 96*dd6b2bfcSGreg Roach <?php endif ?> 97*dd6b2bfcSGreg Roach 98*dd6b2bfcSGreg Roach <div class="row form-group"> 99*dd6b2bfcSGreg Roach <label class="col-sm-3 col-form-label wt-page-options-label"></label> 100*dd6b2bfcSGreg Roach <div class="col-sm-9 wt-page-options-value"> 101*dd6b2bfcSGreg Roach <input type="submit" class="btn btn-primary" value="<?= /* I18N: A button label. */ I18N::translate('search') ?>"> 102*dd6b2bfcSGreg Roach </div> 103*dd6b2bfcSGreg Roach </div> 104*dd6b2bfcSGreg Roach</form> 105*dd6b2bfcSGreg Roach 106*dd6b2bfcSGreg Roach<?php if ($query !== '') : ?> 107*dd6b2bfcSGreg Roach <?php if (empty($individuals) && empty($families) && empty($repositories) && empty($sources) && empty($notes)) : ?> 108*dd6b2bfcSGreg Roach <div class="alert alert-info row"> 109*dd6b2bfcSGreg Roach <?= I18N::translate('No results found.') ?> 110*dd6b2bfcSGreg Roach </div> 111*dd6b2bfcSGreg Roach <?php else : ?> 112*dd6b2bfcSGreg Roach <?= view('search-results', ['families' => $families, 'individuals' => $individuals, 'notes' => $notes, 'repositories' => $repositories, 'sources' => $sources, 'search_families' => $search_families, 'search_individuals' => $search_individuals, 'search_notes' => $search_notes, 'search_repositories' => $search_repositories, 'search_sources' => $search_sources]) ?> 113*dd6b2bfcSGreg Roach <?php endif ?> 114*dd6b2bfcSGreg Roach<?php endif ?> 115*dd6b2bfcSGreg Roach 116*dd6b2bfcSGreg Roach<?= view('modals/on-screen-keyboard') ?> 117