diff --git a/TODO.md b/TODO.md index 0afdf8b..67409d4 100644 --- a/TODO.md +++ b/TODO.md @@ -1,131 +1,28 @@ -# TODO +# XAMXAM TODO -## Admin area cleanup +## File Upload & Display System -- [x] Combine `acces-etudiante.php` + `file-access.php` into `acces.php` (two `
` blocks) -- [x] Move `system.php` content into `parametres.php` (system section + logs section) -- [x] Use `
` for sections, `
` only where form fields are present -- [x] Redirect legacy URLs (acces-etudiante.php, file-access.php, system.php) with 301 -- [x] Update action redirects to point to new pages -- [x] Update admin nav header (merged 3 items → 2) +- [x] **DB migration 007** — add `sort_order` and `display_label` columns to `thesis_files` +- [x] **Database.php** — `getThesisFiles` ordered by `sort_order ASC`; `insertThesisFile` accepts `display_label` + `sort_order`; new `reorderThesisFiles()` and `updateThesisFileLabel()` methods +- [x] **ThesisCreateController** — expand MIME/ext allowlist (audio: mp3/ogg/wav/flac/aac/m4a; video: webm/mov/ogv; image: gif/webp; archives: tar/gz; any-ext via octet-stream); raise max size to 500 MB; accept `file_labels[]` and `file_orders[]` POST fields; `detectFileType()` helper +- [x] **ThesisEditController** — same expansions; handle `file_sort_order[]`, `file_label[id]` POST fields; reorder + label-update methods called; `detectFileType()` helper +- [x] **MediaController** — expanded MIME allowlist; HTTP Range support for audio/video seeking; force-download for "other" types; inline display for known displayable types +- [x] **fieldset-files.php** (shared partial) — replaced old multi-file input with sortable queue UI using SortableJS; per-file label inputs; wide accept attribute; 500 MB hint +- [x] **templates/admin/edit.php** — existing files rendered as sortable list with drag handles, file type icons, label inputs, delete checkboxes; hidden `file_sort_order[]` inputs; new-file queue widget +- [x] **file-upload-queue.js** — new JS: sortable queue for new uploads (SortableJS), per-file label fields, hidden order fields injected on submit; existing-file drag-sort; backward-compatible legacy preview for cover/banner inputs +- [x] **tfe.php** (public template) — handles audio (`
diff --git a/app/templates/partials/form/fieldset-files.php b/app/templates/partials/form/fieldset-files.php index 4ae4973..092289c 100644 --- a/app/templates/partials/form/fieldset-files.php +++ b/app/templates/partials/form/fieldset-files.php @@ -2,9 +2,11 @@ /** * Shared partial — "Fichiers" fieldset (add / student submission mode). * - * This renders simple upload inputs with no existing-file management (that is - * handled by the edit-specific template). For the edit form, include the - * edit-specific files section directly in the template instead of this partial. + * Renders upload inputs for cover image, banner image, and TFE files. + * TFE files support multiple file types (PDF, image, audio, video, other), + * drag-to-reorder via SortableJS, and per-file label input. + * + * For the edit form, the existing-files management is inline in edit.php. * * Variables consumed: none beyond APP_ROOT (always available). */ @@ -12,7 +14,41 @@
Fichiers - - - + + + + + +
+ +
+ + + Types acceptés : PDF · JPG/PNG/GIF/WEBP · MP4/WebM/MOV (vidéo) · MP3/OGG/WAV/FLAC (audio) · ZIP/TAR (archives) · autres fichiers (téléchargement uniquement). + Max 500 MB par fichier. + Les fichiers .vtt sont des sous-titres et seront associés automatiquement à la vidéo précédente. + + + +
    + +
+

Aucun fichier sélectionné.

+
+
diff --git a/app/templates/public/tfe.php b/app/templates/public/tfe.php index 76dabef..08b262c 100644 --- a/app/templates/public/tfe.php +++ b/app/templates/public/tfe.php @@ -371,80 +371,78 @@
- -

- &download=1"> - Télécharger le PDF - + Télécharger le PDF

- - " - alt=""> - - + + <?= htmlspecialchars($caption !== '' ? $caption : $data['title'] . ' — ' . ($data['authors'] ?? '')) ?> + + + + +
+ + 📎 + + + + MB + +
- -
+ +