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