diff --git a/TODO.md b/TODO.md index eb63af4..d7f8652 100644 --- a/TODO.md +++ b/TODO.md @@ -4,3 +4,25 @@ - [x] Both fragments now follow identical patterns - [x] Fix "Créer" button not appearing on language search: both language and tag inputs used name="q" in the same form, causing HTMX to submit the wrong (empty) value — renamed to unique names (language_search_q / tag_search_q) - [x] Exclude Français, Anglais, Néerlandais from language-search suggestions (handled by the checkbox list) +- [x] Refactor file upload naming convention + - [x] Create shared ThesisFileHandler trait (src/Controllers/ThesisFileHandler.php) + - [x] New pattern: theses/{YYYY}/{YYYY}_{AUTHORS}_{TITLE_SLUG}/ + - [x] COUVERTURE: single cover image in thesis folder (covers/ directory deprecated) + - [x] NOTE_INTENTION: single PDF in thesis folder + - [x] TFE_{XX}: main files, contiguous numbering 01+, hierarchy PDF > video > audio > subtitles > images > other + - [x] Subtitles (VTT) placed immediately after their associated video in TFE sequence + - [x] ANNEXE_{XX}: annex files, separate numbering 01+ + - [x] Two-digit zero-padded numbering (sprintf('%02d', ...)) + - [x] Update ThesisCreateController.php: use trait, new file handling + - [x] Update ThesisEditController.php: use trait, new file handling + - [x] Remove duplicate methods (generateAuthorSlug, sanitizeFilename, etc.) from both controllers + - [x] Update Database.php: deprecate handleCoverUpload, remove banner_path from queries + - [x] Update SystemController.php: remove banners/ stats + - [x] Update schema.sql: remove banner_path column and view field + - [x] Create migration 027_drop_banner_path.sql + - [x] Update PureLogicTest.php: adapt detectFileType call signature + - [x] All pure logic tests pass +- [x] Fix license validation: only require license for non-admin when access_type_id=1 (Libre), not for Interne (2) or Interdit (3) — fixes share link submissions failing with "Veuillez sélectionner une licence" +- [x] Add xamxam@erg.be mailto link at top of student (partage) form +- [x] On validation error, append "envoyez un e-mail à xamxam@erg.be" to flash error message +- [x] Preserve uploaded file names across validation redirects: store in session, display as warning on re-render so the student knows which files to re-select diff --git a/app/migrations/pending/027_drop_banner_path.sql b/app/migrations/pending/027_drop_banner_path.sql new file mode 100644 index 0000000..d4baf59 --- /dev/null +++ b/app/migrations/pending/027_drop_banner_path.sql @@ -0,0 +1,10 @@ +-- Migration 027: drop banner_path column from theses table. +-- Banners were merged into covers in migration 016; the column has been +-- vestigial since. This is safe to run even if the column is already absent. +-- Safe to re-run: IF EXISTS makes it idempotent. + +-- SQLite does not support DROP COLUMN directly in older versions; +-- we use the ALTER TABLE … DROP COLUMN syntax (supported since SQLite 3.35.0). +-- If this fails on an older SQLite, the column stays as-is (harmless). + +ALTER TABLE theses DROP COLUMN banner_path; diff --git a/app/public/partage/index.php b/app/public/partage/index.php index b4137a0..580103c 100644 --- a/app/public/partage/index.php +++ b/app/public/partage/index.php @@ -378,6 +378,27 @@ function renderShareLinkForm(string $slug, array $link): void
Formulaire pour XAMXAM
+ + + 0): ?> +⚠️ Les fichiers suivants avaient été sélectionnés avant l'erreur de validation. + Veuillez les sélectionner à nouveau :
+