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
+16
View File
@@ -137,6 +137,22 @@ $pageTitle = 'Merci — TFE enregistré';
<dd><?= htmlspecialchars($thesis['keywords']) ?></dd>
<?php endif; ?>
<?php
$_hasPages2 = isset($thesis['duration_pages']) && $thesis['duration_pages'] !== null;
$_hasMins2 = isset($thesis['duration_minutes']) && $thesis['duration_minutes'] !== null;
if ($_hasPages2 || $_hasMins2):
$_parts2 = [];
if ($_hasPages2) $_parts2[] = $thesis['duration_pages'] . ' pages';
if ($_hasMins2) {
$_h2 = (int)floor($thesis['duration_minutes'] / 60);
$_m2 = $thesis['duration_minutes'] % 60;
$_parts2[] = $_h2 . 'h' . str_pad((string)$_m2, 2, '0', STR_PAD_LEFT);
}
?>
<dt>Durée</dt>
<dd><?= htmlspecialchars(implode(', ', $_parts2)) ?></dd>
<?php unset($_hasPages2, $_hasMins2, $_parts2, $_h2, $_m2); endif; ?>
<?php if (!empty($thesis['jury_promoteurs'])): ?>
<dt>Promoteur·ice(s) interne</dt>
<dd><?= htmlspecialchars($thesis['jury_promoteurs']) ?></dd>