xref: /webtrees/resources/views/admin/changes-log.phtml (revision 315eb31683006273e24c08b447e6e1095d6f2147)
10c0910bfSGreg Roach<?php
2dd6b2bfcSGreg Roach
30c0910bfSGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\ControlPanel;
46fd01894SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\ManageTrees;
522e73debSGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\PendingChangesLogData;
622e73debSGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\PendingChangesLogDelete;
722e73debSGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\PendingChangesLogDownload;
857bfa969SGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\PendingChangesLogPage;
90c0910bfSGreg Roachuse Fisharebest\Webtrees\I18N;
107c2c99faSGreg Roachuse Fisharebest\Webtrees\Tree;
117c2c99faSGreg Roach
127c2c99faSGreg Roach/**
137c2c99faSGreg Roach * @var string               $earliest
147c2c99faSGreg Roach * @var string               $from
157c2c99faSGreg Roach * @var string               $latest
167c2c99faSGreg Roach * @var array<string,string> $statuses
177c2c99faSGreg Roach * @var string               $newged
187c2c99faSGreg Roach * @var string               $oldged
197c2c99faSGreg Roach * @var string               $title
207c2c99faSGreg Roach * @var string               $to
217c2c99faSGreg Roach * @var Tree                 $tree
227c2c99faSGreg Roach * @var array<string,string> $trees
237c2c99faSGreg Roach * @var string               $type
247c2c99faSGreg Roach * @var string               $username
257c2c99faSGreg Roach * @var array<string,string> $users
267c2c99faSGreg Roach * @var string               $xref
277c2c99faSGreg Roach */
280c0910bfSGreg Roach
290c0910bfSGreg Roach?>
300c0910bfSGreg Roach
316fd01894SGreg Roach<?= view('components/breadcrumbs', ['links' => [route(ControlPanel::class) => I18N::translate('Control panel'), route(ManageTrees::class, ['tree' => $tree->name()]) => I18N::translate('Manage family trees'), $title]]) ?>
32dd6b2bfcSGreg Roach
33dd6b2bfcSGreg Roach<h1><?= $title ?></h1>
34dd6b2bfcSGreg Roach
3522e73debSGreg Roach<form method="post" class="form" name="logs">
3622e73debSGreg Roach    <?= csrf_field() ?>
37dd6b2bfcSGreg Roach
38dd6b2bfcSGreg Roach    <div class="row">
395197b5a1SGreg Roach        <div class="form-group col-sm-6 col-md-3">
40dd6b2bfcSGreg Roach            <label for="from">
41f80607a6SGreg Roach                <?= I18N::translateContext('Start of date range', 'From') ?>
42dd6b2bfcSGreg Roach            </label>
437dca5265SGreg Roach            <input type="date" class="form-control" id="from" max="<?= e($latest) ?>" min="<?= e($earliest) ?>" name="from" value="<?= e($from) ?>" required="required">
44dd6b2bfcSGreg Roach        </div>
45dd6b2bfcSGreg Roach
465197b5a1SGreg Roach        <div class="form-group col-sm-6 col-md-3">
47dd6b2bfcSGreg Roach            <label for="to">
48f80607a6SGreg Roach                <?= I18N::translateContext('End of date range', 'To') ?>
49dd6b2bfcSGreg Roach            </label>
507dca5265SGreg Roach            <input type="date" class="form-control" id="to" max="<?= e($latest) ?>" min="<?= e($earliest) ?>"  name="to" value="<?= e($to) ?>" required="required">
51dd6b2bfcSGreg Roach        </div>
52dd6b2bfcSGreg Roach
535197b5a1SGreg Roach        <div class="form-group col-sm-6 col-md-3">
54dd6b2bfcSGreg Roach            <label for="type">
55dd6b2bfcSGreg Roach                <?= I18N::translate('Status') ?>
56dd6b2bfcSGreg Roach            </label>
57c9e11c2aSGreg Roach            <?= view('components/select', ['name' => 'type', 'selected' => $type, 'options' => $statuses]) ?>
58dd6b2bfcSGreg Roach        </div>
59dd6b2bfcSGreg Roach
605197b5a1SGreg Roach        <div class="form-group col-sm-6 col-md-3">
61dd6b2bfcSGreg Roach            <label for="xref">
62dd6b2bfcSGreg Roach                <?= I18N::translate('Record') ?>
63dd6b2bfcSGreg Roach            </label>
64dd6b2bfcSGreg Roach            <input class="form-control" type="text" id="xref" name="xref" value="<?= e($xref) ?>">
65dd6b2bfcSGreg Roach        </div>
66dd6b2bfcSGreg Roach    </div>
67dd6b2bfcSGreg Roach
68dd6b2bfcSGreg Roach    <div class="row">
695197b5a1SGreg Roach        <div class="form-group col-sm-6 col-md-3">
70dd6b2bfcSGreg Roach            <label for="oldged">
71dd6b2bfcSGreg Roach                <?= I18N::translate('Old data') ?>
72dd6b2bfcSGreg Roach            </label>
73dd6b2bfcSGreg Roach            <input class="form-control" type="text" id="oldged" name="oldged" value="<?= e($oldged) ?>">
74dd6b2bfcSGreg Roach        </div>
75dd6b2bfcSGreg Roach
765197b5a1SGreg Roach        <div class="form-group col-sm-6 col-md-3">
77dd6b2bfcSGreg Roach            <label for="newged">
78dd6b2bfcSGreg Roach                <?= I18N::translate('New data') ?>
79dd6b2bfcSGreg Roach            </label>
80dd6b2bfcSGreg Roach            <input class="form-control" type="text" id="newged" name="newged" value="<?= e($newged) ?>">
81dd6b2bfcSGreg Roach        </div>
82dd6b2bfcSGreg Roach
835197b5a1SGreg Roach        <div class="form-group col-sm-6 col-md-3">
84dd6b2bfcSGreg Roach            <label for="username">
85dd6b2bfcSGreg Roach                <?= I18N::translate('User') ?>
86dd6b2bfcSGreg Roach            </label>
8722e73debSGreg Roach            <?= view('components/select', ['name' => 'username', 'selected' => $username, 'options' => $users]) ?>
88dd6b2bfcSGreg Roach        </div>
89dd6b2bfcSGreg Roach
905197b5a1SGreg Roach        <div class="form-group col-sm-6 col-md-3">
919022ab66SGreg Roach            <label for="tree">
92dd6b2bfcSGreg Roach                <?= I18N::translate('Family tree') ?>
93dd6b2bfcSGreg Roach            </label>
9422e73debSGreg Roach            <?= view('components/select', ['name' => 'tree', 'selected' => $tree->name(), 'options' => $trees]) ?>
95dd6b2bfcSGreg Roach        </div>
96dd6b2bfcSGreg Roach    </div>
97dd6b2bfcSGreg Roach
98dd6b2bfcSGreg Roach    <div class="text-center">
99dd6b2bfcSGreg Roach        <button type="submit" class="btn btn-primary">
100dd6b2bfcSGreg Roach            <?= view('icons/search') ?>
101dd6b2bfcSGreg Roach            <?= I18N::translate('search') ?>
102dd6b2bfcSGreg Roach        </button>
103dd6b2bfcSGreg Roach
10457bfa969SGreg Roach        <a href="<?= e(route(PendingChangesLogPage::class, ['tree' => $tree->name()])) ?>" type="submit" class="btn btn-secondary">
10557bfa969SGreg Roach            <?= view('icons/cancel') ?>
10657bfa969SGreg Roach            <?= /* I18N: A button label. */ I18N::translate('reset') ?>
10757bfa969SGreg Roach        </a>
10822e73debSGreg 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])) ?>">
109dd6b2bfcSGreg Roach            <?= view('icons/download') ?>
110dd6b2bfcSGreg Roach            <?= /* I18N: A button label. */ I18N::translate('download') ?>
11122e73debSGreg Roach        </a>
112dd6b2bfcSGreg Roach
11322e73debSGreg 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])) ?>">
114dd6b2bfcSGreg Roach        <?= view('icons/delete') ?>
115dd6b2bfcSGreg Roach            <?= I18N::translate('delete') ?>
11622e73debSGreg Roach        </a>
117dd6b2bfcSGreg Roach    </div>
118dd6b2bfcSGreg Roach</form>
119dd6b2bfcSGreg Roach
120dd6b2bfcSGreg Roach<table
121b4139381SGreg Roach    class="table table-bordered table-sm table-hover table-site-changes datatables d-none"
122b4139381SGreg Roach    <?= view('lists/datatables-attributes') ?>
12322e73debSGreg Roach    data-ajax="<?= route(PendingChangesLogData::class, ['from' => $from, 'to' => $to, 'type' => $type, 'xref' => $xref, 'oldged' => $oldged, 'newged' => $newged, 'tree' => $tree->name(), 'username' => $username]) ?>"
124dd6b2bfcSGreg Roach    data-server-side="true"
125dd6b2bfcSGreg Roach    data-sorting="<?= e('[[ 0, "desc" ]]') ?>"
126dd6b2bfcSGreg Roach>
127*315eb316SGreg Roach    <caption class="visually-hidden">
128dd6b2bfcSGreg Roach        <?= $title ?>
129dd6b2bfcSGreg Roach    </caption>
13022e73debSGreg Roach
131dd6b2bfcSGreg Roach    <thead>
132dd6b2bfcSGreg Roach        <tr>
133dd6b2bfcSGreg Roach            <th data-visible="false"></th>
134dd6b2bfcSGreg Roach            <th><?= I18N::translate('Timestamp') ?></th>
135dd6b2bfcSGreg Roach            <th><?= I18N::translate('Status') ?></th>
136dd6b2bfcSGreg Roach            <th><?= I18N::translate('Record') ?></th>
137dd6b2bfcSGreg Roach            <th data-sortable="false"><?= I18N::translate('Data') ?></th>
138dd6b2bfcSGreg Roach            <th><?= I18N::translate('User') ?></th>
139dd6b2bfcSGreg Roach            <th><?= I18N::translate('Family tree') ?></th>
140dd6b2bfcSGreg Roach        </tr>
141dd6b2bfcSGreg Roach    </thead>
142dd6b2bfcSGreg Roach</table>
143