Récapitulatif admin: sections → fieldsets, fichiers en table, marges + pas de thumbnails

This commit is contained in:
Pontoporeia
2026-05-19 22:32:26 +02:00
parent defc919cd0
commit 42222abe7c
4 changed files with 164 additions and 52 deletions

View File

@@ -1,4 +1,4 @@
<main id="main-content">
<main id="main-content" class="admin-main--recap">
<?php if ($studentMode): ?>
<!-- ═══════════════════ STUDENT MODE: Thank you page ═══════════════════ -->
<div class="thanks-student-page">
@@ -36,8 +36,8 @@
<?php elseif ($thesis): ?>
<!-- ═══════════ Identité ═══════════ -->
<section>
<h2>Identité</h2>
<fieldset>
<legend>Identité</legend>
<dl class="recap-dl">
<dt>Identifiant</dt><dd><?= htmlspecialchars($thesis['identifier']) ?></dd>
<dt>Titre</dt><dd><?= htmlspecialchars($thesis['title']) ?></dd>
@@ -55,17 +55,17 @@
<dt>Doctoral</dt><dd>Oui</dd>
<?php endif; ?>
</dl>
</section>
</fieldset>
<!-- ═══════════ Cadre académique ═══════════ -->
<section>
<h2>Cadre académique</h2>
<fieldset>
<legend>Cadre académique</legend>
<dl class="recap-dl">
<dt>Orientation</dt><dd><?= htmlspecialchars($thesis['orientation'] ?? '') ?></dd>
<dt>Atelier Pratique</dt><dd><?= htmlspecialchars($thesis['ap_program'] ?? '') ?></dd>
<dt>Finalité</dt><dd><?= htmlspecialchars($thesis['finality_type'] ?? '') ?></dd>
</dl>
</section>
</fieldset>
<!-- ═══════════ Jury ═══════════ -->
<?php
@@ -77,8 +77,8 @@
|| $thesis['supervisors'];
?>
<?php if ($hasJury): ?>
<section>
<h2>Jury</h2>
<fieldset>
<legend>Jury</legend>
<dl class="recap-dl">
<?php if ($thesis['jury_president']): ?>
<dt>Président·e</dt><dd><?= htmlspecialchars($thesis['jury_president']) ?></dd>
@@ -102,12 +102,12 @@
<dt>Note du jury</dt><dd><?= htmlspecialchars($thesis['jury_points']) ?>/20</dd>
<?php endif; ?>
</dl>
</section>
</fieldset>
<?php endif; ?>
<!-- ═══════════ Contenu ═══════════ -->
<section>
<h2>Contenu</h2>
<fieldset>
<legend>Contenu</legend>
<dl class="recap-dl">
<dt>Synopsis</dt>
<dd class="recap-synopsis"><?= nl2br(htmlspecialchars($thesis['synopsis'] ?? '')) ?></dd>
@@ -133,11 +133,11 @@
<dt>Lien BAIU</dt><dd><a href="<?= htmlspecialchars($thesis['baiu_link']) ?>" target="_blank" rel="noopener"><?= htmlspecialchars($thesis['baiu_link']) ?></a></dd>
<?php endif; ?>
</dl>
</section>
</fieldset>
<!-- ═══════════ Accès et licence ═══════════ -->
<section>
<h2>Accès et licence</h2>
<fieldset>
<legend>Accès et licence</legend>
<dl class="recap-dl">
<dt>Degré d'ouverture</dt><dd><?= htmlspecialchars($thesis['access_type'] ?? '') ?></dd>
@@ -154,11 +154,11 @@
<dt>Exemplaire BAIU</dt><dd><?= !empty($thesis['exemplaire_baiu']) ? 'Oui' : 'Non' ?></dd>
<dt>Exemplaire ERG</dt><dd><?= !empty($thesis['exemplaire_erg']) ? 'Oui' : 'Non' ?></dd>
</dl>
</section>
</fieldset>
<!-- ═══════════ Dates et publication ═══════════ -->
<section>
<h2>Dates et publication</h2>
<fieldset>
<legend>Dates et publication</legend>
<dl class="recap-dl">
<?php if ($thesis['submitted_at']): ?>
<dt>Soumis le</dt><dd><?= date('d/m/Y à H:i', strtotime($thesis['submitted_at'])) ?></dd>
@@ -174,21 +174,31 @@
<dt>Note du jury ajoutée</dt><dd><?= date('d/m/Y', strtotime($thesis['jury_note_added'])) ?></dd>
<?php endif; ?>
</dl>
</section>
</fieldset>
<!-- ═══════════ Remarques ═══════════ -->
<?php if (!empty($thesis['remarks'])): ?>
<section>
<h2>Remarques</h2>
<fieldset>
<legend>Remarques</legend>
<p class="recap-long-text"><?= nl2br(htmlspecialchars($thesis['remarks'])) ?></p>
</section>
</fieldset>
<?php endif; ?>
<!-- ═══════════ Fichiers ═══════════ -->
<?php if (!empty($files)): ?>
<section>
<h2>Fichiers (<?= count($files) ?>)</h2>
<ul class="admin-file-list" role="list">
<fieldset>
<legend>Fichiers (<?= count($files) ?>)</legend>
<table class="recap-files-table">
<thead>
<tr>
<th></th>
<th>Nom</th>
<th>Type</th>
<th>Taille</th>
<th>Date</th>
</tr>
</thead>
<tbody>
<?php foreach ($files as $f): ?>
<?php
$mime = $f['mime_type'] ?? '';
@@ -230,38 +240,27 @@
default => '📎',
};
?>
<li class="admin-file-list-item">
<figure class="admin-file-figure">
<?php if ($isImage && !$isPeerTube): ?>
<img src="<?= $mediaUrl ?>" alt="<?= $fileName ?>" class="admin-file-thumb" loading="lazy">
<?php else: ?>
<span class="admin-file-icon"><?= $typeIcon ?></span>
<?php endif; ?>
<figcaption class="admin-file-caption">
<div class="admin-file-name-row">
<a href="<?= $mediaUrl ?>" target="_blank" rel="noopener" class="admin-file-name"><?= $fileName ?></a>
</div>
<tr>
<td class="recap-files-icon">
<span class="recap-files-icon-emoji"><?= $typeIcon ?></span>
</td>
<td class="recap-files-name">
<a href="<?= $mediaUrl ?>" target="_blank" rel="noopener"><?= $fileName ?></a>
<?php if ($isPeerTube): ?>
<span class="admin-file-peertube-id">ID: <?= htmlspecialchars($_ptUuid) ?></span>
<span class="recap-files-peertube-id">ID: <?= htmlspecialchars($_ptUuid) ?></span>
<?php endif; ?>
<?php if ($displayLabel): ?>
<span class="admin-file-label"><?= htmlspecialchars($displayLabel) ?></span>
<span class="recap-files-label"><?= htmlspecialchars($displayLabel) ?></span>
<?php endif; ?>
<span class="admin-file-meta-row">
<span class="admin-file-meta"><?= htmlspecialchars($fileType) ?></span>
<?php if (!empty($f['file_size']) && $f['file_size'] > 0): ?>
<span class="admin-file-meta"><?= formatFileSize($f['file_size']) ?></span>
<?php endif; ?>
<?php if (!empty($f['uploaded_at'])): ?>
<span class="admin-file-meta"><?= date('d/m/Y H:i', strtotime($f['uploaded_at'])) ?></span>
<?php endif; ?>
</span>
</figcaption>
</figure>
</li>
</td>
<td class="recap-files-type"><?= htmlspecialchars($fileType) ?></td>
<td class="recap-files-size"><?= !empty($f['file_size']) && $f['file_size'] > 0 ? formatFileSize($f['file_size']) : '' ?></td>
<td class="recap-files-date"><?= !empty($f['uploaded_at']) ? date('d/m/Y H:i', strtotime($f['uploaded_at'])) : '' ?></td>
</tr>
<?php endforeach; ?>
</ul>
</section>
</tbody>
</table>
</fieldset>
<?php endif; ?>
<div class="admin-action-bar">