mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-06-25 16:19:19 +02:00
Move Formulaire settings to contenus, remove delete-all TFE
- Removed 'Supprimer tous les TFE' danger zone from parametres (template, dialog, backend handler, Database::deleteAllTheses(), AdminLogger method) - Moved Formulaire section (access type toggles, restricted files) from parametres to contenus under new h2 'Paramètres du Formulaire' - Moved Types de travaux from parametres to contenus as sub-section under Paramètres du Formulaire - Existing 'Structure du formulaire' section now a sub-heading (h3) under Paramètres du Formulaire in contenus - Sub-sections: Restrictions d'accès aux fichiers, Degré d'ouverture, Types de travaux, Structure du Formulaire - Added siteSettings query to contenus controller
This commit is contained in:
@@ -605,15 +605,36 @@ th.admin-ap-col {
|
|||||||
font-size: var(--step--1);
|
font-size: var(--step--1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ── Paramètres page top-level sections (flat, no border card) ──────────── */
|
/* ── Flat sections (no border card) — parametres + contenus ─────────────── */
|
||||||
.admin-body main > section[aria-labelledby^="settings-"] {
|
.admin-body main > section[aria-labelledby^="settings-"],
|
||||||
|
.admin-body main > section[aria-labelledby^="static-pages-"],
|
||||||
|
.admin-body main > section[aria-labelledby^="form-settings-"] {
|
||||||
border: none;
|
border: none;
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
margin-bottom: var(--space-xl);
|
margin-bottom: var(--space-xl);
|
||||||
}
|
}
|
||||||
|
|
||||||
.admin-body main > section[aria-labelledby^="settings-"] > h2 {
|
/* Fieldsets inside flat sections: no card border */
|
||||||
|
.admin-body main > section[aria-labelledby^="settings-"] fieldset,
|
||||||
|
.admin-body main > section[aria-labelledby^="form-settings-"] fieldset {
|
||||||
|
border: none;
|
||||||
|
border-radius: 0;
|
||||||
|
padding: var(--space-m) 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.admin-body main > section[aria-labelledby^="settings-"] fieldset legend,
|
||||||
|
.admin-body main > section[aria-labelledby^="form-settings-"] fieldset legend {
|
||||||
|
padding: 0;
|
||||||
|
font-weight: 600;
|
||||||
|
letter-spacing: 0.04em;
|
||||||
|
text-transform: uppercase;
|
||||||
|
color: var(--text-secondary);
|
||||||
|
}
|
||||||
|
|
||||||
|
.admin-body main > section[aria-labelledby^="settings-"] > h2,
|
||||||
|
.admin-body main > section[aria-labelledby^="static-pages-"] > h2,
|
||||||
|
.admin-body main > section[aria-labelledby^="form-settings-"] > h2 {
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
letter-spacing: 0.06em;
|
letter-spacing: 0.06em;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
|
|||||||
@@ -113,6 +113,19 @@
|
|||||||
+%%%%%%% diff from: somsyvxz 249f7943 "Bulk bar anti-shift, tags icons, AP no-wrap, credits reorder" (rebased revision)
|
+%%%%%%% diff from: somsyvxz 249f7943 "Bulk bar anti-shift, tags icons, AP no-wrap, credits reorder" (rebased revision)
|
||||||
+\\\\\\\ to: qxuprqpt a1b3064d "Add language-search component for Autre Langue input + active search in lists" (rebased revision)
|
+\\\\\\\ to: qxuprqpt a1b3064d "Add language-search component for Autre Langue input + active search in lists" (rebased revision)
|
||||||
++ $linkName = $link['name'] ?? '';
|
++ $linkName = $link['name'] ?? '';
|
||||||
|
++ $linkExpiresVal = $link['expires_at'] ? date('Y-m-d\TH:i', strtotime($link['expires_at'])) : '';
|
||||||
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% diff from: qxuprqpt a1b3064d "Add language-search component for Autre Langue input + active search in lists" (rebased revision)
|
||||||
|
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ to: somsyvxz 249f7943 "Bulk bar anti-shift, tags icons, AP no-wrap, credits reorder" (rebased revision)
|
||||||
|
- $linkName = $link['name'] ?? '';
|
||||||
|
- $linkExpiresVal = $link['expires_at'] ? date('Y-m-d\TH:i', strtotime($link['expires_at'])) : '';
|
||||||
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% diff from: somsyvxz 14a3cd10 "Bulk bar anti-shift, tags icons, AP no-wrap, credits reorder" (rebase destination)
|
||||||
|
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ to: sntroxlt a8d07458 "Move Formulaire settings to contenus, remove delete-all TFE" (rebased revision)
|
||||||
|
$linkName = $link['name'] ?? '';
|
||||||
|
$linkExpiresVal = $link['expires_at'] ? date('Y-m-d\TH:i', strtotime($link['expires_at'])) : '';
|
||||||
|
$linkLockedYear = $link['locked_year'] ?? null;
|
||||||
|
+%%%%%%% diff from: somsyvxz 249f7943 "Bulk bar anti-shift, tags icons, AP no-wrap, credits reorder" (rebased revision)
|
||||||
|
+\\\\\\\ to: sntroxlt 6a5b93f3 "Move Formulaire settings to contenus, remove delete-all TFE" (rebased revision)
|
||||||
|
++ $linkName = $link['name'] ?? '';
|
||||||
++ $linkExpiresVal = $link['expires_at'] ? date('Y-m-d\TH:i', strtotime($link['expires_at'])) : '';
|
++ $linkExpiresVal = $link['expires_at'] ? date('Y-m-d\TH:i', strtotime($link['expires_at'])) : '';
|
||||||
?>
|
?>
|
||||||
<tr class="admin-table-row" onclick="event.stopPropagation(); window.open('/partage/<?= urlencode($link['slug']) ?>', '_blank')" style="cursor:pointer">
|
<tr class="admin-table-row" onclick="event.stopPropagation(); window.open('/partage/<?= urlencode($link['slug']) ?>', '_blank')" style="cursor:pointer">
|
||||||
|
|||||||
@@ -11,119 +11,13 @@
|
|||||||
<div class="flash-error" role="alert"><?= htmlspecialchars($flash['error']) ?></div>
|
<div class="flash-error" role="alert"><?= htmlspecialchars($flash['error']) ?></div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
<!-- ═══════════════════════════════════════════════════════════════════
|
|
||||||
PARAMÈTRES DU FORMULAIRE
|
|
||||||
═══════════════════════════════════════════════════════════════════ -->
|
|
||||||
<h2 id="form-settings-title">Paramètres du Formulaire</h2>
|
|
||||||
|
|
||||||
<!-- ── Restrictions d'accès aux fichiers ── -->
|
|
||||||
<section aria-labelledby="form-restricted-files-title">
|
|
||||||
<h3 id="form-restricted-files-title">Restrictions d'accès aux fichiers</h3>
|
|
||||||
|
|
||||||
<form method="post" action="actions/settings.php" class="param-form">
|
|
||||||
<input type="hidden" name="csrf_token" value="<?= htmlspecialchars($_SESSION['csrf_token']) ?>">
|
|
||||||
<input type="hidden" name="section" value="formulaire">
|
|
||||||
|
|
||||||
<label class="param-checkbox">
|
|
||||||
<input type="checkbox" name="restricted_files_enabled" value="1"
|
|
||||||
<?= ($siteSettings['restricted_files_enabled'] ?? '0') === '1' ? 'checked' : '' ?>>
|
|
||||||
<span>
|
|
||||||
<strong>Activer la restriction d'accès</strong><br>
|
|
||||||
<small>Pour les TFE de type "Interne", masquer les fichiers et exiger une demande d'accès par email. Les métadonnées et le résumé restent visibles publiquement.</small>
|
|
||||||
</span>
|
|
||||||
</label>
|
|
||||||
|
|
||||||
<button type="submit" class="btn btn--primary">Enregistrer</button>
|
|
||||||
</form>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<!-- ── Degré d'ouverture ── -->
|
|
||||||
<section aria-labelledby="form-access-types-title">
|
|
||||||
<h3 id="form-access-types-title">Degré d'ouverture</h3>
|
|
||||||
<p>Options de visibilité disponibles dans le formulaire d'ajout de TFE.</p>
|
|
||||||
<p class="param-note">L'option <strong>Libre</strong> ne sera activée qu'à partir de l'année académique prochaine.</p>
|
|
||||||
|
|
||||||
<form method="post" action="actions/settings.php" class="param-form">
|
|
||||||
<input type="hidden" name="csrf_token" value="<?= htmlspecialchars($_SESSION['csrf_token']) ?>">
|
|
||||||
<input type="hidden" name="section" value="formulaire">
|
|
||||||
|
|
||||||
<label class="param-checkbox">
|
|
||||||
<input type="checkbox" name="access_type_interdit_enabled" value="1"
|
|
||||||
<?= ($siteSettings['access_type_interdit_enabled'] ?? '1') === '1' ? 'checked' : '' ?>>
|
|
||||||
<span>
|
|
||||||
<strong>Interdit</strong><br>
|
|
||||||
<small>TFE non disponible en physique ni sur le site</small>
|
|
||||||
</span>
|
|
||||||
</label>
|
|
||||||
|
|
||||||
<label class="param-checkbox">
|
|
||||||
<input type="checkbox" name="access_type_interne_enabled" value="1"
|
|
||||||
<?= ($siteSettings['access_type_interne_enabled'] ?? '1') === '1' ? 'checked' : '' ?>>
|
|
||||||
<span>
|
|
||||||
<strong>Interne</strong><br>
|
|
||||||
<small>TFE accessible uniquement sur place en physique</small>
|
|
||||||
</span>
|
|
||||||
</label>
|
|
||||||
|
|
||||||
<label class="param-checkbox param-checkbox--disabled">
|
|
||||||
<input type="checkbox" name="access_type_libre_enabled" value="1"
|
|
||||||
<?= ($siteSettings['access_type_libre_enabled'] ?? '0') === '1' ? 'checked' : '' ?>>
|
|
||||||
<span>
|
|
||||||
<strong>Libre</strong><br>
|
|
||||||
<small>Libre accès — disponible à partir de l'année académique prochaine</small>
|
|
||||||
</span>
|
|
||||||
</label>
|
|
||||||
|
|
||||||
<button type="submit" class="btn btn--primary">Enregistrer</button>
|
|
||||||
</form>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<!-- ── Types de travaux ── -->
|
|
||||||
<section aria-labelledby="form-objet-types-title">
|
|
||||||
<h3 id="form-objet-types-title">Types de travaux</h3>
|
|
||||||
<p>Active ou désactive les types de travaux dans les formulaires et la consultation. Un type désactivé ne peut plus être soumis ni affiché sur le site.</p>
|
|
||||||
<p class="param-note">Le type <strong>TFE</strong> est toujours actif et ne peut pas être désactivé.</p>
|
|
||||||
|
|
||||||
<form method="post" action="actions/settings.php" class="param-form">
|
|
||||||
<input type="hidden" name="csrf_token" value="<?= htmlspecialchars($_SESSION['csrf_token']) ?>">
|
|
||||||
<input type="hidden" name="section" value="objet_types">
|
|
||||||
|
|
||||||
<label class="param-checkbox param-checkbox--disabled">
|
|
||||||
<input type="checkbox" disabled checked>
|
|
||||||
<span>
|
|
||||||
<strong>TFE</strong><br>
|
|
||||||
<small>Travail de fin d'études — toujours actif</small>
|
|
||||||
</span>
|
|
||||||
</label>
|
|
||||||
|
|
||||||
<label class="param-checkbox">
|
|
||||||
<input type="checkbox" name="objet_these_enabled" value="1"
|
|
||||||
<?= ($siteSettings['objet_these_enabled'] ?? '1') === '1' ? 'checked' : '' ?>>
|
|
||||||
<span>
|
|
||||||
<strong>Thèse</strong><br>
|
|
||||||
<small>Thèses doctorales</small>
|
|
||||||
</span>
|
|
||||||
</label>
|
|
||||||
|
|
||||||
<label class="param-checkbox">
|
|
||||||
<input type="checkbox" name="objet_frart_enabled" value="1"
|
|
||||||
<?= ($siteSettings['objet_frart_enabled'] ?? '1') === '1' ? 'checked' : '' ?>>
|
|
||||||
<span>
|
|
||||||
<strong>Frart</strong><br>
|
|
||||||
<small>Formation de recherche en art</small>
|
|
||||||
</span>
|
|
||||||
</label>
|
|
||||||
|
|
||||||
<button type="submit" class="btn btn--primary">Enregistrer</button>
|
|
||||||
</form>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<!-- ═══════════════════════════════════════════════════════════════════
|
<!-- ═══════════════════════════════════════════════════════════════════
|
||||||
PAGES STATIQUES
|
PAGES STATIQUES
|
||||||
═══════════════════════════════════════════════════════════════════ -->
|
═══════════════════════════════════════════════════════════════════ -->
|
||||||
<h2>Pages statiques</h2>
|
<section aria-labelledby="static-pages-title">
|
||||||
|
<h2 id="static-pages-title">Pages statiques</h2>
|
||||||
|
|
||||||
<table>
|
<table>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="col">Slug</th>
|
<th scope="col">Slug</th>
|
||||||
@@ -148,14 +42,123 @@
|
|||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
</section>
|
||||||
|
|
||||||
<!-- ── Structure du formulaire ── -->
|
<!-- ═══════════════════════════════════════════════════════════════════
|
||||||
<section aria-labelledby="form-help-blocks">
|
PARAMÈTRES DU FORMULAIRE
|
||||||
<h3 id="form-help-blocks">Structure du Formulaire</h3>
|
═══════════════════════════════════════════════════════════════════ -->
|
||||||
<p class="fhb-hint">
|
<section aria-labelledby="form-settings-title">
|
||||||
Chaque <strong>bloc d'aide</strong> s'affiche au-dessus de sa section dans le formulaire de soumission.
|
<h2 id="form-settings-title">Paramètres du Formulaire</h2>
|
||||||
Le <strong>bouton rond</strong> active/désactive l'affichage.
|
|
||||||
</p>
|
<!-- ── Restrictions d'accès aux fichiers ── -->
|
||||||
|
<fieldset>
|
||||||
|
<legend>Restrictions d'accès aux fichiers</legend>
|
||||||
|
|
||||||
|
<form method="post" action="actions/settings.php" class="param-form">
|
||||||
|
<input type="hidden" name="csrf_token" value="<?= htmlspecialchars($_SESSION['csrf_token']) ?>">
|
||||||
|
<input type="hidden" name="section" value="formulaire">
|
||||||
|
|
||||||
|
<label class="param-checkbox">
|
||||||
|
<input type="checkbox" name="restricted_files_enabled" value="1"
|
||||||
|
<?= ($siteSettings['restricted_files_enabled'] ?? '0') === '1' ? 'checked' : '' ?>>
|
||||||
|
<span>
|
||||||
|
<strong>Activer la restriction d'accès</strong><br>
|
||||||
|
<small>Pour les TFE de type "Interne", masquer les fichiers et exiger une demande d'accès par email. Les métadonnées et le résumé restent visibles publiquement.</small>
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<button type="submit" class="btn btn--primary">Enregistrer</button>
|
||||||
|
</form>
|
||||||
|
</fieldset>
|
||||||
|
|
||||||
|
<!-- ── Degré d'ouverture ── -->
|
||||||
|
<fieldset>
|
||||||
|
<legend>Degré d'ouverture</legend>
|
||||||
|
<p>Options de visibilité disponibles dans le formulaire d'ajout de TFE.</p>
|
||||||
|
<p class="param-note">L'option <strong>Libre</strong> ne sera activée qu'à partir de l'année académique prochaine.</p>
|
||||||
|
|
||||||
|
<form method="post" action="actions/settings.php" class="param-form">
|
||||||
|
<input type="hidden" name="csrf_token" value="<?= htmlspecialchars($_SESSION['csrf_token']) ?>">
|
||||||
|
<input type="hidden" name="section" value="formulaire">
|
||||||
|
|
||||||
|
<label class="param-checkbox">
|
||||||
|
<input type="checkbox" name="access_type_interdit_enabled" value="1"
|
||||||
|
<?= ($siteSettings['access_type_interdit_enabled'] ?? '1') === '1' ? 'checked' : '' ?>>
|
||||||
|
<span>
|
||||||
|
<strong>Interdit</strong><br>
|
||||||
|
<small>TFE non disponible en physique ni sur le site</small>
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<label class="param-checkbox">
|
||||||
|
<input type="checkbox" name="access_type_interne_enabled" value="1"
|
||||||
|
<?= ($siteSettings['access_type_interne_enabled'] ?? '1') === '1' ? 'checked' : '' ?>>
|
||||||
|
<span>
|
||||||
|
<strong>Interne</strong><br>
|
||||||
|
<small>TFE accessible uniquement sur place en physique</small>
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<label class="param-checkbox param-checkbox--disabled">
|
||||||
|
<input type="checkbox" name="access_type_libre_enabled" value="1"
|
||||||
|
<?= ($siteSettings['access_type_libre_enabled'] ?? '0') === '1' ? 'checked' : '' ?>>
|
||||||
|
<span>
|
||||||
|
<strong>Libre</strong><br>
|
||||||
|
<small>Libre accès — disponible à partir de l'année académique prochaine</small>
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<button type="submit" class="btn btn--primary">Enregistrer</button>
|
||||||
|
</form>
|
||||||
|
</fieldset>
|
||||||
|
|
||||||
|
<!-- ── Types de travaux ── -->
|
||||||
|
<fieldset>
|
||||||
|
<legend>Types de travaux</legend>
|
||||||
|
<p>Active ou désactive les types de travaux dans les formulaires et la consultation. Un type désactivé ne peut plus être soumis ni affiché sur le site.</p>
|
||||||
|
<p class="param-note">Le type <strong>TFE</strong> est toujours actif et ne peut pas être désactivé.</p>
|
||||||
|
|
||||||
|
<form method="post" action="actions/settings.php" class="param-form">
|
||||||
|
<input type="hidden" name="csrf_token" value="<?= htmlspecialchars($_SESSION['csrf_token']) ?>">
|
||||||
|
<input type="hidden" name="section" value="objet_types">
|
||||||
|
|
||||||
|
<label class="param-checkbox param-checkbox--disabled">
|
||||||
|
<input type="checkbox" disabled checked>
|
||||||
|
<span>
|
||||||
|
<strong>TFE</strong><br>
|
||||||
|
<small>Travail de fin d'études — toujours actif</small>
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<label class="param-checkbox">
|
||||||
|
<input type="checkbox" name="objet_these_enabled" value="1"
|
||||||
|
<?= ($siteSettings['objet_these_enabled'] ?? '1') === '1' ? 'checked' : '' ?>>
|
||||||
|
<span>
|
||||||
|
<strong>Thèse</strong><br>
|
||||||
|
<small>Thèses doctorales</small>
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<label class="param-checkbox">
|
||||||
|
<input type="checkbox" name="objet_frart_enabled" value="1"
|
||||||
|
<?= ($siteSettings['objet_frart_enabled'] ?? '1') === '1' ? 'checked' : '' ?>>
|
||||||
|
<span>
|
||||||
|
<strong>Frart</strong><br>
|
||||||
|
<small>Formation de recherche en art</small>
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<button type="submit" class="btn btn--primary">Enregistrer</button>
|
||||||
|
</form>
|
||||||
|
</fieldset>
|
||||||
|
|
||||||
|
<!-- ── Structure du formulaire ── -->
|
||||||
|
<fieldset>
|
||||||
|
<legend>Structure du Formulaire</legend>
|
||||||
|
<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
|
<?php
|
||||||
$blocks = $formHelpBlocks;
|
$blocks = $formHelpBlocks;
|
||||||
@@ -232,6 +235,7 @@
|
|||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
</div>
|
</div>
|
||||||
|
</fieldset>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
</main>
|
</main>
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
<input type="hidden" name="csrf_token" value="<?= htmlspecialchars($_SESSION['csrf_token']) ?>">
|
<input type="hidden" name="csrf_token" value="<?= htmlspecialchars($_SESSION['csrf_token']) ?>">
|
||||||
<input type="hidden" name="action" value="disable_maintenance">
|
<input type="hidden" name="action" value="disable_maintenance">
|
||||||
<input type="hidden" name="redirect" value="/admin/parametres.php">
|
<input type="hidden" name="redirect" value="/admin/parametres.php">
|
||||||
<button type="submit">Désactiver la maintenance</button>
|
<button type="submit" class="btn btn--secondary">Désactiver la maintenance</button>
|
||||||
</form>
|
</form>
|
||||||
<?php else: ?>
|
<?php else: ?>
|
||||||
<p>Site public : <strong>en ligne</strong></p>
|
<p>Site public : <strong>en ligne</strong></p>
|
||||||
|
|||||||
Reference in New Issue
Block a user