mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-08-10 07:11:18 +02:00
fix: remove redundant query= param from filter-specific metadata links on TFE page
Clicking orientation, AP program, finality, year, format, or keyword links on the TFE page was passing both a dedicated filter param AND a query= param. The query= text search doesn't look at the filter columns (orientation, ap_program, etc.), so the AND combination yielded zero results when the filter value didn't appear in title/authors/etc fields. Also fix the language link: it was passing language as query= which searches only title/authors/etc, not the languages column. Now uses the dedicated language= param (DB layer already supported it, and collectSearchParams now collects it).
This commit is contained in:
@@ -2,3 +2,5 @@
|
|||||||
|
|
||||||
- [x] Fix relinked file not appearing in FilePond UI: switch to ID-based input lookup
|
- [x] Fix relinked file not appearing in FilePond UI: switch to ID-based input lookup
|
||||||
- [x] Fix student name popover overflowing below viewport: clamp position so popover stays within screen bounds
|
- [x] Fix student name popover overflowing below viewport: clamp position so popover stays within screen bounds
|
||||||
|
- [x] Fix orientation (and other filter) metadata links on TFE page leading to empty search: remove redundant `query=` param
|
||||||
|
- [x] Fix language metadata link using wrong `query=` param instead of dedicated `language=` filter
|
||||||
|
|||||||
@@ -770,7 +770,6 @@
|
|||||||
/* ── Collapsible filter controls ─────────────────────────────────── */
|
/* ── Collapsible filter controls ─────────────────────────────────── */
|
||||||
.search-filters-toggle {
|
.search-filters-toggle {
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
border-bottom: 1px solid var(--border-secondary);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.search-filters-summary {
|
.search-filters-summary {
|
||||||
|
|||||||
@@ -13,7 +13,6 @@
|
|||||||
.tfe-content-row {
|
.tfe-content-row {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: 49vw 1fr;
|
grid-template-columns: 49vw 1fr;
|
||||||
/* gap: var(--space-xl); */
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
min-height: 0;
|
min-height: 0;
|
||||||
@@ -24,6 +23,8 @@
|
|||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
padding: var(--space-xl) var(--space-m) var(--space-xl) var(--space-m);
|
padding: var(--space-xl) var(--space-m) var(--space-xl) var(--space-m);
|
||||||
|
padding-right: 0.5ch;
|
||||||
|
gap: 1ch;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tfe-right-column {
|
.tfe-right-column {
|
||||||
@@ -34,13 +35,6 @@
|
|||||||
padding: var(--space-xl) var(--space-m) var(--space-xl) var(--space-m);
|
padding: var(--space-xl) var(--space-m) var(--space-xl) var(--space-m);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Left column: stacks author, title, meta, synopsis — scrolls independently */
|
|
||||||
.tfe-left-column {
|
|
||||||
gap: var(--space-m);
|
|
||||||
/* to space the edge of the text and the scrollbar */
|
|
||||||
padding-right: 0.5ch;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Files container inside right column — flex kept for PDF expand-to-fill behavior */
|
/* Files container inside right column — flex kept for PDF expand-to-fill behavior */
|
||||||
.tfe-files {
|
.tfe-files {
|
||||||
display: grid;
|
display: grid;
|
||||||
@@ -555,6 +549,7 @@ body.pdf-viewer-open {
|
|||||||
.tfe-left-column,
|
.tfe-left-column,
|
||||||
.tfe-right-column {
|
.tfe-right-column {
|
||||||
overflow-y: visible;
|
overflow-y: visible;
|
||||||
|
padding: var(--space-3xs);
|
||||||
}
|
}
|
||||||
|
|
||||||
.tfe-title {
|
.tfe-title {
|
||||||
@@ -569,6 +564,11 @@ body.pdf-viewer-open {
|
|||||||
height: auto;
|
height: auto;
|
||||||
min-height: unset;
|
min-height: unset;
|
||||||
background: color-mix(in srgb, var(--accent-secondary) 92%, #000 8%);
|
background: color-mix(in srgb, var(--accent-secondary) 92%, #000 8%);
|
||||||
|
border: none;
|
||||||
|
border-radius: 0;
|
||||||
|
}
|
||||||
|
.pdf-toolbar {
|
||||||
|
border-radius: 0 0 var(--radius) var(--radius);
|
||||||
}
|
}
|
||||||
|
|
||||||
.tfe-file-iframe {
|
.tfe-file-iframe {
|
||||||
|
|||||||
@@ -1018,7 +1018,7 @@
|
|||||||
|
|
||||||
var input = document.getElementById("tfe-files-input");
|
var input = document.getElementById("tfe-files-input");
|
||||||
console.log(
|
console.log(
|
||||||
"[pt-relink] looking for input | inputId=tfe-files-input | found=" + !!input,
|
`[pt-relink] looking for input | inputId=tfe-files-input | found=${!!input}`,
|
||||||
);
|
);
|
||||||
var closeModal = () => {
|
var closeModal = () => {
|
||||||
var modal = document.getElementById("peertube-relink-modal");
|
var modal = document.getElementById("peertube-relink-modal");
|
||||||
|
|||||||
@@ -356,6 +356,9 @@ class SearchController
|
|||||||
if (!empty($_GET['keyword'])) {
|
if (!empty($_GET['keyword'])) {
|
||||||
$params['keyword'] = (string) $_GET['keyword'];
|
$params['keyword'] = (string) $_GET['keyword'];
|
||||||
}
|
}
|
||||||
|
if (!empty($_GET['language'])) {
|
||||||
|
$params['language'] = (string) $_GET['language'];
|
||||||
|
}
|
||||||
|
|
||||||
return $params;
|
return $params;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,28 +18,28 @@
|
|||||||
<?php if (!empty($data["orientation"])): ?>
|
<?php if (!empty($data["orientation"])): ?>
|
||||||
<p class="tfe-meta-item">
|
<p class="tfe-meta-item">
|
||||||
<span class="tfe-meta-label">Orientation :</span>
|
<span class="tfe-meta-label">Orientation :</span>
|
||||||
<a href="/search?orientation=<?= urlencode($data["orientation"]) ?>&query=<?= urlencode($data["orientation"]) ?>"><?= htmlspecialchars($data["orientation"]) ?></a>
|
<a href="/search?orientation=<?= urlencode($data["orientation"]) ?>"><?= htmlspecialchars($data["orientation"]) ?></a>
|
||||||
</p>
|
</p>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
<?php if (!empty($data["ap_program"])): ?>
|
<?php if (!empty($data["ap_program"])): ?>
|
||||||
<p class="tfe-meta-item">
|
<p class="tfe-meta-item">
|
||||||
<span class="tfe-meta-label">Atelier pluridisciplinaire :</span>
|
<span class="tfe-meta-label">Atelier pluridisciplinaire :</span>
|
||||||
<a href="/search?ap_program=<?= urlencode($data["ap_program"]) ?>&query=<?= urlencode($data["ap_program"]) ?>"><?= htmlspecialchars($data["ap_program"]) ?></a>
|
<a href="/search?ap_program=<?= urlencode($data["ap_program"]) ?>"><?= htmlspecialchars($data["ap_program"]) ?></a>
|
||||||
</p>
|
</p>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
<?php if (!empty($data["finality_type"])): ?>
|
<?php if (!empty($data["finality_type"])): ?>
|
||||||
<p class="tfe-meta-item">
|
<p class="tfe-meta-item">
|
||||||
<span class="tfe-meta-label">Finalité :</span>
|
<span class="tfe-meta-label">Finalité :</span>
|
||||||
<a href="/search?finality=<?= urlencode($data["finality_type"]) ?>&query=<?= urlencode($data["finality_type"]) ?>"><?= htmlspecialchars($data["finality_type"]) ?></a>
|
<a href="/search?finality=<?= urlencode($data["finality_type"]) ?>"><?= htmlspecialchars($data["finality_type"]) ?></a>
|
||||||
</p>
|
</p>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
<?php if (!empty($data["year"])): ?>
|
<?php if (!empty($data["year"])): ?>
|
||||||
<p class="tfe-meta-item">
|
<p class="tfe-meta-item">
|
||||||
<span class="tfe-meta-label">Date :</span>
|
<span class="tfe-meta-label">Date :</span>
|
||||||
<a href="/search?year=<?= urlencode($data["year"]) ?>&query=<?= urlencode($data["year"]) ?>"><?= htmlspecialchars($data["year"]) ?></a>
|
<a href="/search?year=<?= urlencode($data["year"]) ?>"><?= htmlspecialchars($data["year"]) ?></a>
|
||||||
</p>
|
</p>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
@@ -69,7 +69,7 @@
|
|||||||
<?php
|
<?php
|
||||||
$langs = array_map("trim", explode(",", $data["languages"]));
|
$langs = array_map("trim", explode(",", $data["languages"]));
|
||||||
$langLinks = array_map(
|
$langLinks = array_map(
|
||||||
fn($l) => '<a href="/search?query=' . urlencode($l) . '">' . htmlspecialchars(mb_strtolower($l)) . '</a>',
|
fn($l) => '<a href="/search?language=' . urlencode($l) . '">' . htmlspecialchars(mb_strtolower($l)) . '</a>',
|
||||||
$langs,
|
$langs,
|
||||||
);
|
);
|
||||||
echo implode(", ", $langLinks);
|
echo implode(", ", $langLinks);
|
||||||
@@ -83,7 +83,7 @@
|
|||||||
<?php
|
<?php
|
||||||
$fmts = array_map("trim", explode(",", $data["formats"]));
|
$fmts = array_map("trim", explode(",", $data["formats"]));
|
||||||
$fmtLinks = array_map(
|
$fmtLinks = array_map(
|
||||||
fn($f) => '<a href="/search?format=' . urlencode($f) . '&query=' . urlencode($f) . '">' . htmlspecialchars(mb_strtolower($f)) . '</a>',
|
fn($f) => '<a href="/search?format=' . urlencode($f) . '">' . htmlspecialchars(mb_strtolower($f)) . '</a>',
|
||||||
$fmts,
|
$fmts,
|
||||||
);
|
);
|
||||||
echo implode(", ", $fmtLinks);
|
echo implode(", ", $fmtLinks);
|
||||||
@@ -97,7 +97,7 @@
|
|||||||
<?php
|
<?php
|
||||||
$kws = array_map("trim", explode(",", $data["keywords"]));
|
$kws = array_map("trim", explode(",", $data["keywords"]));
|
||||||
$kwLinks = array_map(
|
$kwLinks = array_map(
|
||||||
fn($k) => '<a href="/search?keyword=' . urlencode($k) . '&query=' . urlencode($k) . '">' . htmlspecialchars(mb_strtolower($k)) . '</a>',
|
fn($k) => '<a href="/search?keyword=' . urlencode($k) . '">' . htmlspecialchars(mb_strtolower($k)) . '</a>',
|
||||||
$kws,
|
$kws,
|
||||||
);
|
);
|
||||||
echo implode(", ", $kwLinks);
|
echo implode(", ", $kwLinks);
|
||||||
|
|||||||
Reference in New Issue
Block a user