diff --git a/TODO.md b/TODO.md index 97b907a..0102870 100644 --- a/TODO.md +++ b/TODO.md @@ -104,6 +104,7 @@ # Current tasks +- [x] Sticky thead: fix with border-collapse:separate, CSS class, --sticky-top var, +min-height:50vh on wrappers, +bulk delete for mots-clés - [x] Edit submit redirects to recapitulatif instead of staying on edit.php - [x] Mandatory auto-generated passwords on share links (no custom passwords, regenerate-only in edit, rate limit on password gate) - [x] .gitignore / .ignore: exclude *.db-wal and *.db-shm diff --git a/app/public/admin/actions/language.php b/app/public/admin/actions/language.php index 0f4126d..0989d9c 100644 --- a/app/public/admin/actions/language.php +++ b/app/public/admin/actions/language.php @@ -54,6 +54,16 @@ try { $db->deleteLanguage($id); break; + case 'delete_bulk': + $sourceIds = isset($_POST['selected_langs']) && is_array($_POST['selected_langs']) + ? array_map('intval', $_POST['selected_langs']) + : []; + if (empty($sourceIds)) throw new Exception("Aucune langue sélectionnée."); + foreach ($sourceIds as $sid) { + $db->deleteLanguage($sid); + } + break; + default: throw new Exception("Action inconnue."); } diff --git a/app/public/admin/actions/tag.php b/app/public/admin/actions/tag.php index bb091e6..efe3a7d 100644 --- a/app/public/admin/actions/tag.php +++ b/app/public/admin/actions/tag.php @@ -58,6 +58,17 @@ try { $logger->logTagAction('delete', ['tag_id' => $id]); break; + case 'delete_bulk': + $sourceIds = isset($_POST['selected_tags']) && is_array($_POST['selected_tags']) + ? array_map('intval', $_POST['selected_tags']) + : []; + if (empty($sourceIds)) throw new Exception("Aucun mot-clé sélectionné."); + foreach ($sourceIds as $sid) { + $db->deleteTag($sid); + $logger->logTagAction('delete', ['tag_id' => $sid]); + } + break; + default: throw new Exception("Action inconnue."); } diff --git a/app/public/admin/contenus-langues-fragment.php b/app/public/admin/contenus-langues-fragment.php index becad46..bc3706c 100644 --- a/app/public/admin/contenus-langues-fragment.php +++ b/app/public/admin/contenus-langues-fragment.php @@ -24,13 +24,19 @@ try { die('
Erreur : ' . htmlspecialchars($e->getMessage()) . '
'); } ?> -