From 74765a37557972db068d257cbb7161a4b1f16d76 Mon Sep 17 00:00:00 2001 From: Tomasz Wolniewicz <twoln@umk.pl> Date: Thu, 18 Jan 2024 10:10:36 +0100 Subject: [PATCH] Adding the 'problems' argument to the status page --- page-logic/status.php | 5 +++++ templates/status.html | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/page-logic/status.php b/page-logic/status.php index 1958160..cc187f6 100644 --- a/page-logic/status.php +++ b/page-logic/status.php @@ -163,4 +163,9 @@ $data = []; $data['participants'] = $participants; $data['votingOnly'] = $votingOnly; $data['candidates'] = $candidates; +if (isset($_GET['problems'])) { + $data['problem_switch'] = 1; +} else { + $data['problem_switch'] = 0; +} echo $twig->render('status.html', $data); diff --git a/templates/status.html b/templates/status.html index bcba572..973b24d 100644 --- a/templates/status.html +++ b/templates/status.html @@ -209,5 +209,9 @@ function deselectAll(){ }); }); +if ({{problem_switch}} == 1) { + $('.feed-ok').hide(); + $('#problem_filter').prop('checked', true); +} </script> {% endblock javascripts %} -- GitLab