xref: /webtrees/resources/views/admin/clean-data.phtml (revision 0c0910bf0f275a14f35d2ccdf698f91f79e269d4)
1<?php
2
3use Fisharebest\Webtrees\Http\RequestHandlers\ControlPanel;
4use Fisharebest\Webtrees\I18N;
5
6?>
7
8<?= view('components/breadcrumbs', ['links' => [route(ControlPanel::class) => I18N::translate('Control panel'), $title]]) ?>
9
10<h1><?= $title ?></h1>
11
12<p>
13    <?= I18N::translate('Files marked with %s are required for proper operation and cannot be removed.', view('icons/ban')) ?>
14</p>
15
16<form method="post">
17    <input type="hidden" value="admin-clean-data">
18    <?= csrf_field() ?>
19    <ul class="fa-ul">
20        <?php
21        foreach ($entries as $entry) {
22            if (in_array($entry, $protected, true)) {
23                echo '<li><span class="fa-li">' . view('icons/ban') . '</span>', e($entry), '</li>';
24            } else {
25                echo '<li><span class="fa-li">' . view('icons/delete') . '</span>';
26                echo '<label>';
27                echo '<input type="checkbox" name="to_delete[]" value="', e($entry), '"> ';
28                echo e($entry);
29                echo '</label></li>';
30            }
31        }
32        ?>
33    </ul>
34
35    <button class="btn btn-danger" type="submit">
36        <?= view('icons/delete') ?>
37        <?= /* I18N: A button label. */ I18N::translate('delete') ?>
38    </button>
39</form>
40