tfe: hyperlink metadata values to repertoire.php with correct filter params

This commit is contained in:
Pontoporeia
2026-04-07 14:38:53 +02:00
parent 55c6ac21b8
commit e96ec572be
2 changed files with 38 additions and 10 deletions

View File

@@ -1,6 +1,10 @@
# TODO # TODO
## Done ## Done
- [x] TFE metadata values are hyperlinks to repertoire.php with correct filter/search params
- orientation → `or[]`, ap_program → `ap[]`, year → `fy[]`, keywords → `kw[]` (per keyword)
- languages, formats → `query=` (text search); jury members → `query=` (text search)
- access_type, license_type, file_size_info, context_note, baiu_link remain plain text/links as-is
- [x] Fix TFE page gradient bleed & layout collapse - [x] Fix TFE page gradient bleed & layout collapse
- [x] Scope `header` nav CSS in common.css to `body > header` (prevents article `<header>` inheriting gradient) - [x] Scope `header` nav CSS in common.css to `body > header` (prevents article `<header>` inheriting gradient)
- [x] Add `width: 100%` + `align-items: start` to `.tfe-layout` grid - [x] Add `width: 100%` + `align-items: start` to `.tfe-layout` grid

View File

@@ -30,35 +30,43 @@ extract($ctrl->handle());
<?php if (!empty($data['orientation'])): ?> <?php if (!empty($data['orientation'])): ?>
<div> <div>
<dt>Orientation :</dt> <dt>Orientation :</dt>
<dd><?= htmlspecialchars($data['orientation']) ?></dd> <dd><a href="/repertoire.php?or[]=<?= urlencode($data['orientation']) ?>"><?= htmlspecialchars($data['orientation']) ?></a></dd>
</div> </div>
<?php endif; ?> <?php endif; ?>
<?php if (!empty($data['ap_program'])): ?> <?php if (!empty($data['ap_program'])): ?>
<div> <div>
<dt>Atelier pluridisciplinaire :</dt> <dt>Atelier pluridisciplinaire :</dt>
<dd><?= htmlspecialchars($data['ap_program']) ?></dd> <dd><a href="/repertoire.php?ap[]=<?= urlencode($data['ap_program']) ?>"><?= htmlspecialchars($data['ap_program']) ?></a></dd>
</div> </div>
<?php endif; ?> <?php endif; ?>
<?php if (!empty($data['year'])): ?> <?php if (!empty($data['year'])): ?>
<div> <div>
<dt>Date :</dt> <dt>Date :</dt>
<dd><?= htmlspecialchars($data['year']) ?></dd> <dd><a href="/repertoire.php?fy[]=<?= urlencode($data['year']) ?>"><?= htmlspecialchars($data['year']) ?></a></dd>
</div> </div>
<?php endif; ?> <?php endif; ?>
<?php if (!empty($data['languages'])): ?> <?php if (!empty($data['languages'])): ?>
<div> <div>
<dt>Langue :</dt> <dt>Langue :</dt>
<dd><?= htmlspecialchars($data['languages']) ?></dd> <dd><?php
$langs = array_map('trim', explode(',', $data['languages']));
$langLinks = array_map(fn($l) => '<a href="/repertoire.php?query=' . urlencode($l) . '">' . htmlspecialchars($l) . '</a>', $langs);
echo implode(', ', $langLinks);
?></dd>
</div> </div>
<?php endif; ?> <?php endif; ?>
<?php if (!empty($data['formats'])): ?> <?php if (!empty($data['formats'])): ?>
<div> <div>
<dt>Format :</dt> <dt>Format :</dt>
<dd><?= htmlspecialchars($data['formats']) ?></dd> <dd><?php
$fmts = array_map('trim', explode(',', $data['formats']));
$fmtLinks = array_map(fn($f) => '<a href="/repertoire.php?query=' . urlencode($f) . '">' . htmlspecialchars($f) . '</a>', $fmts);
echo implode(', ', $fmtLinks);
?></dd>
</div> </div>
<?php endif; ?> <?php endif; ?>
@@ -72,35 +80,51 @@ extract($ctrl->handle());
<?php if (!empty($data['keywords'])): ?> <?php if (!empty($data['keywords'])): ?>
<div> <div>
<dt>Mots-clés :</dt> <dt>Mots-clés :</dt>
<dd><?= htmlspecialchars($data['keywords']) ?></dd> <dd><?php
$kws = array_map('trim', explode(',', $data['keywords']));
$kwLinks = array_map(fn($k) => '<a href="/repertoire.php?kw[]=' . urlencode($k) . '">' . htmlspecialchars($k) . '</a>', $kws);
echo implode(', ', $kwLinks);
?></dd>
</div> </div>
<?php endif; ?> <?php endif; ?>
<?php if (!empty($promoteursInternes)): ?> <?php if (!empty($promoteursInternes)): ?>
<div> <div>
<dt>Promoteur·ice interne :</dt> <dt>Promoteur·ice interne :</dt>
<dd><?= htmlspecialchars(implode(', ', $promoteursInternes)) ?></dd> <dd><?php
$links = array_map(fn($n) => '<a href="/repertoire.php?query=' . urlencode($n) . '">' . htmlspecialchars($n) . '</a>', $promoteursInternes);
echo implode(', ', $links);
?></dd>
</div> </div>
<?php endif; ?> <?php endif; ?>
<?php if (!empty($promoteursExternes)): ?> <?php if (!empty($promoteursExternes)): ?>
<div> <div>
<dt>Promoteur·ice externe :</dt> <dt>Promoteur·ice externe :</dt>
<dd><?= htmlspecialchars(implode(', ', $promoteursExternes)) ?></dd> <dd><?php
$links = array_map(fn($n) => '<a href="/repertoire.php?query=' . urlencode($n) . '">' . htmlspecialchars($n) . '</a>', $promoteursExternes);
echo implode(', ', $links);
?></dd>
</div> </div>
<?php endif; ?> <?php endif; ?>
<?php if (!empty($juryPresidents)): ?> <?php if (!empty($juryPresidents)): ?>
<div> <div>
<dt>Président·e du jury :</dt> <dt>Président·e du jury :</dt>
<dd><?= htmlspecialchars(implode(', ', $juryPresidents)) ?></dd> <dd><?php
$links = array_map(fn($n) => '<a href="/repertoire.php?query=' . urlencode($n) . '">' . htmlspecialchars($n) . '</a>', $juryPresidents);
echo implode(', ', $links);
?></dd>
</div> </div>
<?php endif; ?> <?php endif; ?>
<?php if (!empty($juryLecteurs)): ?> <?php if (!empty($juryLecteurs)): ?>
<div> <div>
<dt>Lecteur·ices :</dt> <dt>Lecteur·ices :</dt>
<dd><?= htmlspecialchars(implode(', ', $juryLecteurs)) ?></dd> <dd><?php
$links = array_map(fn($n) => '<a href="/repertoire.php?query=' . urlencode($n) . '">' . htmlspecialchars($n) . '</a>', $juryLecteurs);
echo implode(', ', $links);
?></dd>
</div> </div>
<?php endif; ?> <?php endif; ?>