mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-06-26 00:29:18 +02:00
schema: validate against new TFE field spec
- add exemplaire_baiu, exemplaire_erg, cc4r, remarks; - add is_ulb to jury; - split jury_lecteurs into interne/externe in view; - refactor admin edit form with backoffice fields; - update public fiche to show promoteur ULB and split lecteurs
This commit is contained in:
@@ -44,6 +44,7 @@
|
||||
$juryPresident = null;
|
||||
$juryPromoteur = null;
|
||||
$juryPromoteurExt = 0;
|
||||
$juryPromoteurUlb = 0;
|
||||
$juryLecteurs = [];
|
||||
foreach ($jury as $jm) {
|
||||
if ($jm['role'] === 'president') {
|
||||
@@ -51,6 +52,7 @@
|
||||
} elseif ($jm['role'] === 'promoteur') {
|
||||
$juryPromoteur = $jm['name'];
|
||||
$juryPromoteurExt = (int)$jm['is_external'];
|
||||
$juryPromoteurUlb = (int)($jm['is_ulb'] ?? 0);
|
||||
} elseif ($jm['role'] === 'lecteur') {
|
||||
$juryLecteurs[] = $jm;
|
||||
}
|
||||
@@ -216,8 +218,54 @@
|
||||
include APP_ROOT . '/templates/partials/form/fieldset-metadata.php';
|
||||
?>
|
||||
|
||||
<!-- ═══════════════════ Note contextuelle ═══════════════════ -->
|
||||
<!-- ═══════════════════ Backoffice ═══════════════════ -->
|
||||
<fieldset>
|
||||
<legend>Backoffice</legend>
|
||||
|
||||
<div class="admin-form-group">
|
||||
<label for="jury_points">Points :</label>
|
||||
<input type="number" id="jury_points" name="jury_points"
|
||||
value="<?= htmlspecialchars($currentRaw['jury_points'] ?? '') ?>"
|
||||
step="0.01" min="0" max="20" placeholder="sur 20">
|
||||
<small>Note du jury (interne, non visible publiquement).</small>
|
||||
</div>
|
||||
|
||||
<div class="admin-form-group">
|
||||
<label for="remarks">Remarques :</label>
|
||||
<textarea id="remarks" name="remarks" rows="4"><?= htmlspecialchars($currentRaw['remarks'] ?? '') ?></textarea>
|
||||
<small>Notes internes (non visibles publiquement).</small>
|
||||
</div>
|
||||
|
||||
<div class="admin-form-group">
|
||||
<label class="admin-checkbox-label">
|
||||
<input type="checkbox" name="exemplaire_baiu" value="1"
|
||||
<?= !empty($currentRaw['exemplaire_baiu']) ? 'checked' : '' ?>>
|
||||
Exemplaire physique BAIU
|
||||
</label>
|
||||
<small>Case logistique : cocher si un exemplaire physique est disponible à la BAIU.</small>
|
||||
</div>
|
||||
|
||||
<div class="admin-form-group">
|
||||
<label class="admin-checkbox-label">
|
||||
<input type="checkbox" name="exemplaire_erg" value="1"
|
||||
<?= !empty($currentRaw['exemplaire_erg']) ? 'checked' : '' ?>>
|
||||
Exemplaire physique ERG
|
||||
</label>
|
||||
<small>Case logistique : cocher si un exemplaire physique est disponible à l'ERG.</small>
|
||||
</div>
|
||||
|
||||
<div class="admin-form-group">
|
||||
<label class="admin-checkbox-label">
|
||||
<input type="checkbox" name="cc4r" value="1"
|
||||
<?= !empty($currentRaw['cc4r']) ? 'checked' : '' ?>>
|
||||
CC4r accepté
|
||||
</label>
|
||||
<small>Conditions collectives de réutilisation.</small>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<!-- ═══════════════════ Note contextuelle ═══════════════════ -->
|
||||
<fieldset id="section-context-note">
|
||||
<legend>Note contextuelle</legend>
|
||||
<div>
|
||||
<label for="context_note">Note contextuelle :</label>
|
||||
|
||||
@@ -57,6 +57,15 @@
|
||||
<?php if ($thesis['supervisors']): ?>
|
||||
<dt>Promoteur·ice(s)</dt><dd><?= htmlspecialchars($thesis['supervisors']) ?></dd>
|
||||
<?php endif; ?>
|
||||
<?php if (!empty($thesis['jury_promoteurs_ulb'])): ?>
|
||||
<dt>Promoteur·ice(s) ULB</dt><dd><?= htmlspecialchars($thesis['jury_promoteurs_ulb']) ?></dd>
|
||||
<?php endif; ?>
|
||||
<?php if (!empty($thesis['jury_lecteurs_internes'])): ?>
|
||||
<dt>Lecteur·ices (interne)</dt><dd><?= htmlspecialchars($thesis['jury_lecteurs_internes']) ?></dd>
|
||||
<?php endif; ?>
|
||||
<?php if (!empty($thesis['jury_lecteurs_externes'])): ?>
|
||||
<dt>Lecteur·ices (externe)</dt><dd><?= htmlspecialchars($thesis['jury_lecteurs_externes']) ?></dd>
|
||||
<?php endif; ?>
|
||||
</dl>
|
||||
</section>
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ $synopsisExtra = $synopsisExtra ?? '';
|
||||
include APP_ROOT . '/templates/partials/form/text-field.php';
|
||||
?>
|
||||
<?php
|
||||
$name = 'mail'; $label = 'Contact(s) (optionnel) [mail/site/insta/etc.] :'; $value = $oldFn('mail');
|
||||
$name = 'mail'; $label = 'Contact visible (optionnel) [mail/site/insta/etc.] :'; $value = $oldFn('mail');
|
||||
$attrs = ['autocomplete' => 'email'];
|
||||
include APP_ROOT . '/templates/partials/form/text-field.php';
|
||||
?>
|
||||
@@ -69,9 +69,9 @@ $synopsisExtra = $synopsisExtra ?? '';
|
||||
<label class="admin-checkbox-label">
|
||||
<input type="checkbox" name="contact_public" value="1"
|
||||
<?= !empty($formData['contact_public']) ? 'checked' : '' ?>>
|
||||
Je veux que mon contact soit accessible à toustes depuis la plateforme xamxam
|
||||
Rendre mon contact visible publiquement sur la fiche du TFE
|
||||
</label>
|
||||
<small>Si cette case est cochée, votre contact apparaîtra sur la page publique de votre TFE.</small>
|
||||
<small>Si coché, votre contact apparaîtra sur la page publique. L'adresse est toujours conservée en interne.</small>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
* Variables consumed (all optional — defaults to empty/add-mode):
|
||||
* $juryPresident string|null President name
|
||||
* $juryPromoteur string|null Promoteur name
|
||||
* $juryPromoteurUlb int 1 if promoteur is ULB, 0 otherwise
|
||||
* $juryPromoteurExt int 1 if promoteur is external, 0 otherwise
|
||||
* $juryLecteurs array Each element: ['name' => string, 'is_external' => int]
|
||||
*
|
||||
@@ -16,6 +17,7 @@
|
||||
$juryPresident = $juryPresident ?? null;
|
||||
$juryPromoteur = $juryPromoteur ?? null;
|
||||
$juryPromoteurExt = $juryPromoteurExt ?? 0;
|
||||
$juryPromoteurUlb = $juryPromoteurUlb ?? 0;
|
||||
$juryLecteurs = $juryLecteurs ?? [];
|
||||
|
||||
// In add-mode, repopulate from flash form data when helpers are available.
|
||||
@@ -51,6 +53,11 @@ $juryIdx = max(count($juryLecteurs), 1);
|
||||
<?= $juryPromoteurExt ? 'checked' : '' ?>
|
||||
aria-label="Promoteur·ice — externe"> Externe
|
||||
</label>
|
||||
<label class="admin-checkbox-label admin-jury-ext">
|
||||
<input type="checkbox" name="jury_promoteur_ulb" value="1"
|
||||
<?= $juryPromoteurUlb ? 'checked' : '' ?>
|
||||
aria-label="Promoteur·ice — ULB"> ULB
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -141,6 +141,23 @@
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (!empty($promoteursUlb)): ?>
|
||||
<div>
|
||||
<dt>Promoteur·ice ULB :</dt>
|
||||
<dd><?php
|
||||
$links = array_map(
|
||||
fn($n) => '<a href="/search?query=' .
|
||||
urlencode($n) .
|
||||
'">' .
|
||||
htmlspecialchars($n) .
|
||||
"</a>",
|
||||
$promoteursUlb,
|
||||
);
|
||||
echo implode(", ", $links);
|
||||
?></dd>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (!empty($juryPresidents)): ?>
|
||||
<div>
|
||||
<dt>Président·e du jury :</dt>
|
||||
@@ -158,9 +175,9 @@
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (!empty($juryLecteurs)): ?>
|
||||
<?php if (!empty($juryLecteursInternes)): ?>
|
||||
<div>
|
||||
<dt>Lecteur·ices :</dt>
|
||||
<dt>Lecteur·ice(s) interne :</dt>
|
||||
<dd><?php
|
||||
$links = array_map(
|
||||
fn($n) => '<a href="/search?query=' .
|
||||
@@ -168,7 +185,24 @@
|
||||
'">' .
|
||||
htmlspecialchars($n) .
|
||||
"</a>",
|
||||
$juryLecteurs,
|
||||
$juryLecteursInternes,
|
||||
);
|
||||
echo implode(", ", $links);
|
||||
?></dd>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (!empty($juryLecteursExternes)): ?>
|
||||
<div>
|
||||
<dt>Lecteur·ice(s) externe :</dt>
|
||||
<dd><?php
|
||||
$links = array_map(
|
||||
fn($n) => '<a href="/search?query=' .
|
||||
urlencode($n) .
|
||||
'">' .
|
||||
htmlspecialchars($n) .
|
||||
"</a>",
|
||||
$juryLecteursExternes,
|
||||
);
|
||||
echo implode(", ", $links);
|
||||
?></dd>
|
||||
|
||||
Reference in New Issue
Block a user