Commit Graph
242 Commits
Author SHA1 Message Date
Pontoporeia 6e1d54511d 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).
2026-07-10 17:20:21 +02:00
Pontoporeia ed19e30cf0 repertoire keyword column: smaller font (step--1), tighter line-height (1.15), no hyphenation 2026-07-10 15:59:48 +02:00
Pontoporeia c67262673f paramètres: fix logs Copier button scrolling out of view on horizontal scroll
Wrap .log-output and the copy button in a .log-output-wrapper div
with position:relative, so the button sits outside the overflow-x:auto
scroll container and stays fixed at the top-right corner.
2026-07-10 15:21:29 +02:00
Pontoporeia 3e3d829d11 fix: website iframe overlay — icon button bottom-right, no blur, tooltip 2026-07-10 15:18:42 +02:00
Pontoporeia 3d5d972ad0 fix TOC invisible: add open attr to details.toc — extractToc works but closed details + desktop pointer-events:none hid content; also make apropos TOC dynamic
fix: website iframe overlay — icon button bottom-right, no blur
2026-07-10 15:18:42 +02:00
Pontoporeia 018d699ebd apropos: dynamic TOC via extractToc, HeadingPermalinkExtension, debug logging for TOC diagnosis 2026-07-10 15:07:14 +02:00
Pontoporeia 2461f526bf fix: prevent line breaks before punctuation in TFE titles and meta labels
- Override aggressive word-break: break-word from base.css
  with word-break: normal + overflow-wrap: break-word + hyphens: auto
  on .tfe-title, .tfe-author, .tfe-meta-item
- Replace regular spaces before colons with   in all meta labels
  (French typographic rule: non-breaking space before double punctuation)
- Rebuild tfe.min.css
2026-07-10 14:47:52 +02:00
Pontoporeia f427352a71 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
2026-07-10 14:16:36 +02:00
Pontoporeia f5a7d70fbc tfe: wrap website iframe in overlay-style div with Site web badge, clearer link text 2026-07-10 14:16:05 +02:00
Pontoporeia c513ad2545 TOC: extract h1/h2/h3, indent sub-levels in charte/licence sidebar 2026-07-10 14:16:05 +02:00
Pontoporeia ec9c140ba2 repertoire: HTMX OOB swaps for filter columns + fix fading edge cases
Switch from swapping the entire #repertoire-index block to targeted
hx-swap-oob swaps: only the <ul> list elements are replaced, while
section headers and accordion chrome stay in the DOM untouched.

- Filter column <ul>s get IDs (rep-list-years, rep-list-ap, etc.)
  and render with hx-swap-oob=true on HTMX requests
- Students <ul> gets id=rep-students as main swap target
- Filter buttons now target #rep-students instead of #repertoire-index
- Server sets $isOob=true when rendering HTMX partial responses
- Accordion re-init on swap no longer needed (headers never replaced)
- Scroll-restore updated to capture/restore per <ul> ID

Fading fixes:
- Restore rep-entry--faded class with simplified logic: any active
  filter fades entries whose matched flag is false (removed the
  $colHasMatch gate that prevented fading when a column had no matches)
- Add $noResults guard: when matched_ids is empty (zero theses match
  all active filters), force-fade all non-selected entries across ALL
  columns. This covers the keyword edge case where per-column matched
  is computed excluding the keyword filter (many-to-many), causing
  keywords to appear valid even though the full intersection is empty.
2026-07-10 12:59:12 +02:00
Pontoporeia f86deaf02f repertoire: remove matched-first sorting and faded/disabled system for filter entries
Remove the system that sorted valid (matched) filter entries to the top and
faded/disabled unmatched ones when any filter was active. Entries now stay in
their natural alphabetical/numeric order regardless of selection state.

- Drop usort calls that reordered entries by matched status
- Simplify repFilterEntry: remove anyActive and colHasMatch params
- Remove colHasMatches computation
- Remove rep-entry--faded CSS rule
- All filter buttons remain clickable at all times
2026-07-10 12:35:45 +02:00
Pontoporeia b9c7d6c663 fix: sort repertoire Années column reverse chronological (newest first) 2026-07-10 12:29:08 +02:00
Pontoporeia 08a9b7309f fix: locked_year cleared on edit — populate edit dialog field
The openEditDialog JS function didn't populate the locked_year input
in the edit dialog, and the PHP template didn't pass locked_year as an
argument. Any edit to a link (even just changing the name) would clear
the locked academic year to NULL.

