Commit Graph

4 Commits

Author SHA1 Message Date
admin.juergen 954a5102ac Refine range results and restore new-tab view links
Zweite Runde Kundenrückmeldung:

- Range-Ergebnisse: Das Diagramm behält die komplette lineare Skala
  (rangeMin..rangeMax), aber die Werte-Liste/Tabelle zeigt nur noch die
  tatsächlich beantworteten Werte. Sonst würde eine große Skala (z. B. Alter
  1-100, Schrittweite 1) die Ergebnisseite mit hunderten Nullzeilen fluten.
  Neues Feld distributionRows für die Liste; distribution bleibt fürs Diagramm.
- Große Skalen: X-Achsenbeschriftung wird ausgedünnt (Chart.js autoSkip/
  maxTicksLimit, SVG jede n-te Beschriftung), Punkt-Marker verkleinert bzw.
  ab >40 Punkten weggelassen. Auch die Y-Ticks im PDF-SVG werden gedeckelt.
- PDF-Range-Tabelle ohne Farb-Swatch-Spalte (nur Wert/Anzahl/Anteil), da die
  Kopplung an ein Vollskalen-Diagramm nicht mehr sinnvoll ist.
- Aktionslinks in der Frontend-Liste: Öffentliche Ansicht, Entwurfs-Ansicht
  und Ergebnisse anzeigen öffnen wieder im neuen Fenster (target=_blank);
  nur Bearbeiten bleibt im selben Tab.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-05 20:15:05 +02:00
Jürgen Mummert db7094fd1e Fix frontend CSRF, clean reader URLs, and review findings
CSRF / actions:
- List action forms now send both REQUEST_TOKEN (Contao gate) and _token
  (Symfony, validated via isCsrfTokenValid) — mirrors the editor; fixes
  the 400/500 "Ungültiger CSRF-Token" on publish/toggle/duplicate/delete

Public reader / URLs:
- Reader & results read auto_item via Input::get (marks the route param used)
  so clean path URLs /<page>/<alias> no longer 404
- List controller generates path URLs via ['parameters' => '/'.$alias]
- Allow re-participation in the same session after a 60s cooldown

Review fixes:
- Results: merge answer snapshots by questionId+type (no more split cards on
  label edits); seed "Vielleicht" when allowMaybe so screen matches Excel
- Reader: replace generic answer hint with per-option "weiter zu Frage X"
  only when a jump is configured; strip HTML tags from survey description
- PDF: render free-text frequency summary; drop duplicate "Minimum" label
- Drag-sort: bundle SortableJS locally, drop the duplicated inline sort CSS/JS
  from _survey_assets, throttle the backend MutationObserver
- Backend: move hardcoded tl_survey operation labels to TL_LANG (de+en)
- Remove dead code: SurveyEditorVoter, SurveyPermissionService,
  categoryFilter/categorySummary + helpers, orphaned publishSurvey lang key

Reader layout:
- max-width 1000px (other views keep 1400px); back/next buttons fill the
  width as equal, card-sized halves; sort handle icon offset tweak

Docs: update AI_HANDOVER (dual-token CSRF, clean URLs) and README

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-14 13:00:05 +02:00
Jürgen Mummert 6eec9ec537 Sanitize survey frontend and PDF output 2026-05-24 17:53:53 +02:00
Jürgen Mummert b8475e3a57 Initial survey bundle import 2026-05-17 17:31:28 +02:00