xref: /webtrees/resources/views/admin/changes-log.phtml (revision 5197b5a12c19197e8a0e5f8a9c333129a968a4ca)
10c0910bfSGreg Roach<?php
2dd6b2bfcSGreg Roach
30c0910bfSGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\ControlPanel;
422e73debSGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\PendingChangesLogData;
522e73debSGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\PendingChangesLogDelete;
622e73debSGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\PendingChangesLogDownload;
757bfa969SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\PendingChangesLogPage;
80c0910bfSGreg Roachuse Fisharebest\Webtrees\I18N;
90c0910bfSGreg Roach
100c0910bfSGreg Roach?>
110c0910bfSGreg Roach
1222e73debSGreg Roach<?= view('components/breadcrumbs', ['links' => [route(ControlPanel::class) => I18N::translate('Control panel'), route('manage-trees', ['tree' => $tree->name()]) => I18N::translate('Manage family trees'), $title]]) ?>
13dd6b2bfcSGreg Roach
14dd6b2bfcSGreg Roach<h1><?= $title ?></h1>
15dd6b2bfcSGreg Roach
1622e73debSGreg Roach<form method="post" class="form" name="logs">
1722e73debSGreg Roach    <?= csrf_field() ?>
18dd6b2bfcSGreg Roach
19dd6b2bfcSGreg Roach    <div class="row">
20*5197b5a1SGreg Roach        <div class="form-group col-sm-6 col-md-3">
21dd6b2bfcSGreg Roach            <label for="from">
22f80607a6SGreg Roach                <?= I18N::translateContext('Start of date range', 'From') ?>
23dd6b2bfcSGreg Roach            </label>
24dd6b2bfcSGreg Roach            <input type="date" class="form-control" id="from" max="<?= e($latest) ?>" min="<?= e($earliest) ?>" name="from" value="<?= e($from) ?>" required>
25dd6b2bfcSGreg Roach        </div>
26dd6b2bfcSGreg Roach
27*5197b5a1SGreg Roach        <div class="form-group col-sm-6 col-md-3">
28dd6b2bfcSGreg Roach            <label for="to">
29f80607a6SGreg Roach                <?= I18N::translateContext('End of date range', 'To') ?>
30dd6b2bfcSGreg Roach            </label>
31dd6b2bfcSGreg Roach            <input type="date" class="form-control" id="to" max="<?= e($latest) ?>" min="<?= e($earliest) ?>"  name="to" value="<?= e($to) ?>" required>
32dd6b2bfcSGreg Roach        </div>
33dd6b2bfcSGreg Roach
34*5197b5a1SGreg Roach        <div class="form-group col-sm-6 col-md-3">
35dd6b2bfcSGreg Roach            <label for="type">
36dd6b2bfcSGreg Roach                <?= I18N::translate('Status') ?>
37dd6b2bfcSGreg Roach            </label>
38c9e11c2aSGreg Roach            <?= view('components/select', ['name' => 'type', 'selected' => $type, 'options' => $statuses]) ?>
39dd6b2bfcSGreg Roach        </div>
40dd6b2bfcSGreg Roach
41*5197b5a1SGreg Roach        <div class="form-group col-sm-6 col-md-3">
42dd6b2bfcSGreg Roach            <label for="xref">
43dd6b2bfcSGreg Roach                <?= I18N::translate('Record') ?>
44dd6b2bfcSGreg Roach            </label>
45dd6b2bfcSGreg Roach            <input class="form-control" type="text" id="xref" name="xref" value="<?= e($xref) ?>">
46dd6b2bfcSGreg Roach        </div>
47dd6b2bfcSGreg Roach    </div>
48dd6b2bfcSGreg Roach
49dd6b2bfcSGreg Roach    <div class="row">
50*5197b5a1SGreg Roach        <div class="form-group col-sm-6 col-md-3">
51dd6b2bfcSGreg Roach            <label for="oldged">
52dd6b2bfcSGreg Roach                <?= I18N::translate('Old data') ?>
53dd6b2bfcSGreg Roach            </label>
54dd6b2bfcSGreg Roach            <input class="form-control" type="text" id="oldged" name="oldged" value="<?= e($oldged) ?>">
55dd6b2bfcSGreg Roach        </div>
56dd6b2bfcSGreg Roach
57*5197b5a1SGreg Roach        <div class="form-group col-sm-6 col-md-3">
58dd6b2bfcSGreg Roach            <label for="newged">
59dd6b2bfcSGreg Roach                <?= I18N::translate('New data') ?>
60dd6b2bfcSGreg Roach            </label>
61dd6b2bfcSGreg Roach            <input class="form-control" type="text" id="newged" name="newged" value="<?= e($newged) ?>">
62dd6b2bfcSGreg Roach        </div>
63dd6b2bfcSGreg Roach
64*5197b5a1SGreg Roach        <div class="form-group col-sm-6 col-md-3">
65dd6b2bfcSGreg Roach            <label for="username">
66dd6b2bfcSGreg Roach                <?= I18N::translate('User') ?>
67dd6b2bfcSGreg Roach            </label>
6822e73debSGreg Roach            <?= view('components/select', ['name' => 'username', 'selected' => $username, 'options' => $users]) ?>
69dd6b2bfcSGreg Roach        </div>
70dd6b2bfcSGreg Roach
71*5197b5a1SGreg Roach        <div class="form-group col-sm-6 col-md-3">
729022ab66SGreg Roach            <label for="tree">
73dd6b2bfcSGreg Roach                <?= I18N::translate('Family tree') ?>
74dd6b2bfcSGreg Roach            </label>
7522e73debSGreg Roach            <?= view('components/select', ['name' => 'tree', 'selected' => $tree->name(), 'options' => $trees]) ?>
76dd6b2bfcSGreg Roach        </div>
77dd6b2bfcSGreg Roach    </div>
78dd6b2bfcSGreg Roach
79dd6b2bfcSGreg Roach    <div class="text-center">
80dd6b2bfcSGreg Roach        <button type="submit" class="btn btn-primary">
81dd6b2bfcSGreg Roach            <?= view('icons/search') ?>
82dd6b2bfcSGreg Roach            <?= I18N::translate('search') ?>
83dd6b2bfcSGreg Roach        </button>
84dd6b2bfcSGreg Roach
8557bfa969SGreg Roach        <a href="<?= e(route(PendingChangesLogPage::class, ['tree' => $tree->name()])) ?>" type="submit" class="btn btn-secondary">
8657bfa969SGreg Roach            <?= view('icons/cancel') ?>
8757bfa969SGreg Roach            <?= /* I18N: A button label. */ I18N::translate('reset') ?>
8857bfa969SGreg Roach        </a>
8922e73debSGreg Roach        <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])) ?>">
90dd6b2bfcSGreg Roach            <?= view('icons/download') ?>
91dd6b2bfcSGreg Roach            <?= /* I18N: A button label. */ I18N::translate('download') ?>
9222e73debSGreg Roach        </a>
93dd6b2bfcSGreg Roach
9422e73debSGreg Roach        <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])) ?>">
95dd6b2bfcSGreg Roach        <?= view('icons/delete') ?>
96dd6b2bfcSGreg Roach            <?= I18N::translate('delete') ?>
9722e73debSGreg Roach        </a>
98dd6b2bfcSGreg Roach    </div>
99dd6b2bfcSGreg Roach</form>
100dd6b2bfcSGreg Roach
101dd6b2bfcSGreg Roach<table
102dd6b2bfcSGreg Roach    class="table table-bordered table-sm table-hover table-site-changes datatables"
10322e73debSGreg Roach    data-ajax="<?= route(PendingChangesLogData::class, ['from' => $from, 'to' => $to, 'type' => $type, 'xref' => $xref, 'oldged' => $oldged, 'newged' => $newged, 'tree' => $tree->name(), 'username' => $username]) ?>"
104dd6b2bfcSGreg Roach    data-server-side="true"
105dd6b2bfcSGreg Roach    data-sorting="<?= e('[[ 0, "desc" ]]') ?>"
106dd6b2bfcSGreg Roach>
107dd6b2bfcSGreg Roach    <caption class="sr-only">
108dd6b2bfcSGreg Roach        <?= $title ?>
109dd6b2bfcSGreg Roach    </caption>
11022e73debSGreg Roach
111dd6b2bfcSGreg Roach    <thead>
112dd6b2bfcSGreg Roach        <tr>
113dd6b2bfcSGreg Roach            <th data-visible="false"></th>
114dd6b2bfcSGreg Roach            <th><?= I18N::translate('Timestamp') ?></th>
115dd6b2bfcSGreg Roach            <th><?= I18N::translate('Status') ?></th>
116dd6b2bfcSGreg Roach            <th><?= I18N::translate('Record') ?></th>
117dd6b2bfcSGreg Roach            <th data-sortable="false"><?= I18N::translate('Data') ?></th>
118dd6b2bfcSGreg Roach            <th><?= I18N::translate('User') ?></th>
119dd6b2bfcSGreg Roach            <th><?= I18N::translate('Family tree') ?></th>
120dd6b2bfcSGreg Roach        </tr>
121dd6b2bfcSGreg Roach    </thead>
122dd6b2bfcSGreg Roach</table>
123