- Pass $linkLockedYear as 5th argument to openEditDialog in the template
- Accept and populate edit-locked-year input in the JS handler
2026-07-10 11:56:27 +02:00
Pontoporeia 28c0efe755 fix: masquer le bloc "Durée" sur la page TFE quand aucune durée n'est encodée 2026-07-10 11:56:27 +02:00
Pontoporeia b0925d9cfa Close TOC and Filtres details elements by default on mobile 2026-07-10 11:56:27 +02:00
Pontoporeia 22a49f7cb6 fix: unify CSV import/export columns, fix import JS error, fix createThesis VALUES
- Fix createThesis SQL: extra ? placeholder in VALUES (27 values for 26 columns)
- Add createThesis integration tests to catch column/value mismatches
- Add CSV_COLUMNS as single source of truth in ExportController, deriving
  csvHeaders() and positional fallback from it
- Add missing columns to export query + CSV: duration_pages, duration_minutes,
  has_annexes, license_custom, contact_visible, objet
- Add missing columns to import INSERT: license_id, license_custom, cc2r,
  exemplaire_baiu, exemplaire_erg, objet, contact_visible, duration_pages,
  duration_minutes, has_annexes
- Resolve license name → license_id during import
- Fix XamxamInitFilePonds: add file-upload-filepond.js to admin-entry.js
  so FilePond initialization code is available on the admin list page
- Add FilePond vendor CSS to admin.min.css bundle (import dialog styling)
- Generate .admin-file-hint from csvHeaders() instead of hardcoded stale list
- Use positional fallback from CSV_COLUMNS for import cell parsing
2026-07-10 11:56:27 +02:00
Pontoporeia ce936e3b71 fix: various styling fixes; simplify tfe.php structure and CSS with grid 2026-07-10 11:56:27 +02:00
Pontoporeia 20873f94af pdf-viewer: various visual and usability changes
- fix page nav buttons, smaller default pages, violet bg

  - Build toolbar after renderAllPages so it queries existing canvases;
    query canvases fresh in the scroll handler so page tracking works
    after re-render (zoom in/out).
  - Default data-pdf-scale 0.85 (JS fallback 0.8) so pages are a bit
    smaller by default.
  - Add dark transparent violet background (accent-secondary 22%) to
    .pdf-expanded, behind the pages.

  - expand to fill column top-to-bottom via CSS flex

    Use a flex chain (.tfe-files flex:1, .tfe-file-item:has(.pdf-expanded)
    flex:1) so the expanded PDF wrapper fills the right column from under
    the header to the bottom of the viewport, instead of viewport-based
    clamp math that didn't account for the header height.

  - fill right column, center pages, freeze column on expand

  The expanded viewer now stays inside the right column instead of
  growing the page: the column switches to overflow:hidden while the
  PDF panel scrolls internally. Pages are centered horizontally via
  flexbox align-items: center.

  - fix toolbar not full-width, hide sibling file items

  The toolbar was constrained by the parent's align-items:center; fixed
  with align-self:stretch. Hiding sibling .tfe-file-item elements when
  a PDF is expanded prevents them from rendering above the overlay.

  - disable overscroll on expanded view

  - use overscroll-behavior-y on container, none on toolbar

  - disable body overscroll via .pdf-viewer-open class

  - mobile full-viewport, iframe matches pdf height

  - mobile overlay above everything via position:fixed

  - opaque dark-violet bg on mobile overlay

  - tfe: add 'Open in new tab' link above website iframes

  - trim column padding when expanded for more vertical space

  - 5% zoom increments, subtle padding on expanded column

  - prevent horizontal overflow/overscroll
2026-07-08 22:41:52 +02:00
Pontoporeia 82d8eff512 Fix lint: use IterableCallbackReturn — wrap forEach body in braces 2026-07-08 15:14:20 +02:00
Pontoporeia f6468c6d44 Always show durée and annexes fields in recapitulatif and public TFE pages
Previously these fields were conditionally hidden when empty, making
  it unclear whether the data was simply not entered. Now they always
  display: durée shows '–' when no data, annexes shows 'Non'.
2026-07-08 15:05:35 +02:00
Pontoporeia 6ecab96137 fieldset-academic: dim locked year field, remove required asterisk
When locked_year is set, render the Année label+input inline with
opacity:0.55 instead of via text-field.php. No asterisk since editing
is disabled. The hidden input still ensures the value is submitted.
2026-07-08 13:50:03 +02:00
Pontoporeia f9d8fab120 partage: lock Année field to link's locked_year when present
When a student-access share link specifies a locked_year, the Année field
in the student-facing form is now pre-filled with that year and rendered
as disabled+readonly, with a hidden input ensuring the value is submitted.

- renderShareLinkForm() exposes  from ['locked_year']
- fieldset-academic.php checks for : if set, outputs a hidden
  input plus the visible field locked to that value; otherwise falls back
  to the normal editable field
