From dcea759ab2e65c8681f09e56299477c88ebd785d Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 13 Jun 2026 08:31:37 +0000 Subject: [PATCH] Persist season selection in URL instead of cookie-only Season filter dropdowns in all frontend views (Mannschaftswettbewerbe, Turniere, Teams, Spielerstatistiken, Individualwettbewerbe, Ranglisten) now navigate via JS URL update (window.location with searchParams) instead of submitting a POST form. This puts filter_saison_id in the URL, making season-filtered views bookmarkable and shareable. The PHP backend already reads filter_saison_id from $_REQUEST (covers GET), and the cookie is still set as fallback for links that don't carry the param. For veranstaltungHeaderAlone (single competition detail view), the JS also resets task=veranstaltungen and removes veranstaltungid on season change, matching the previous form-based behaviour of navigating back to the list. https://claude.ai/code/session_01VyKCAgyEfixxR6RhAkBSEL --- .../views/sportsmanager/view.html.php | 33 +++++++++++-------- 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/src/structure/components/com_sportsmanager/views/sportsmanager/view.html.php b/src/structure/components/com_sportsmanager/views/sportsmanager/view.html.php index 9ff5e9e..5cd9718 100644 --- a/src/structure/components/com_sportsmanager/views/sportsmanager/view.html.php +++ b/src/structure/components/com_sportsmanager/views/sportsmanager/view.html.php @@ -112,6 +112,7 @@ static function veranstaltungenHeader($titel, $beschreibung, $saisons, $filter_s } if (($praesentation == 0 && count($saisons) > 0) || $ticker_anzeigen) { ?> +
@@ -123,14 +124,14 @@ static function veranstaltungenHeader($titel, $beschreibung, $saisons, $filter_s + class="button uk-button uk-button-primary" onclick="smChangeSaison(document.getElementById('filter_saison_id').value); return false;"/> 1)) { ?> +
   
@@ -233,14 +235,14 @@ static function veranstaltungHeaderAlone($veranstaltung, $vorherige_veranstaltun + class="button uk-button uk-button-primary" onclick="smChangeSaisonAlone(document.getElementById('filter_saison_id').value); return false;"/> @@ -317,6 +319,7 @@ static function turniereHeader($beschreibung, $saisons, $filter_saison_id): void } if (count($saisons) > 0) { ?> +
   
@@ -324,14 +327,14 @@ static function turniereHeader($beschreibung, $saisons, $filter_saison_id): void
+ class="button uk-button uk-button-primary" onclick="smChangeSaison(document.getElementById('filter_saison_id').value); return false;"/>
@@ -2150,6 +2153,7 @@ static function tabelleEigeneAnzeigen($veranstaltung, $teams, $alleine_angezeigt } if (count($saisons) > 0) { ?> +
@@ -2158,7 +2162,7 @@ static function tabelleEigeneAnzeigen($veranstaltung, $teams, $alleine_angezeigt + class="button uk-button uk-button-primary" onclick="smChangeSaison(document.getElementById('filter_saison_id').value); return false;"/>
@@ -6053,6 +6057,7 @@ static function spielerstatistikenHeader($titel, $beschreibung, $saisons, $filte } if (!empty($saisons) || !empty($spiele) || !empty($teams)) { ?> +
@@ -6064,7 +6069,7 @@ static function spielerstatistikenHeader($titel, $beschreibung, $saisons, $filte :
@@ -6433,7 +6439,7 @@ static function individualwettbewerbHeader($titel, $beschreibung, $saisons, $fil : + class="button uk-button uk-button-primary" onclick="smChangeSaison(document.getElementById('filter_saison_id').value); return false;"/>
@@ -7253,6 +7259,7 @@ static function ranglistenHeader($titel, $beschreibung, $saisons, $filter_saison } if (count($saisons) > 0) { ?> +
@@ -7263,7 +7270,7 @@ static function ranglistenHeader($titel, $beschreibung, $saisons, $filter_saison : + class="button uk-button uk-button-primary" onclick="smChangeSaison(document.getElementById('filter_saison_id').value); return false;"/>