refactor: combined duration (pages + minutes), has_annexes checkbox, remove Mo

- Remove Mo option from duration, keep only pages and minutes
- Redesign duration fieldset: separate Pages input + Durée h:m inputs, both can be set together
- Fix minutes input visibility: wider inputs (6ch), proper CSS layout
- Add has_annexes checkbox to fichiers fragment + DB column + controllers
- Display duration on admin backoffice recap page
- Display duration on public partage recap page
- Update public TFE page for new combined duration format
- Migration 041: add duration_pages, duration_minutes, has_annexes columns; migrate data; recreate views
This commit is contained in:
Pontoporeia
2026-07-03 15:58:10 +02:00
parent 42c4e78df6
commit 4fa57d592a
20 changed files with 335 additions and 173 deletions
+19
View File
@@ -131,6 +131,25 @@
<dt>Mots-clés</dt><dd><?= htmlspecialchars($thesis['keywords']) ?></dd>
<?php endif; ?>
<?php
$_hasPages = isset($thesis['duration_pages']) && $thesis['duration_pages'] !== null;
$_hasMins = isset($thesis['duration_minutes']) && $thesis['duration_minutes'] !== null;
if ($_hasPages || $_hasMins):
$_parts = [];
if ($_hasPages) $_parts[] = $thesis['duration_pages'] . ' pages';
if ($_hasMins) {
$_h = (int)floor($thesis['duration_minutes'] / 60);
$_m = $thesis['duration_minutes'] % 60;
$_parts[] = $_h . 'h' . str_pad((string)$_m, 2, '0', STR_PAD_LEFT);
}
?>
<dt>Durée</dt><dd><?= htmlspecialchars(implode(', ', $_parts)) ?></dd>
<?php endif; ?>
<?php if (!empty($thesis['has_annexes'])): ?>
<dt>Annexes</dt><dd>Oui</dd>
<?php endif; ?>
<?php if ($thesis['baiu_link']): ?>
<dt>Lien BAIU</dt><dd><a href="<?= htmlspecialchars($thesis['baiu_link']) ?>" target="_blank" rel="noopener"><?= htmlspecialchars($thesis['baiu_link']) ?></a></dd>
<?php endif; ?>