2026-07-08 13:50:03 +02:00
Pontoporeia a3953800a4 Move annexes checkbox from Fichiers fieldset to Durée fieldset 2026-07-08 13:50:03 +02:00
Pontoporeia 402799a412 Fix remaining JS functions missing from window global scope 2026-07-08 13:50:03 +02:00
Pontoporeia 83287cdcd8 Expose tag/langue/motscles JS functions on window to survive ESM tree-shaking 2026-07-08 13:50:03 +02:00
Pontoporeia 8e67b9c155 admin toc: label rename + padding
- rename 'Sur cette page' to 'Parties'
- add padding-top between PARTIES label and toc links
2026-07-08 13:49:36 +02:00
Pontoporeia 30f901f1ed fix: various padding, layouts and visual issues
- fixed padding in the tfe.php page
- fixed the layout in admin/index.php toolbar top
- the gap issued with the table theader
- rearranged button order in the toolbar top
2026-07-08 13:09:35 +02:00
Pontoporeia a4cfe4356f chore: add explicit spacing to cleanup page article and h1 2026-07-07 19:53:35 +02:00
Pontoporeia 58fb4142b7 relabel: Promoteur·ice ULB → Promoteur·ice université in all UI labels
Pure label change across 6 template/controller files — no DB schema change.
Migration 043 added to track the change.
2026-07-06 19:51:42 +02:00
Pontoporeia 6573dd5452 tfe: add scrollbar=0 to PDF iframe embed params 2026-07-06 19:51:42 +02:00
Pontoporeia fa6d19f767 tfe: rework desktop layout to 35/65 flex columns, independent scrolling, no horizontal overflow
Switched from grid to flex for two-column layout
Left column (flex: 0 0 35%): author, title, meta, synopsis — scrolls independently  
Right column (flex: 1): files/media — scrolls independently
Added .tfe-file-iframe class to PDF/website iframes, scoped width/height constraints
All media gets width:100% + max-width:100% to prevent overflow
Mobile (<900px): reverts to single-column page-level scrolling
2026-07-06 19:51:42 +02:00
Pontoporeia 10df92b643 fix: load autosave-handler.js on about_page edit view, persist contact group deletion
Two fixes:

1. about_page edit was missing autosave-handler.js: the first if block
   (editType === 'page' || 'about_page') overrode $extraJs with only
   overtype.min.js, making the elseif that added autosave-handler.js
   unreachable for about_page. Added autosave-handler.js to the first
   block, removed dead 'about_page' from the elseif.

2. Deleting a contact group (Contacts 3/4/5) only removed the DOM
   element but never triggered htmx autosave. Dispatched a 'change'
   event on the form after removal+reindex so the hx-trigger fires.

Also expanded autosave-handler.js URL filter to accept apropos.php
so the status indicator (Enregistrement/Enregistré) works for contacts saves.
2026-07-05 14:14:13 +02:00
Pontoporeia 8e309bbcb7 Remove public contact visibility checkbox from admin add/edit forms 2026-07-05 14:04:29 +02:00
Pontoporeia ec6c939f4e Fix CC2r: uncheck not persisting + want_license hiding cc2r when active
Issue 1 — hidden seeds overriding user input:
Removed all hidden seed inputs (cc2r, want_license, license_id,
license_custom). The .licence-license-choice div is now rendered
directly from $formData on page load instead of via HTMX load
trigger. This eliminates stale-seed interference on both HTMX
radio changes and full form submits.

Issue 2 — Interne want_license uncheck clearing CC2r:
When want_license is unchecked, CC2r and licence selections are
cleared (section hidden). Added hidden want_license=0 so the
fragment handler can distinguish "arriving from another access
type" (no want_license in POST → preserve values) from "explicit
Interne toggle" (want_license present → clear CC2r if off).

