10c0910bfSGreg Roach<?php 2dd6b2bfcSGreg Roach 3*10e06497SGreg Roachdeclare(strict_types=1); 4*10e06497SGreg Roach 50c0910bfSGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\ControlPanel; 6fd6c003fSGreg Roachuse Fisharebest\Webtrees\Http\RequestHandlers\DeletePath; 70c0910bfSGreg Roachuse Fisharebest\Webtrees\I18N; 80c0910bfSGreg Roach 97c2c99faSGreg Roach/** 107c2c99faSGreg Roach * @var array<string> $entries 117c2c99faSGreg Roach * @var array<string> $protected 127c2c99faSGreg Roach * @var string $title 137c2c99faSGreg Roach */ 147c2c99faSGreg Roach 150c0910bfSGreg Roach?> 160c0910bfSGreg Roach 170c0910bfSGreg Roach<?= view('components/breadcrumbs', ['links' => [route(ControlPanel::class) => I18N::translate('Control panel'), $title]]) ?> 18dd6b2bfcSGreg Roach 19dd6b2bfcSGreg Roach<h1><?= $title ?></h1> 20dd6b2bfcSGreg Roach 21dd6b2bfcSGreg Roach<p> 22dd6b2bfcSGreg Roach <?= I18N::translate('Files marked with %s are required for proper operation and cannot be removed.', view('icons/ban')) ?> 23dd6b2bfcSGreg Roach</p> 24dd6b2bfcSGreg Roach 25dd6b2bfcSGreg Roach<form method="post"> 26dd6b2bfcSGreg Roach <input type="hidden" value="admin-clean-data"> 27dd6b2bfcSGreg Roach 28315eb316SGreg Roach <ul class="fa-ul mx-0"> 29fd6c003fSGreg Roach <?php foreach ($entries as $entry) : ?> 30fd6c003fSGreg Roach <li> 31fd6c003fSGreg Roach <?php if (substr_compare($entry, '/', -1) === 0) : ?> 32fd6c003fSGreg Roach <?= view('icons/folder') ?> 33fd6c003fSGreg Roach <?php else : ?> 34fd6c003fSGreg Roach <?= view('icons/file') ?> 35fd6c003fSGreg Roach <?php endif ?> 36fd6c003fSGreg Roach <?= e($entry) ?> 37fd6c003fSGreg Roach <?php if (in_array($entry, $protected, true)) : ?> 38fd6c003fSGreg Roach <?= view('icons/ban') ?> 39fd6c003fSGreg Roach <?php else : ?> 40c2ed51d1SGreg Roach <a 41c2ed51d1SGreg Roach href="#" 42d4786c66SGreg Roach data-wt-confirm="<?= I18N::translate('Are you sure you want to delete “%s”?', e($entry)) ?>" 43d4786c66SGreg Roach data-wt-post-url="<?= e(route(DeletePath::class, ['path' => $entry])) ?>" 44c2ed51d1SGreg Roach class="btn btn-sm btn-link" 45c2ed51d1SGreg Roach > 46dd6b2bfcSGreg Roach <?= view('icons/delete') ?> 4743546d3aSGreg Roach <span class="visually-hidden"><?= I18N::translate('delete') ?></span> 48fd6c003fSGreg Roach </a> 49fd6c003fSGreg Roach <?php endif ?> 50fd6c003fSGreg Roach </li> 51fd6c003fSGreg Roach <?php endforeach ?> 52fd6c003fSGreg Roach </ul> 5381443e3cSGreg Roach 5481443e3cSGreg Roach <?= csrf_field() ?> 55dd6b2bfcSGreg Roach</form> 56