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