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