xref: /webtrees/resources/views/modules/upcoming_events/config.phtml (revision 78606cf427772fbdc5222ff607ee23f43078f94b)
1<?php
2
3declare(strict_types=1);
4
5use Fisharebest\Webtrees\I18N;
6
7/**
8 * @var array<string,string> $all_events
9 * @var int                  $days
10 * @var array<string>        $event_array
11 * @var string               $filter
12 * @var string               $info_style
13 * @var array<string,string> $info_styles
14 * @var string               $sort_style
15 * @var array<string,string> $sort_styles
16 * @var int                  $max_days
17 */
18
19?>
20
21<div class="row mb-3">
22    <label class="col-sm-3 col-form-label" for="days">
23        <?= I18N::translate('Number of days to show') ?>
24    </label>
25    <div class="col-sm-9">
26        <input type="number" class="form-control" name="days" id="days" size="2" value="<?= $days ?>" min="1" max="<?= $max_days ?>">
27        <?= I18N::plural('maximum %s day', 'maximum %s days', $max_days, I18N::number($max_days)) ?>
28    </div>
29</div>
30
31<div class="row mb-3">
32    <label class="col-sm-3 col-form-label" for="filter">
33        <?= I18N::translate('Show only events of living individuals') ?>
34    </label>
35    <div class="col-sm-9">
36        <?= view('components/radios-inline', ['name' => 'filter', 'options' => [I18N::translate('no'), I18N::translate('yes')], 'selected' => (int) $filter]) ?>
37    </div>
38</div>
39
40<div class="row mb-3">
41    <label class="col-sm-3 col-form-label" for="events">
42        <?= I18N::translate('Events') ?>
43    </label>
44    <div class="col-sm-9">
45        <?= view('components/select', ['name' => 'events[]', 'id' => 'events', 'selected' => $event_array, 'options' => $all_events, 'class' => 'tom-select']) ?>
46    </div>
47</div>
48
49<div class="row mb-3">
50    <label class="col-sm-3 col-form-label" for="infoStyle">
51        <?= I18N::translate('Layout') ?>
52    </label>
53    <div class="col-sm-9">
54        <?= view('components/select', ['name' => 'infoStyle', 'selected' => $info_style, 'options' => $info_styles]) ?>
55    </div>
56</div>
57
58<div class="row mb-3">
59    <label class="col-sm-3 col-form-label" for="sortStyle">
60        <?= /* I18N: Label for a configuration option */ I18N::translate('Sort order') ?>
61    </label>
62    <div class="col-sm-9">
63        <?= view('components/select', ['name' => 'sortStyle', 'selected' => $sort_style, 'options' => $sort_styles]) ?>
64    </div>
65</div>
66