xref: /webtrees/resources/views/search-advanced-page.phtml (revision f5402f3dbd759ec94d88460e5ae9815f9b823dae)
1*f5402f3dSGreg Roach<?php
2*f5402f3dSGreg Roach
3*f5402f3dSGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\SearchAdvancedAction;
4*f5402f3dSGreg Roachuse Fisharebest\Webtrees\I18N;
5*f5402f3dSGreg Roach
6*f5402f3dSGreg Roach?>
7dd6b2bfcSGreg Roach
8dd6b2bfcSGreg Roach<h2 class="wt-page-title">
9dd6b2bfcSGreg Roach    <?= $title ?>
10dd6b2bfcSGreg Roach</h2>
11dd6b2bfcSGreg Roach
12dd6b2bfcSGreg Roach<div id="advanced-search-page">
13*f5402f3dSGreg Roach    <form method="post" action="<?= e(route(SearchAdvancedAction::class, ['tree' => $tree->name()])) ?>" class="wt-page-options wt-page-options-search-advanced hidden-print mb-4">
14*f5402f3dSGreg Roach        <?= csrf_field() ?>
15dd6b2bfcSGreg Roach
16dd6b2bfcSGreg Roach        <div class="row form-group wt-page-options-label mt-4">
17dd6b2bfcSGreg Roach            <div class="form-row mx-auto">
18dd6b2bfcSGreg Roach                <?= I18N::translate('Individual') ?>
19dd6b2bfcSGreg Roach            </div>
20dd6b2bfcSGreg Roach        </div>
21dd6b2bfcSGreg Roach
22dd6b2bfcSGreg Roach        <?php foreach ($fields as $field_name => $field_value) : ?>
23dd6b2bfcSGreg Roach            <?php if (substr($field_name, 0, 5) !== 'FAMC:') : ?>
24dd6b2bfcSGreg Roach                <?= view('search-advanced-field', ['field_name' => $field_name, 'field_value' => $field_value, 'modifier' => $modifiers[$field_name] ?? '', 'date_options' => $date_options, 'name_options' => $name_options]) ?>
25dd6b2bfcSGreg Roach            <?php endif ?>
26dd6b2bfcSGreg Roach        <?php endforeach ?>
27dd6b2bfcSGreg Roach
28dd6b2bfcSGreg Roach        <div class="row form-group">
29dd6b2bfcSGreg Roach            <div class="col-sm-3 col-form-label wt-page-options-label">
30dd6b2bfcSGreg Roach                <?= I18N::translate('Add more fields') ?>
31dd6b2bfcSGreg Roach            </div>
32dd6b2bfcSGreg Roach
33dd6b2bfcSGreg Roach            <div class="col-sm-3 wt-page-options-value">
34c9e11c2aSGreg Roach                <?= view('components/select', ['name' => 'other_field', 'selected' => '', 'options' => ['' => ''] + $other_fields]) ?>
35dd6b2bfcSGreg Roach            </div>
36dd6b2bfcSGreg Roach
37dd6b2bfcSGreg Roach            <div class="col-sm-3 wt-page-options-value">
38dd6b2bfcSGreg Roach                <input type="text" class="form-control" name="other_value">
39dd6b2bfcSGreg Roach            </div>
40dd6b2bfcSGreg Roach
41dd6b2bfcSGreg Roach            <div class="col-sm-3 wt-page-options-value">
42dd6b2bfcSGreg Roach            </div>
43dd6b2bfcSGreg Roach        </div>
44dd6b2bfcSGreg Roach
45dd6b2bfcSGreg Roach        <div class="row form-group wt-page-options-label mt-4">
46dd6b2bfcSGreg Roach            <div class="form-row mx-auto">
47dd6b2bfcSGreg Roach                <?= I18N::translate('Father') ?>
48dd6b2bfcSGreg Roach            </div>
49dd6b2bfcSGreg Roach        </div>
50dd6b2bfcSGreg Roach
51dd6b2bfcSGreg Roach        <?php foreach ($fields as $field_name => $field_value) : ?>
52dd6b2bfcSGreg Roach            <?php if (substr($field_name, 0, 10) === 'FAMC:HUSB:') : ?>
53dd6b2bfcSGreg Roach                <?= view('search-advanced-field', ['field_name' => $field_name, 'field_value' => $field_value, 'modifier' => $modifiers[$field_name] ?? '', 'date_options' => $date_options, 'name_options' => $name_options]) ?>
54dd6b2bfcSGreg Roach            <?php endif ?>
55dd6b2bfcSGreg Roach        <?php endforeach ?>
56dd6b2bfcSGreg Roach
57dd6b2bfcSGreg Roach        <div class="row form-group wt-page-options-label mt-4">
58dd6b2bfcSGreg Roach            <div class="form-row mx-auto">
59dd6b2bfcSGreg Roach                <?= I18N::translate('Mother') ?>
60dd6b2bfcSGreg Roach            </div>
61dd6b2bfcSGreg Roach        </div>
62dd6b2bfcSGreg Roach
63dd6b2bfcSGreg Roach        <?php foreach ($fields as $field_name => $field_value) : ?>
64dd6b2bfcSGreg Roach            <?php if (substr($field_name, 0, 10) === 'FAMC:WIFE:') : ?>
65dd6b2bfcSGreg Roach                <?= view('search-advanced-field', ['field_name' => $field_name, 'field_value' => $field_value, 'modifier' => $modifiers[$field_name] ?? '', 'date_options' => $date_options, 'name_options' => $name_options]) ?>
66dd6b2bfcSGreg Roach            <?php endif ?>
67dd6b2bfcSGreg Roach        <?php endforeach ?>
68dd6b2bfcSGreg Roach
69dd6b2bfcSGreg Roach        <div class="row form-group my-3">
70dd6b2bfcSGreg Roach            <div class="form-row mx-auto">
71dd6b2bfcSGreg Roach                <input type="submit" class="btn btn-primary" value="<?= /* I18N: A button label. */
72dd6b2bfcSGreg Roach                I18N::translate('search') ?>">
73dd6b2bfcSGreg Roach            </div>
74dd6b2bfcSGreg Roach        </div>
75dd6b2bfcSGreg Roach    </form>
76dd6b2bfcSGreg Roach</div>
77dd6b2bfcSGreg Roach
78dd6b2bfcSGreg Roach<?php if (true) : ?>
79dd6b2bfcSGreg Roach    <?php if (empty($individuals)) : ?>
80dd6b2bfcSGreg Roach        <div class="alert alert-info row">
81dd6b2bfcSGreg Roach            <?= I18N::translate('No results found.') ?>
82dd6b2bfcSGreg Roach        </div>
83dd6b2bfcSGreg Roach    <?php else : ?>
84dd6b2bfcSGreg Roach        <?= view('search-results', ['individuals' => $individuals, 'search_families' => false, 'search_individuals' => true, 'search_notes' => false, 'search_sources' => false, 'search_repositories' => false]) ?>
85dd6b2bfcSGreg Roach    <?php endif ?>
86dd6b2bfcSGreg Roach<?php endif ?>
87dd6b2bfcSGreg Roach
88