fix: remove broken flash-messages include from admin footer; make repertoire columns scrollable

This commit is contained in:
Pontoporeia
2026-04-21 19:25:54 +02:00
parent 19ef2a11dc
commit 362688c0fa
7 changed files with 42 additions and 24 deletions

18
TODO.md
View File

@@ -1,18 +1,4 @@
# TODO # TODO
## CSV importer AP/orientation standardisation - [x] Fix broken `flash-messages.php` include in admin footer
- [x] Migration 014: add `Récits et expérimentation` (RE) and `PACS` AP programs; set code `NS` on `Narration Spéculative` - [x] Make `.repertoire-col` columns scrollable instead of `.search-main`
- [x] Importer: replace code-only AP lookup with `resolveAP()` — handles full names, aliases (`L.I.E.N.S.`, case variants), code fallback
- [x] Importer: replace `orientationMap` code-only lookup with `resolveOrientation()` — handles full names, aliases (`Installation/Performance`, `Arts numériques`, `Design numérique`), legacy 2-letter codes, case-insensitive DB fallback
## Répertoire page fixes
- [x] Fix AP and orientation columns returning empty results when clicked
- [x] Fix multi-select being blocked (only one entry selectable at a time)
- [x] Fix all other columns becoming faded when AP/OR filter is selected
- [x] Always show all lookup-table values (ap/or/fi); only fade based on cross-dimension matched data when the column has at least one matched entry (`$colHasMatches` guard)
- [x] Make `main` the scrollable element instead of body
- [x] `common.css`: body is now `display:flex; flex-direction:column`, `main` gets `flex:1; min-height:0`
- [x] `public.css`: removed redundant `main` block, `.home-main` keeps its `overflow-y:auto`
- [x] `repertoire.css`: `.search-main` gets `min-height:0` for proper flex scroll containment
- [x] `common.css`: `.header-search-wrap` gets `flex-shrink:0`
- [x] `Database::getRepertoireFilterData`: `allAp`, `allOr`, `allFi` now sourced from actual published thesis joins (not bare lookup tables), matching the pattern used by years and keywords

View File

@@ -0,0 +1,32 @@
<?php
/**
* Toast fragment endpoint — HTMX target.
*
* Reads flash messages from the session and returns the toast markup.
* Returns an empty 204 when there is nothing to show.
* Called via hx-get on the #toast-region aside in the admin footer.
*/
require_once __DIR__ . '/../../bootstrap.php';
require_once __DIR__ . '/../../src/AdminAuth.php';
AdminAuth::requireLogin();
$flash = App::consumeFlash();
if (!$flash['error'] && !$flash['success']) {
http_response_code(204);
exit;
}
?>
<?php if ($flash['error']): ?>
<p class="toast toast--error" role="alert">
<span class="toast__icon" aria-hidden="true">⚠</span>
<?= htmlspecialchars($flash['error']) ?>
</p>
<?php endif; ?>
<?php if ($flash['success']): ?>
<p class="toast toast--success" role="status">
<span class="toast__icon" aria-hidden="true">✓</span>
<?= htmlspecialchars($flash['success']) ?>
</p>
<?php endif; ?>

View File

@@ -52,11 +52,11 @@ body > header nav {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
font-size: var(--step-2);
} }
.nav-logo { .nav-logo {
font-family: var(--font-display); font-family: var(--font-display);
font-size: var(--step-2);
letter-spacing: 0.12em; letter-spacing: 0.12em;
text-transform: uppercase; text-transform: uppercase;
color: var(--accent-foreground); color: var(--accent-foreground);
@@ -74,6 +74,7 @@ body > header nav {
.nav-left-links, .nav-left-links,
.nav-right-links { .nav-right-links {
font-family: var(--font-display);
display: flex; display: flex;
gap: var(--space-l); gap: var(--space-l);
align-items: center; align-items: center;
@@ -84,7 +85,7 @@ body > header nav {
body > header nav > a { body > header nav > a {
font-family: var(--font-display); font-family: var(--font-display);
font-size: var(--step-0); /*font-size: var(--step-0);*/
letter-spacing: 0.12em; letter-spacing: 0.12em;
text-transform: uppercase; text-transform: uppercase;
color: var(--accent-foreground); color: var(--accent-foreground);

View File

@@ -7,8 +7,7 @@
.search-main { .search-main {
flex: 1; flex: 1;
min-height: 0; min-height: 0;
overflow-y: auto; overflow: hidden;
overflow-x: hidden;
} }
/* ---- 6-column index layout ---- */ /* ---- 6-column index layout ---- */
@@ -17,7 +16,7 @@
grid-template-columns: 0.7fr 1.2fr 1.4fr 0.9fr 1.4fr 1fr; grid-template-columns: 0.7fr 1.2fr 1.4fr 0.9fr 1.4fr 1fr;
gap: 0; gap: 0;
padding: 0 var(--space-m); padding: 0 var(--space-m);
min-height: 100%; height: 100%;
} }
@media (max-width: 1024px) { @media (max-width: 1024px) {
@@ -56,6 +55,8 @@
.repertoire-col { .repertoire-col {
padding: var(--space-xs) var(--space-2xs) var(--space-l); padding: var(--space-xs) var(--space-2xs) var(--space-l);
overflow-y: auto;
overflow-x: hidden;
} }
.repertoire-col:last-child { .repertoire-col:last-child {

View File

@@ -4,7 +4,7 @@
@font-face { @font-face {
font-family: "Ductus"; font-family: "Ductus";
src: url("/assets/fonts/DuctusRegular.otf") format("opentype"); src: url("../fonts/DuctusRegular.otf") format("opentype");
font-style: normal; font-style: normal;
font-weight: 398; font-weight: 398;
font-display: swap; font-display: swap;

Binary file not shown.

View File

@@ -1,5 +1,3 @@
<?php include APP_ROOT . '/templates/partials/flash-messages.php'; ?>
<!-- Fixed toast container (bottom-center, always visible) --> <!-- Fixed toast container (bottom-center, always visible) -->
<div id="toast-container" aria-live="polite"></div> <div id="toast-container" aria-live="polite"></div>