From 5bbf633295d77fd1d8310fb24b8e9b4cd703d9f2 Mon Sep 17 00:00:00 2001 From: Pontoporeia Date: Tue, 19 May 2026 19:26:58 +0200 Subject: [PATCH] =?UTF-8?q?Contenus:=20add=20Mots-cl=C3=A9s=20fieldset=20m?= =?UTF-8?q?irroring=20Langues,=20keep=20dedicated=20page=20button=20as=20b?= =?UTF-8?q?ackup,=20add=20Annuler=20cancel=20button=20to=20both=20bulk=20a?= =?UTF-8?q?ction=20bars,=20limit=20both=20table=20wraps=20to=20max-height:?= =?UTF-8?q?50vh=20with=20overflow=20scroll?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- TODO.md | 17 ++ .../admin/contenus-langues-fragment.php | 4 + .../admin/contenus-motscles-fragment.php | 93 ++++++++++ app/storage/logs/admin.log | 1 + app/templates/admin/contenus.php | 167 +++++++++++++++++- 5 files changed, 279 insertions(+), 3 deletions(-) create mode 100644 app/public/admin/contenus-motscles-fragment.php diff --git a/TODO.md b/TODO.md index 698d78f..a62136c 100644 --- a/TODO.md +++ b/TODO.md @@ -1,5 +1,13 @@ # Current tasks +## Mots-clés fieldset in contenus +- [x] Create contenus-motscles-fragment.php (tags fragment mirroring langues) +- [x] Add Mots-clés fieldset to contenus template (search + table + bulk actions) +- [x] Keep button linking to dedicated tags.php page as backup +- [x] Add "Annuler" cancel button to both langues and mots-clés bulk action bars +- [x] Add max-height:50vh + overflow-y:auto to both table wraps +- [ ] Deploy: just deploy + ## Tmp file cleanup (stale filepond + _trash) - [x] Session-based detection: check manifest session_id against PHP session files - [x] DB-based detection for _trash: check thesis_files row still exists @@ -10,6 +18,15 @@ - [x] .gitignore: exclude tmp/filepond/* and tmp/_trash/* - [ ] Deploy: just deploy +## Index page improvements +- [x] Remove 'Mots-clés' button from toolbar +- [x] Move export to bulk selection bar (Exporter CSV + Exporter fichiers buttons) +- [x] Export dispatcher accepts ?ids= for per-selection filtering +- [x] All ExportController/Database export methods accept optional thesisIds +- [x] Graceful error when ZipArchive extension missing (php8.4-zip not installed) +- [x] Move DB export (SQLite download) to paramètres → Maintenance section +- [x] Sticky thead on index table (position: sticky, top: 0, z-index: 5) + ## Dialog & trash page margins - [x] Add admin-dialog__body CSS rule with padding + margin resets - [x] Add admin-dialog__stats + admin-dialog__hint classes diff --git a/app/public/admin/contenus-langues-fragment.php b/app/public/admin/contenus-langues-fragment.php index b97f107..becad46 100644 --- a/app/public/admin/contenus-langues-fragment.php +++ b/app/public/admin/contenus-langues-fragment.php @@ -27,6 +27,10 @@ try { + +
+ + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
NomTFE AssociéActions
Aucun mot-clé trouvé.
+ + + +
+
+ + + + + +
+
+
diff --git a/app/storage/logs/admin.log b/app/storage/logs/admin.log index eae5b6d..db5b7f2 100644 --- a/app/storage/logs/admin.log +++ b/app/storage/logs/admin.log @@ -364,3 +364,4 @@ {"timestamp":"2026-05-18T15:20:07+00:00","ip":"127.0.0.1","user_agent":"Mozilla/5.0 (X11; Linux x86_64; rv:150.0) Gecko/20100101 Firefox/150.0","resource":"thesis","action":"edit","status":"success","context":{"thesis_id":1263,"title":"Pourquoi les artistes sont-ils encore sur Instagram alors que j’ai vu une story disant qu’il fallait quitter META"}} {"timestamp":"2026-05-19T14:39:37+00:00","ip":"127.0.0.1","user_agent":"Mozilla/5.0 (X11; Linux x86_64; rv:150.0) Gecko/20100101 Firefox/150.0","resource":"share_link","action":"deactivate","status":"success","context":{"link_id":213}} {"timestamp":"2026-05-19T14:39:39+00:00","ip":"127.0.0.1","user_agent":"Mozilla/5.0 (X11; Linux x86_64; rv:150.0) Gecko/20100101 Firefox/150.0","resource":"share_link","action":"activate","status":"success","context":{"link_id":213}} +{"timestamp":"2026-05-19T17:19:51+00:00","ip":"127.0.0.1","user_agent":"Mozilla/5.0 (X11; Linux x86_64; rv:150.0) Gecko/20100101 Firefox/150.0","resource":"system","action":"files_export","status":"success","context":{"file_count":6,"byte_size":11871654}} diff --git a/app/templates/admin/contenus.php b/app/templates/admin/contenus.php index 4b64efd..d814704 100644 --- a/app/templates/admin/contenus.php +++ b/app/templates/admin/contenus.php @@ -53,8 +53,6 @@

Données Secondaires

-

Gérer les mots-clés

-
Langues @@ -71,7 +69,34 @@
+ hx-swap="innerHTML" + style="max-height:50vh;overflow-y:auto"> +
+ Chargement… +
+
+
+ +

Gérer les mots-clés (page dédiée)

+ +
+ Mots-clés + +
+ +
+ +
Chargement…
@@ -349,6 +374,11 @@ function languesUpdateBulk() { document.getElementById('langues-bulk-actions').style.display = n > 1 ? 'flex' : 'none'; } +function languesCancelSelection() { + document.querySelectorAll('input[name="selected_langs[]"]').forEach(cb => cb.checked = false); + languesUpdateBulk(); +} + function languesConfirmBulkMerge() { const checked = document.querySelectorAll('input[name="selected_langs[]"]:checked'); if (checked.length < 2) return; @@ -387,6 +417,137 @@ document.addEventListener('htmx:afterSwap', function(evt) { }); + + + +
+

Supprimer le mot-clé

+ +
+
+

Supprimer «  » ? Cette action est irréversible.

+
+ +
+ + +
+

Fusionner des mots-clés

+ +
+
+

Fusionner mot(s)-clé(s) sélectionné(s) dans :

+ +
+ +
+ + +