xref: /webtrees/resources/views/admin/changes-log.phtml (revision b4139381fec9e3c79aec94d8de1067021b1a8c0d)
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-sm-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-sm-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-sm-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-sm-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-sm-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-sm-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-sm-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-sm-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 d-none"
103    <?= view('lists/datatables-attributes') ?>
104    data-ajax="<?= route(PendingChangesLogData::class, ['from' => $from, 'to' => $to, 'type' => $type, 'xref' => $xref, 'oldged' => $oldged, 'newged' => $newged, 'tree' => $tree->name(), 'username' => $username]) ?>"
105    data-server-side="true"
106    data-sorting="<?= e('[[ 0, "desc" ]]') ?>"
107>
108    <caption class="sr-only">
109        <?= $title ?>
110    </caption>
111
112    <thead>
113        <tr>
114            <th data-visible="false"></th>
115            <th><?= I18N::translate('Timestamp') ?></th>
116            <th><?= I18N::translate('Status') ?></th>
117            <th><?= I18N::translate('Record') ?></th>
118            <th data-sortable="false"><?= I18N::translate('Data') ?></th>
119            <th><?= I18N::translate('User') ?></th>
120            <th><?= I18N::translate('Family tree') ?></th>
121        </tr>
122    </thead>
123</table>
124