add championship type

sync_v2
Raz 7 months ago
parent ea1504c83e
commit ae115bc4cb
  1. 1
      tournaments/models/enums.py
  2. 2
      tournaments/models/tournament.py
  3. 6
      tournaments/static/tournaments/css/style.css
  4. 5
      tournaments/templates/tournaments/tournament_info.html
  5. 3
      tournaments/templates/tournaments/tournament_row.html

@ -48,6 +48,7 @@ class FederalLevelCategory(models.IntegerChoices):
P1000 = 1000, 'P1000'
P1500 = 1500, 'P1500'
P2000 = 2000, 'P2000'
CHPT = 1, 'Championnat'
@staticmethod
def min_player_rank(level=None, category=None, age_category=None) -> int:

@ -180,6 +180,8 @@ class Tournament(BaseModel):
def level(self):
if self.federal_level_category == 0:
return "Anim."
if self.federal_level_category == 1:
return "CHPT"
return self.get_federal_level_category_display()
def category(self):

@ -766,6 +766,12 @@ h-margin {
/* Keep any existing styling for .large */
}
.small.event-name {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.table-row-element.tournament-status {
grid-column: 4;
}

@ -70,6 +70,11 @@
{% endif %}
<h1 class="club padding10 topmargin20">{{ tournament.display_name }} {{ tournament.get_federal_age_category_display}}</h1>
<div class="bubble">
{% if tournament.event.name %}
<label class="semibold">{{ tournament.event.name }}</label>
{% endif %}
<p>
<div class="semibold">{{ tournament.local_start_date_formatted }}</div>
<div>{{ tournament.day_duration_formatted }}</div>

@ -18,6 +18,9 @@
</div>
<div class="table-row-element tournament-name">
<div class="very-large club-name">{{ tournament.event.club.name }}</div>
{% if tournament.event.name %}
<div class="small event-name">{{ tournament.event.name }}</div>
{% endif %}
<div class="small">{{ tournament.localized_day_duration }}</div>
</div>
<div class="table-row-element tournament-status center">

Loading…
Cancel
Save