mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-05-06 19:19:19 +02:00
feat: add file display to forms and recap pages
- Live file preview on all file inputs (file-field partial, edit template): thumbnails for images, emoji icons for PDF/video/zip/vtt, filename + size - New file-preview.js wired via $extraJs in add.php / edit.php and direct <script> in partage/index.php; $extraJs support added to head.php - admin/recapitulatif.php: replace plain table with rich file list — image thumbnails linked to media.php, type badges, human-readable size, date - partage/recapitulatif.php: full rewrite — shows thesis metadata + files list with same rich display (no media links for student privacy) - form.css: new sections for .file-preview-list (live preview) and .recap-file-list / .recap-dl / .partage-recap (recap pages)
This commit is contained in:
@@ -112,7 +112,8 @@
|
||||
</label>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<input type="file" id="couverture" name="couverture" accept="image/jpeg,image/png">
|
||||
<input type="file" id="couverture" name="couverture" accept="image/jpeg,image/png" data-preview="fp-couverture">
|
||||
<div id="fp-couverture" class="file-preview-list" aria-live="polite"></div>
|
||||
<small><?= empty($currentCover) ? 'JPG, PNG. Max 10 MB.' : 'Laisser vide pour conserver la couverture actuelle. JPG, PNG. Max 10 MB.' ?></small>
|
||||
</div>
|
||||
</div>
|
||||
@@ -149,7 +150,9 @@
|
||||
<label for="files">Ajouter des fichiers du TFE :</label>
|
||||
<div class="admin-file-input">
|
||||
<input type="file" id="files" name="files[]" multiple
|
||||
accept=".pdf,.jpg,.jpeg,.png,.mp4,.zip,.vtt">
|
||||
accept=".pdf,.jpg,.jpeg,.png,.mp4,.zip,.vtt"
|
||||
data-preview="fp-files">
|
||||
<div id="fp-files" class="file-preview-list" aria-live="polite"></div>
|
||||
<small>PDF, JPG, PNG, MP4, ZIP. Max 50 MB par fichier. Pour les vidéos, un fichier .vtt de sous-titres peut être joint.</small>
|
||||
</div>
|
||||
</div>
|
||||
@@ -167,7 +170,8 @@
|
||||
</label>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<input type="file" name="banner" accept="image/jpeg,image/png,image/webp">
|
||||
<input type="file" name="banner" id="banner" accept="image/jpeg,image/png,image/webp" data-preview="fp-banner">
|
||||
<div id="fp-banner" class="file-preview-list" aria-live="polite"></div>
|
||||
<small><?= empty($thesis['banner_path']) ? 'JPG, PNG ou WEBP. Format paysage recommandé (4:1). Max 5 MB.' : 'Laisser vide pour conserver la bannière actuelle. JPG, PNG ou WEBP. Format paysage recommandé (4:1). Max 5 MB.' ?></small>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user