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