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