CC2r is independently toggleable within the visible section.
Licence dropdown placeholder changed to 'Aucune licence' for
an explicit no-licence choice.
2026-07-05 14:04:05 +02:00
Pontoporeia 83e9dd0bc2 structure-formulaire.php: replace ← text back link with arrow-left-circle icon + admin-back-btn class 2026-07-05 12:51:44 +02:00
Pontoporeia 3c845f9d40 acces.php: remove Mot de passe column, add key icon copy button, reorder actions, switch URL icon to link-simple; fix dialog functions not on window; fix archive: move form into dialog (native submit); add caret icon to archived links details 2026-07-05 12:05:53 +02:00
Pontoporeia 786eef6df5 cleanup: remplacer <details> par <fieldset>/<legend> (comme contenus.php) 2026-07-03 17:12:15 +02:00
Pontoporeia a1f32acaa1 cleanup: sélection multiple + page dédiée (/admin/cleanup.php)
- cleanup-tmp.php: accepte les arrays filepond_dirs[] et trash_files[] pour suppression en lot
- cleanup-stats-fragment.php: ajout checkboxes + barre d'actions groupées + formulaire bulk HTMX
- admin-cleanup-bulk.js: module JS pour toggleAll, updateBulk, bulkDelete
- Nouvelle page /admin/cleanup.php remplace la modale (tmp-cleanup.php supprimé)
- Bouton Nettoyer dans index.php devient un lien vers la page dédiée
2026-07-03 17:06:23 +02:00
Pontoporeia a5f658ce0c retirer l'orientation des cartes de résultats de recherche 2026-07-03 16:58:29 +02:00
Pontoporeia 880d169e72 search: pagination and scroll, add range counter, mobile version 2026-07-03 16:53:16 +02:00
Pontoporeia 4fa57d592a refactor: combined duration (pages + minutes), has_annexes checkbox, remove Mo
- Remove Mo option from duration, keep only pages and minutes
- Redesign duration fieldset: separate Pages input + Durée h:m inputs, both can be set together
- Fix minutes input visibility: wider inputs (6ch), proper CSS layout
- Add has_annexes checkbox to fichiers fragment + DB column + controllers
- Display duration on admin backoffice recap page
- Display duration on public partage recap page
- Update public TFE page for new combined duration format
- Migration 041: add duration_pages, duration_minutes, has_annexes columns; migrate data; recreate views
2026-07-03 15:58:10 +02:00
Pontoporeia e6a989bb36 fix: add missing bootstrap require in markdown-cheatsheet-fragment.php, add bottom padding to dialog 2026-07-03 15:24:07 +02:00
Pontoporeia 6ecd3d4540 Fix biome lint errors: remove duplicate CSS properties, apply safe auto-fixes
CSS:
- Remove duplicate 'background' fallbacks in base.css, header.css, search.css
  (solid color declared before gradient — gradient always wins)
- Remove duplicate 'padding' in admin.css .admin-import-log

JS (biome --write safe fixes applied):
- function() → arrow functions in all IIFEs and callbacks
- forEach/callback → arrow functions
- evaluePtrn → parseInt(x, 10) in admin-contacts-form.js
- Cleaned label text in build.mjs lint step

Remaining warnings are intentional: !important overrides, descending
specificity (admin.css cascade), noUnusedVariables (functions exported
to window/onclick), useTemplate style preference.
2026-06-24 13:57:00 +02:00
Pontoporeia 82d3dcb084 Fix repertoire column scrolling + admin TOC duplication
- repertoire.css: add min-height: 0 to column <ul> scroll containers so
  grid 1fr row shrinks below content and overflow-y: auto activates
- admin-toc.js: add __adminTocBuilt guard + nav.children check to prevent
  double population when loaded both via admin.min.js and direct <script>
- admin-toc.php: remove duplicate <script src="admin-toc.js"> tag —
  JS is already bundled in admin.min.js
2026-06-24 13:18:19 +02:00
Pontoporeia 20fe4b6c8c Add biome + rolldown + lightningcss build pipeline for JS/CSS bundling & minification
- package.json with biome, rolldown, lightningcss devDependencies  
- biome.json: add CSS formatter support
- scripts/build-css.mjs: lightningcss resolves @import chain, bundles/minifies CSS  
- scripts/build-js.mjs: rolldown per-entry JS bundling (no code splitting)
- scripts/build.mjs: orchestrator for both CSS + JS
- scripts/check-build.mjs: staleness checker for CI/deploy guard
- justfile: add build, build-css, build-js, build-install, build-check recipes
- justfile: deploy recipe now runs build before deploy-code
- head.php + form-page.php: use dist/base.min.css instead of style.css
- All controllers + FormBootstrap: reference dist/*.min.{css,js}
- admin footer: load admin.min.js for all admin pages
- repertoire: use public.min.js instead of individual app JS files
- Fix stray '}' syntax error in admin.css line 305
- .gitignore: add app/public/assets/dist/
2026-06-24 13:09:50 +02:00
Pontoporeia e74f9210c5 #gzip #extract-inline-js enable gzip in nginx + move ~730 lines of inline JS to 15 external files 2026-06-24 12:56:15 +02:00
Pontoporeia 3c786b037a Sort all filter columns: matched entries first, then unmatched, both alphabetical 2026-06-24 11:32:13 +02:00
Pontoporeia 982d91345d Sort keywords column: matched entries first, then unmatched, both alphabetical
When filters are active, viable (matched) keywords now appear at the top
of the Mots-clés column so users don't have to scroll past faded entries
to find clickable tags. Both groups maintain alphabetical order internally.
2026-06-24 11:28:26 +02:00
Pontoporeia 654c884fed Remove mobile filter chip bar from repertoire page
The sticky chip bar added noise: users already see their active
filters highlighted in the accordion columns (with rep-entry--selected
styling and the active-count badge on each toggle). Removing chips
shifts focus back to the accordions, consistent with the expectation
that users return to the dropdowns to adjust filters.
2026-06-24 11:20:47 +02:00