bracket-feature
laurent 1 year ago
commit a9e7976ded
  1. 6
      tournaments/models/tournament.py
  2. 2
      tournaments/templates/tournaments/broadcast/broadcasted_rankings.html
  3. 12
      tournaments/templates/tournaments/broadcast/broadcasted_summon.html
  4. 2
      tournaments/templates/tournaments/broadcast/broadcasted_summons.html
  5. 7
      tournaments/templates/tournaments/summon_row.html

@ -221,7 +221,7 @@ class Tournament(models.Model):
names = team_registration.team_names()
stage = next_match.summon_stage_name()
weight = team_registration.weight
summon = TeamSummon(names, next_match.start_date, weight, stage, team_registration.logo)
summon = TeamSummon(names, next_match.start_date, weight, stage, next_match.court_name(next_match.court_index), team_registration.logo)
summons.append(summon)
summons.sort(key=lambda s: s.date)
@ -727,11 +727,12 @@ class MatchGroup:
self.matches = matches
class TeamSummon:
def __init__(self, names, date, weight, stage, image):
def __init__(self, names, date, weight, stage, court, image):
self.names = names
self.date = date
self.weight = weight
self.stage = stage
self.court = court
self.image = image
def formatted_date(self):
@ -747,6 +748,7 @@ class TeamSummon:
"date": self.formatted_date(),
"weight": self.weight,
"stage": self.stage,
"court": self.court,
"image": self.image,
}

@ -16,7 +16,7 @@
.then(res => res.json())
.then((data) => {
let pageSize = 20
let pageSize = 16
this.paginatedRankings = this.paginate(data, pageSize)
const splitGroups = [];

@ -7,13 +7,11 @@
<div x-text="summon.names[i-1]"></div>
</template>
</div>
{% if not tournament.hide_weight %}
<div class="table-cell center numbers"><span x-text="summon.weight"></span></div>
{% else %}
<div class="table-cell center numbers"><span x-text=""></span></div>
{% endif %}
<div class="table-cell large center"><span x-text="summon.date"></span></div>
<div class="table-cell left numbers"><span x-text=""></span></div>
<div class="table-cell left">
<div class="table-cell large"><span x-text="summon.date"></span></div>
<div class="table-cell"><span x-text="summon.court"></span></div>
</div>
<div class="table-cell right"><div class="mybox center"><span x-text="summon.stage"></span></div></div>
</div>

@ -16,7 +16,7 @@
.then(res => res.json())
.then((data) => {
let pageSize = 20
let pageSize = 16
this.paginatedMatches = this.paginate(data, pageSize)
const splitGroups = [];

@ -8,8 +8,11 @@
{% endfor %}
</div>
<div class="table-cell large center">{{ summon.date|date:'l H:i' }}</div>
<div class="table-cell"><div class="mybox center">{{ summon.stage }}</div></div>
<div class="table-cell left">
<div class="table-cell large">{{ summon.date|date:'l H:i' }}</div>
<div class="table-cell">{{ summon.court }}</div>
</div>
<div class="table-cell right"><div class="mybox center">{{ summon.stage }}</div></div>
</div>
{% if not forloop.last %}

Loading…
Cancel
Save