add planning event

sync_v2
Raz 6 months ago
parent 195051086a
commit 2e417456c7
  1. 4
      tournaments/models/match.py
  2. 7
      tournaments/models/tournament.py
  3. 4
      tournaments/templates/tournaments/broadcast/broadcasted_planning.html

@ -422,9 +422,9 @@ class Match(SideStoreModel):
def tournament_title(self): def tournament_title(self):
if self.group_stage: if self.group_stage:
return self.group_stage.tournament.full_name() return self.group_stage.tournament.short_full_name()
else: else:
return self.round.tournament.full_name() return self.round.tournament.short_full_name()
def live_match(self, hide_teams=False, event_mode=False): def live_match(self, hide_teams=False, event_mode=False):
title = self.computed_name() title = self.computed_name()

@ -162,6 +162,13 @@ class Tournament(BaseModel):
str = f"{str} {age}" str = f"{str} {age}"
return str return str
def short_full_name(self):
age = self.age()
str = f"{self.level()}{self.category()[0]}"
if age is not None and self.federal_age_category != 200:
str = f"{str} {age}"
return str
def short_base_name(self): def short_base_name(self):
category = self.category() category = self.category()
if len(category) > 0 and self.federal_level_category > 1: if len(category) > 0 and self.federal_level_category > 1:

@ -47,7 +47,7 @@
color: white; color: white;
} }
.match-cell, .court-label { .match-cell, .court-label {
width: 18rem; width: 0.15fr;
display: flex; display: flex;
} }
/* Adjust width when court count is 5 or more */ /* Adjust width when court count is 5 or more */
@ -261,7 +261,7 @@
<div class="match-cell"> <div class="match-cell">
<template x-if="match"> <template x-if="match">
<div class="bubble" :class="{'running': !match.ended && match.started, 'even': courtIndex % 2 === 1}" style="text-align: center;"> <div class="bubble" :class="{'running': !match.ended && match.started, 'even': courtIndex % 2 === 1}" style="text-align: center;">
<div class="score ws bold" x-text="match.group_stage_name ? match.group_stage_name : match.title"></div> <div class="matchtitle" x-text="match.group_stage_name ? match.group_stage_name : match.title"></div>
<template x-if="match.tournament_title"> <template x-if="match.tournament_title">
<div class="minor-info semibold" x-text="match.tournament_title"></div> <div class="minor-info semibold" x-text="match.tournament_title"></div>
</template> </template>

Loading…
Cancel
Save