xref: /webtrees/resources/views/admin/changes-log.phtml (revision 150f35ad305455c4048b1a46fd58875614272023)
1<?php
2
3use Fisharebest\Webtrees\Http\RequestHandlers\ControlPanel;
4use Fisharebest\Webtrees\Http\RequestHandlers\PendingChangesLogData;
5use Fisharebest\Webtrees\Http\RequestHandlers\PendingChangesLogDelete;
6use Fisharebest\Webtrees\Http\RequestHandlers\PendingChangesLogDownload;
7use Fisharebest\Webtrees\Http\RequestHandlers\PendingChangesLogPage;
8use Fisharebest\Webtrees\I18N;
9
10?>
11
12<?= view('components/breadcrumbs', ['links' => [route(ControlPanel::class) => I18N::translate('Control panel'), route('manage-trees', ['tree' => $tree->name()]) => I18N::translate('Manage family trees'), $title]]) ?>
13
14<h1><?= $title ?></h1>
15
16<form method="post" class="form" name="logs">
17    <?= csrf_field() ?>
18
19    <div class="row">
20        <div class="form-group col-xs-6 col-md-3">
21            <label for="from">
22                <?= I18N::translateContext('Start of date range', 'From') ?>
23            </label>
24            <input type="date" class="form-control" id="from" max="<?= e($latest) ?>" min="<?= e($earliest) ?>" name="from" value="<?= e($from) ?>" required>
25        </div>
26
27        <div class="form-group col-xs-6 col-md-3">
28            <label for="to">
29                <?= I18N::translateContext('End of date range', 'To') ?>
30            </label>
31            <input type="date" class="form-control" id="to" max="<?= e($latest) ?>" min="<?= e($earliest) ?>"  name="to" value="<?= e($to) ?>" required>
32        </div>
33
34        <div class="form-group col-xs-6 col-md-3">
35            <label for="type">
36                <?= I18N::translate('Status') ?>
37            </label>
38            <?= view('components/select', ['name' => 'type', 'selected' => $type, 'options' => $statuses]) ?>
39        </div>
40
41        <div class="form-group col-xs-6 col-md-3">
42            <label for="xref">
43                <?= I18N::translate('Record') ?>
44            </label>
45            <input class="form-control" type="text" id="xref" name="xref" value="<?= e($xref) ?>">
46        </div>
47    </div>
48
49    <div class="row">
50        <div class="form-group col-xs-6 col-md-3">
51            <label for="oldged">
52                <?= I18N::translate('Old data') ?>
53            </label>
54            <input class="form-control" type="text" id="oldged" name="oldged" value="<?= e($oldged) ?>">
55        </div>
56
57        <div class="form-group col-xs-6 col-md-3">
58            <label for="newged">
59                <?= I18N::translate('New data') ?>
60            </label>
61            <input class="form-control" type="text" id="newged" name="newged" value="<?= e($newged) ?>">
62        </div>
63
64        <div class="form-group col-xs-6 col-md-3">
65            <label for="username">
66                <?= I18N::translate('User') ?>
67            </label>
68            <?= view('components/select', ['name' => 'username', 'selected' => $username, 'options' => $users]) ?>
69        </div>
70
71        <div class="form-group col-xs-6 col-md-3">
72            <label for="tree">
73                <?= I18N::translate('Family tree') ?>
74            </label>
75            <?= view('components/select', ['name' => 'tree', 'selected' => $tree->name(), 'options' => $trees]) ?>
76        </div>
77    </div>
78
79    <div class="text-center">
80        <button type="submit" class="btn btn-primary">
81            <?= view('icons/search') ?>
82            <?= I18N::translate('search') ?>
83        </button>
84
85        <a href="<?= e(route(PendingChangesLogPage::class, ['tree' => $tree->name()])) ?>" type="submit" class="btn btn-secondary">
86            <?= view('icons/cancel') ?>
87            <?= /* I18N: A button label. */ I18N::translate('reset') ?>
88        </a>
89        <a class="btn btn-secondary" href="<?= (route(PendingChangesLogDownload::class, ['from' => $from, 'to' => $to, 'type' => $type, 'xref' => $xref, 'oldged' => $oldged, 'newged' => $newged, 'tree' => $tree->name(), 'username' => $username])) ?>">
90            <?= view('icons/download') ?>
91            <?= /* I18N: A button label. */ I18N::translate('download') ?>
92        </a>
93
94        <a href="#" class="btn btn-danger" data-confirm="<?= I18N::translate('Permanently delete these records?') ?>" data-post-url="<?= (route(PendingChangesLogDelete::class, ['from' => $from, 'to' => $to, 'type' => $type, 'xref' => $xref, 'oldged' => $oldged, 'newged' => $newged, 'tree' => $tree->name(), 'username' => $username])) ?>">
95        <?= view('icons/delete') ?>
96            <?= I18N::translate('delete') ?>
97        </a>
98    </div>
99</form>
100
101<table
102    class="table table-bordered table-sm table-hover table-site-changes datatables"
103    data-ajax="<?= route(PendingChangesLogData::class, ['from' => $from, 'to' => $to, 'type' => $type, 'xref' => $xref, 'oldged' => $oldged, 'newged' => $newged, 'tree' => $tree->name(), 'username' => $username]) ?>"
104    data-server-side="true"
105    data-sorting="<?= e('[[ 0, "desc" ]]') ?>"
106>
107    <caption class="sr-only">
108        <?= $title ?>
109    </caption>
110
111    <thead>
112        <tr>
113            <th data-visible="false"></th>
114            <th><?= I18N::translate('Timestamp') ?></th>
115            <th><?= I18N::translate('Status') ?></th>
116            <th><?= I18N::translate('Record') ?></th>
117            <th data-sortable="false"><?= I18N::translate('Data') ?></th>
118            <th><?= I18N::translate('User') ?></th>
119            <th><?= I18N::translate('Family tree') ?></th>
120        </tr>
121    </thead>
122</table>
123