From 4f5422e8a1002443b839dc3eaa7b10ffc3376d6c Mon Sep 17 00:00:00 2001 From: Razmig Sarkissian Date: Thu, 13 Jun 2024 11:21:01 +0200 Subject: [PATCH 1/2] fix broadcast css --- tournaments/static/tournaments/css/style.css | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tournaments/static/tournaments/css/style.css b/tournaments/static/tournaments/css/style.css index 670873f..f43cd3c 100644 --- a/tournaments/static/tournaments/css/style.css +++ b/tournaments/static/tournaments/css/style.css @@ -593,7 +593,7 @@ h-margin { .table-row-4-colums-club-tournament { display: grid; - grid-template-columns: 100px 60px 1fr auto; + grid-template-columns: 100px 100px 1fr auto; align-items: center; /* Vertically center the content within each column */ padding: 5px 0px; @@ -611,7 +611,7 @@ h-margin { .table-row-3-colums-ranks { display: grid; - grid-template-columns: 80px 1fr auto ; + grid-template-columns: 80px 1fr auto; /* first column is a hack */ align-items: center; /* Vertically center the content within each column */ @@ -635,6 +635,7 @@ h-margin { /* Vertically center the content within each column */ padding: 5px 0px; } + @media print, screen and (min-width: 80em) { .table-row-4-colums { @@ -682,9 +683,11 @@ screen and (min-width: 80em) { .table-row-4-colums-tournament { grid-template-columns: auto 1fr auto auto; } + .table-cell-responsive-large { display: block; } + .table-cell-responsive-short { display: none; } From f0f716547fb49d801bec2bfe0a0142bd3531ee7b Mon Sep 17 00:00:00 2001 From: Razmig Sarkissian Date: Thu, 13 Jun 2024 12:33:58 +0200 Subject: [PATCH 2/2] hide tournament when not ready --- tournaments/models/tournament.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tournaments/models/tournament.py b/tournaments/models/tournament.py index 39ea6fc..4facd63 100644 --- a/tournaments/models/tournament.py +++ b/tournaments/models/tournament.py @@ -472,9 +472,9 @@ class Tournament(models.Model): return True if self.publish_tournament: return True - if datetime.now().date() >= self.start_date.date(): - return True if (len(self.groupstage_set.all()) > 0 or len(self.round_set.all()) > 0) and len(self.teamregistration_set.all()) >= 4: + if datetime.now().date() >= self.start_date.date(): + return True minimum_publish_date = self.creation_date.replace(hour=9, minute=0) + timedelta(days=1) return timezone.now() >= minimum_publish_date return False