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