mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-06-26 00:29:18 +02:00
Fix nettoyage modal: SVG icon files, padding/margin consistency, BBBDMSans font, fix HTMX trigger, nested details cleanup
This commit is contained in:
@@ -229,58 +229,9 @@
|
||||
Chaque <strong>bloc d'aide</strong> s'affiche au-dessus de sa section dans le formulaire de soumission.
|
||||
Le <strong>bouton rond</strong> active/désactive l'affichage.
|
||||
</p>
|
||||
|
||||
<?php
|
||||
$blocks = $formHelpBlocks;
|
||||
$pairs = [
|
||||
['partage_intro', null, null],
|
||||
['fieldset_tfe_info', 'Informations du TFE',
|
||||
['Titre', 'Sous-titre', 'Auteur·ice(s)', 'Contact visible', 'Synopsis']],
|
||||
['fieldset_languages', 'Langue(s)',
|
||||
['Langues du TFE (cases à cocher)', 'Autre(s) langue(s)']],
|
||||
['fieldset_keywords', 'Mots-clés',
|
||||
['Mots-clés (max 10), séparés par des virgules']],
|
||||
['fieldset_academic', 'Cadre académique',
|
||||
['Année', 'Orientation', 'AP', 'Finalité']],
|
||||
['fieldset_jury', 'Composition du jury',
|
||||
['Président·e', 'Promoteur·ice(s)', 'Lecteur·ices']],
|
||||
['fieldset_files', 'Format(s) + Fichiers',
|
||||
['Formats (PDF, vidéo, audio, site web…)', 'Couverture', 'Note d\'intention', 'Fichier principal', 'Annexes']],
|
||||
['fieldset_access', 'Degrés d\'ouverture et licences',
|
||||
['Généralités', 'Degré (libre/interne/interdit)', 'Licence', 'CC2r']],
|
||||
['fieldset_email', 'E-mail de confirmation',
|
||||
['Adresse e-mail']],
|
||||
];
|
||||
?>
|
||||
|
||||
<div class="fhb-structure">
|
||||
<?php foreach ($pairs as [$helpKey, $fieldsetName, $inputs]):
|
||||
$b = $blocks[$helpKey] ?? ['content' => '', 'name' => '', 'enabled' => 0];
|
||||
$title = $b['name'] ?: ($fieldsetName ?? $helpKey);
|
||||
?>
|
||||
<div class="fhb-block-wrapper" data-key="<?= htmlspecialchars($helpKey) ?>">
|
||||
<div class="fhb-inline"
|
||||
hx-get="/admin/form-help-inline-fragment.php?key=<?= urlencode($helpKey) ?>"
|
||||
hx-trigger="load"
|
||||
hx-swap="outerHTML">
|
||||
<div class="fhb-inline-name"><?= htmlspecialchars($title) ?></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if ($fieldsetName !== null): ?>
|
||||
<div class="fhb-fieldset-card">
|
||||
<div class="fhb-fieldset-card-legend"><?= htmlspecialchars($fieldsetName) ?></div>
|
||||
<?php if ($inputs): ?>
|
||||
<ul class="fhb-fieldset-card-inputs">
|
||||
<?php foreach ($inputs as $inp): ?>
|
||||
<li><?= htmlspecialchars($inp) ?></li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<p>
|
||||
<a href="/admin/structure-formulaire.php" class="btn btn--primary btn--sm">Gérer la structure du formulaire (page dédiée)</a>
|
||||
</p>
|
||||
</fieldset>
|
||||
</section>
|
||||
</article>
|
||||
|
||||
@@ -41,7 +41,7 @@ document.addEventListener('htmx:afterSwap',()=>{document.querySelectorAll('input
|
||||
<?php endif; ?>
|
||||
<?php if ($tmpTotalCount > 0): ?>
|
||||
<button type="button" class="btn btn--sm btn--secondary" id="tmp-cleanup-btn"
|
||||
onclick="document.getElementById('tmp-cleanup-dialog').showModal(); htmx.trigger('#tmp-cleanup-stats','loadStats'); htmx.trigger('#peertube-orphans-wrapper','loadPeertube')">
|
||||
onclick="document.getElementById('tmp-cleanup-dialog').showModal(); htmx.trigger('#tmp-cleanup-stats-wrapper','loadStats'); htmx.trigger('#peertube-orphans-wrapper','loadPeertube')">
|
||||
Nettoyer (<?= $tmpTotalCount ?>)
|
||||
</button>
|
||||
<?php endif; ?>
|
||||
|
||||
@@ -8,14 +8,19 @@
|
||||
<div id="tmp-cleanup-result" style="display:none;margin-bottom:var(--space-sm)"></div>
|
||||
<div class="n-grid" id="cleanup-grid-parent">
|
||||
<!-- ═══════ FilePond / Trash ═══════ -->
|
||||
<details id="tmp-cleanup-stats" class="n-section" open>
|
||||
<summary>Fichiers temporaires</summary>
|
||||
<div hx-get="/admin/actions/cleanup-stats-fragment.php"
|
||||
hx-trigger="loadStats"
|
||||
hx-swap="innerHTML">
|
||||
<div id="tmp-cleanup-stats-wrapper"
|
||||
hx-get="/admin/actions/cleanup-stats-fragment.php"
|
||||
hx-trigger="loadStats"
|
||||
hx-swap="outerHTML"
|
||||
hx-indicator="#tmp-cleanup-stats-wrapper">
|
||||
<details class="n-section" open>
|
||||
<summary>
|
||||
<img src="/assets/icons/paint-brush-household.svg" width="14" height="14" alt="" aria-hidden="true">
|
||||
Fichiers temporaires
|
||||
</summary>
|
||||
<p style="margin:0;color:var(--text-secondary)">Chargement…</p>
|
||||
</div>
|
||||
</details>
|
||||
</details>
|
||||
</div>
|
||||
<!-- ═══════ PeerTube ═══════ -->
|
||||
<div id="peertube-orphans-wrapper"
|
||||
hx-get="/admin/actions/peertube-orphans-fragment.php"
|
||||
|
||||
67
app/templates/admin/structure-formulaire.php
Normal file
67
app/templates/admin/structure-formulaire.php
Normal file
@@ -0,0 +1,67 @@
|
||||
<main id="main-content" class="admin-main">
|
||||
<article>
|
||||
<h1>Structure du Formulaire</h1>
|
||||
|
||||
<p style="margin-bottom:var(--space-s)">
|
||||
<a href="/admin/contenus.php" class="btn btn--sm btn--secondary">← Retour aux Contenus</a>
|
||||
</p>
|
||||
|
||||
<p class="fhb-hint">
|
||||
Chaque <strong>bloc d'aide</strong> s'affiche au-dessus de sa section dans le formulaire de soumission.
|
||||
Le <strong>bouton rond</strong> active/désactive l'affichage.
|
||||
</p>
|
||||
|
||||
<?php
|
||||
$blocks = $formHelpBlocks;
|
||||
$pairs = [
|
||||
['partage_intro', null, null],
|
||||
['fieldset_tfe_info', 'Informations du TFE',
|
||||
['Titre', 'Sous-titre', 'Auteur·ice(s)', 'Contact visible', 'Synopsis']],
|
||||
['fieldset_languages', 'Langue(s)',
|
||||
['Langues du TFE (cases à cocher)', 'Autre(s) langue(s)']],
|
||||
['fieldset_keywords', 'Mots-clés',
|
||||
['Mots-clés (max 10), séparés par des virgules']],
|
||||
['fieldset_academic', 'Cadre académique',
|
||||
['Année', 'Orientation', 'AP', 'Finalité']],
|
||||
['fieldset_jury', 'Composition du jury',
|
||||
['Président·e', 'Promoteur·ice(s)', 'Lecteur·ices']],
|
||||
['fieldset_files', 'Format(s) + Fichiers',
|
||||
['Formats (PDF, vidéo, audio, site web…)', 'Couverture', 'Note d\'intention', 'Fichier principal', 'Annexes']],
|
||||
['fieldset_access', 'Degrés d\'ouverture et licences',
|
||||
['Généralités', 'Degré (libre/interne/interdit)', 'Licence', 'CC2r']],
|
||||
['fieldset_email', 'E-mail de confirmation',
|
||||
['Adresse e-mail']],
|
||||
];
|
||||
?>
|
||||
|
||||
<div class="fhb-structure">
|
||||
<?php foreach ($pairs as [$helpKey, $fieldsetName, $inputs]):
|
||||
$b = $blocks[$helpKey] ?? ['content' => '', 'name' => '', 'enabled' => 0];
|
||||
$title = $b['name'] ?: ($fieldsetName ?? $helpKey);
|
||||
?>
|
||||
<div class="fhb-block-wrapper" data-key="<?= htmlspecialchars($helpKey) ?>">
|
||||
<div class="fhb-inline"
|
||||
hx-get="/admin/form-help-inline-fragment.php?key=<?= urlencode($helpKey) ?>"
|
||||
hx-trigger="load"
|
||||
hx-swap="outerHTML">
|
||||
<div class="fhb-inline-name"><?= htmlspecialchars($title) ?></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if ($fieldsetName !== null): ?>
|
||||
<div class="fhb-fieldset-card">
|
||||
<div class="fhb-fieldset-card-legend"><?= htmlspecialchars($fieldsetName) ?></div>
|
||||
<?php if ($inputs): ?>
|
||||
<ul class="fhb-fieldset-card-inputs">
|
||||
<?php foreach ($inputs as $inp): ?>
|
||||
<li><?= htmlspecialchars($inp) ?></li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
|
||||
</article>
|
||||
</main>
|
||||
Reference in New Issue
Block a user