mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-08-10 15:21:22 +02:00
tfe: redirect internal metadata links from /repertoire to /search
redirect internal metadata links from /repertoire to /search, add query param for search bar prefill, fix filter visibility on desktop redirect metadata links from /repertoire to /search, prefill search bar, fix filter visibility link metadata to /search, preserve keyword filter in form, show active keyword chip
This commit is contained in:
@@ -18,28 +18,28 @@
|
||||
<?php if (!empty($data["orientation"])): ?>
|
||||
<p class="tfe-meta-item">
|
||||
<span class="tfe-meta-label">Orientation :</span>
|
||||
<a href="/repertoire?or[]=<?= urlencode($data["orientation"]) ?>"><?= htmlspecialchars($data["orientation"]) ?></a>
|
||||
<a href="/search?orientation=<?= urlencode($data["orientation"]) ?>&query=<?= urlencode($data["orientation"]) ?>"><?= htmlspecialchars($data["orientation"]) ?></a>
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (!empty($data["ap_program"])): ?>
|
||||
<p class="tfe-meta-item">
|
||||
<span class="tfe-meta-label">Atelier pluridisciplinaire :</span>
|
||||
<a href="/repertoire?ap[]=<?= urlencode($data["ap_program"]) ?>"><?= htmlspecialchars($data["ap_program"]) ?></a>
|
||||
<a href="/search?ap_program=<?= urlencode($data["ap_program"]) ?>&query=<?= urlencode($data["ap_program"]) ?>"><?= htmlspecialchars($data["ap_program"]) ?></a>
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (!empty($data["finality_type"])): ?>
|
||||
<p class="tfe-meta-item">
|
||||
<span class="tfe-meta-label">Finalité :</span>
|
||||
<a href="/repertoire?fi[]=<?= urlencode($data["finality_type"]) ?>"><?= htmlspecialchars($data["finality_type"]) ?></a>
|
||||
<a href="/search?finality=<?= urlencode($data["finality_type"]) ?>&query=<?= urlencode($data["finality_type"]) ?>"><?= htmlspecialchars($data["finality_type"]) ?></a>
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (!empty($data["year"])): ?>
|
||||
<p class="tfe-meta-item">
|
||||
<span class="tfe-meta-label">Date :</span>
|
||||
<a href="/repertoire?fy[]=<?= urlencode($data["year"]) ?>"><?= htmlspecialchars($data["year"]) ?></a>
|
||||
<a href="/search?year=<?= urlencode($data["year"]) ?>&query=<?= urlencode($data["year"]) ?>"><?= htmlspecialchars($data["year"]) ?></a>
|
||||
</p>
|
||||
<?php endif; ?>
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
<?php
|
||||
$fmts = array_map("trim", explode(",", $data["formats"]));
|
||||
$fmtLinks = array_map(
|
||||
fn($f) => '<a href="/search?query=' . urlencode($f) . '">' . htmlspecialchars(mb_strtolower($f)) . '</a>',
|
||||
fn($f) => '<a href="/search?format=' . urlencode($f) . '&query=' . urlencode($f) . '">' . htmlspecialchars(mb_strtolower($f)) . '</a>',
|
||||
$fmts,
|
||||
);
|
||||
echo implode(", ", $fmtLinks);
|
||||
@@ -97,7 +97,7 @@
|
||||
<?php
|
||||
$kws = array_map("trim", explode(",", $data["keywords"]));
|
||||
$kwLinks = array_map(
|
||||
fn($k) => '<a href="/repertoire?kw[]=' . urlencode($k) . '">' . htmlspecialchars(mb_strtolower($k)) . '</a>',
|
||||
fn($k) => '<a href="/search?keyword=' . urlencode($k) . '&query=' . urlencode($k) . '">' . htmlspecialchars(mb_strtolower($k)) . '</a>',
|
||||
$kws,
|
||||
);
|
||||
echo implode(", ", $kwLinks);
|
||||
|
||||
Reference in New Issue
Block a user