mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-05-06 19:19:19 +02:00
3.9 KiB
3.9 KiB
XAMXAM TODO
File Upload & Display System
- DB migration 007 — add
sort_orderanddisplay_labelcolumns tothesis_files - Database.php —
getThesisFilesordered bysort_order ASC;insertThesisFileacceptsdisplay_label+sort_order; newreorderThesisFiles()andupdateThesisFileLabel()methods - 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[]andfile_orders[]POST fields;detectFileType()helper - ThesisEditController — same expansions; handle
file_sort_order[],file_label[id]POST fields; reorder + label-update methods called;detectFileType()helper - MediaController — expanded MIME allowlist; HTTP Range support for audio/video seeking; force-download for "other" types; inline display for known displayable types
- 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
- 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 - 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
- tfe.php (public template) — handles audio (
<audio>), video (all exts), image, PDF, "other" (download link); readsdisplay_label; files already sorted bysort_order - tfe.css — styles for
.tfe-audio,.tfe-download-file,.tfe-download-link - form.css — styles for
.tfe-file-queue,.fq-item,.admin-file-list-item(sortable), drag handles, label inputs, ghost class - PHP upload limits —
.htaccess+.user.iniinpublic/(Apache/FPM) +-dflags injustfileserve recipe (built-in dev server ignores ini files) - add.php / edit.php / partage/index.php — use
sortable.min.js+file-upload-queue.jsinstead offile-preview.js - docs/file-uploads.md — reference document covering accepted types, size limits, storage layout, ordering, labels, security, and source file index
UI
- admin header — replace "Déconnexion" text link with SVG sign-out icon (accessible via
aria-label+.sr-onlyspan) - toast styling — repositioned to bottom-center; solid
--bg-secondarybackground; font bumped to--step-0; padding increased; visible duration extended to ~6.35 s; enter animation slides up from bottom
Bug fixes
- smtp-test.php — wrap
SmtpRelay::send()intry/catch SmtpSendExceptionso SMTP delivery failures (e.g. 550 recipient rejected) surface as a proper flash error instead of an uncaught exception/silent crash - partage email retry — on 550 recipient-rejected, redirect to
/partage/retry-emailinstead ofrecapitulatif; student can correct address and resend or skip - tfe access form email retry — on
recipient_rejectedJSON response, highlight email field in red, show corrected error message, let user fix and resubmit inline - ThesisCreateController —
confirmation_emailis now optional (empty = skip send) - admin/add.php template — email confirmation field marked optional, label and hint updated
Previously completed
- Multi-file upload for thesis files (basic)
- File access restriction system (email approval workflow)
- Share link system for student submission
- Admin CRUD for theses
- Public TFE detail page with file display
- Search and repertoire
- Tag management
- Form help blocks
- SMTP notification