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 <?= csrf_field() ?> 37 38 <div class="row"> 39 <div class="form-group col-sm-6 col-md-3"> 40 <label for="from"> 41 <?= I18N::translateContext('Start of date range', 'From') ?> 42 </label> 43 <input type="date" class="form-control" id="from" max="<?= e($latest) ?>" min="<?= e($earliest) ?>" name="from" value="<?= e($from) ?>" required="required"> 44 </div> 45 46 <div class="form-group col-sm-6 col-md-3"> 47 <label for="to"> 48 <?= I18N::translateContext('End of date range', 'To') ?> 49 </label> 50 <input type="date" class="form-control" id="to" max="<?= e($latest) ?>" min="<?= e($earliest) ?>" name="to" value="<?= e($to) ?>" required="required"> 51 </div> 52 53 <div class="form-group col-sm-6 col-md-3"> 54 <label for="type"> 55 <?= I18N::translate('Status') ?> 56 </label> 57 <?= view('components/select', ['name' => 'type', 'selected' => $type, 'options' => $statuses]) ?> 58 </div> 59 60 <div class="form-group col-sm-6 col-md-3"> 61 <label for="xref"> 62 <?= I18N::translate('Record') ?> 63 </label> 64 <input class="form-control" type="text" id="xref" name="xref" value="<?= e($xref) ?>"> 65 </div> 66 </div> 67 68 <div class="row"> 69 <div class="form-group col-sm-6 col-md-3"> 70 <label for="oldged"> 71 <?= I18N::translate('Old data') ?> 72 </label> 73 <input class="form-control" type="text" id="oldged" name="oldged" value="<?= e($oldged) ?>"> 74 </div> 75 76 <div class="form-group col-sm-6 col-md-3"> 77 <label for="newged"> 78 <?= I18N::translate('New data') ?> 79 </label> 80 <input class="form-control" type="text" id="newged" name="newged" value="<?= e($newged) ?>"> 81 </div> 82 83 <div class="form-group col-sm-6 col-md-3"> 84 <label for="username"> 85 <?= I18N::translate('User') ?> 86 </label> 87 <?= view('components/select', ['name' => 'username', 'selected' => $username, 'options' => $users]) ?> 88 </div> 89 90 <div class="form-group col-sm-6 col-md-3"> 91 <label for="tree"> 92 <?= I18N::translate('Family tree') ?> 93 </label> 94 <?= view('components/select', ['name' => 'tree', 'selected' => $tree->name(), 'options' => $trees]) ?> 95 </div> 96 </div> 97 98 <div class="text-center"> 99 <button type="submit" class="btn btn-primary"> 100 <?= view('icons/search') ?> 101 <?= I18N::translate('search') ?> 102 </button> 103 104 <a href="<?= e(route(PendingChangesLogPage::class, ['tree' => $tree->name()])) ?>" type="submit" class="btn btn-secondary"> 105 <?= view('icons/cancel') ?> 106 <?= /* I18N: A button label. */ I18N::translate('reset') ?> 107 </a> 108 <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])) ?>"> 109 <?= view('icons/download') ?> 110 <?= /* I18N: A button label. */ I18N::translate('download') ?> 111 </a> 112 113 <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])) ?>"> 114 <?= view('icons/delete') ?> 115 <?= I18N::translate('delete') ?> 116 </a> 117 </div> 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