1<?php 2 3use Fisharebest\Webtrees\Http\RequestHandlers\SearchPhoneticAction; 4use Fisharebest\Webtrees\I18N; 5use Fisharebest\Webtrees\Individual; 6use Fisharebest\Webtrees\Tree; 7use Illuminate\Support\Collection; 8 9/** 10 * @var Collection<Tree> $all_trees 11 * @var string $firstname 12 * @var Collection<Individual> $individuals 13 * @var string $lastname 14 * @var string $place 15 * @var Collection<Tree> $search_trees 16 * @var string $soundex 17 * @var string $title 18 * @var Tree $tree 19 */ 20 21?> 22 23<h2 class="wt-page-title"> 24 <?= $title ?> 25</h2> 26 27<form method="post" action="<?= e(route(SearchPhoneticAction::class, ['tree' => $tree->name()])) ?>" class="wt-page-options wt-page-options-ancestors-chart hidden-print mb-4" name="searchform"> 28 <?= csrf_field() ?> 29 30 <div class="row form-group"> 31 <label class="col-sm-3 col-form-label wt-page-options-label" for="firstname"> 32 <?= I18N::translate('Given name') ?> 33 </label> 34 <div class="col-sm-9 wt-page-options-value"> 35 <div class="input-group"> 36 <input class= "form-control" type="text" name="firstname" id="firstname" value="<?= e($firstname) ?>" autofocus> 37 <?= view('edit/input-addon-keyboard', ['id' => 'firstname']) ?> 38 </div> 39 </div> 40 </div> 41 42 <div class="row form-group"> 43 <label class="col-sm-3 col-form-label wt-page-options-label" for="lastname"> 44 <?= I18N::translate('Surname') ?> 45 </label> 46 <div class="col-sm-9 wt-page-options-value"> 47 <div class="input-group"> 48 <input class="form-control" type="text" name="lastname" id="lastname" value="<?= e($lastname) ?>"> 49 <?= view('edit/input-addon-keyboard', ['id' => 'lastname']) ?> 50 </div> 51 </div> 52 </div> 53 54 <div class="row form-group"> 55 <label class="col-sm-3 col-form-label wt-page-options-label" for="place"> 56 <?= I18N::translate('Place') ?> 57 </label> 58 <div class="col-sm-9 wt-page-options-value"> 59 <input class="form-control" type="text" name="place" id="place" value="<?= e($place) ?>"> 60 </div> 61 </div> 62 63 <fieldset class="form-group"> 64 <div class="row"> 65 <label class="col-sm-3 col-form-label wt-page-options-label"> 66 <?= I18N::translate('Phonetic algorithm') ?> 67 </label> 68 <div class="col-sm-9 wt-page-options-value"> 69 <div class="form-check form-check-inline"> 70 <input class="form-check-input" type="radio" name="soundex" value="Russell" <?= $soundex === 'Russell' ? 'checked' : '' ?> id="russell"> 71 <label class="form-check-label" for="russell"> 72 <?= I18N::translate('Russell') ?> 73 </label> 74 </div> 75 <div class="form-check form-check-inline"> 76 <input class="form-check-input" type="radio" name="soundex" value="DaitchM" <?= $soundex === 'DaitchM' ? 'checked' : '' ?> id="d-m"> 77 <label class="form-check-label" for="d-m"> 78 <?= I18N::translate('Daitch-Mokotoff') ?> 79 </label> 80 </div> 81 </div> 82 </div> 83 </fieldset> 84 85 <?= view('search-trees', ['all_trees' => $all_trees, 'search_trees' => $search_trees]) ?> 86 87 <div class="row form-group"> 88 <label class="col-sm-3 col-form-label wt-page-options-label"></label> 89 <div class="col-sm-9 wt-page-options-value"> 90 <input type="submit" class="btn btn-primary" value="<?= /* I18N: A button label. */ I18N::translate('search') ?>"> 91 </div> 92 </div> 93</form> 94 95<?php if ($firstname !== '' || $lastname !== '' || $place !== '') : ?> 96 <?php if ($individuals->isEmpty()) : ?> 97 <div class="alert alert-info row"> 98 <?= I18N::translate('No results found.') ?> 99 </div> 100 <?php else : ?> 101 <?= view('search-results', ['individuals' => $individuals, 'search_families' => false, 'search_individuals' => true, 'search_notes' => false, 'search_sources' => false, 'search_repositories' => false, 'tree' => $tree]) ?> 102 <?php endif ?> 103<?php endif ?> 104 105<?= view('modals/on-screen-keyboard') ?> 106