Laurent 2 months ago
commit 147c8e9ba3
  1. 3
      tournaments/models/tournament.py
  2. 17
      tournaments/static/tournaments/css/tournament_bracket.css
  3. 2
      tournaments/static/tournaments/js/tournament_bracket.js
  4. 7
      tournaments/templates/tournaments/broadcast/broadcasted_bracket.html
  5. 9
      tournaments/templates/tournaments/tournament_info.html

@ -1225,6 +1225,9 @@ class Tournament(BaseModel):
# Entry fee # Entry fee
if self.entry_fee is not None and self.entry_fee > 0: if self.entry_fee is not None and self.entry_fee > 0:
formatted_fee = currency_service.format_amount(self.entry_fee, self.currency_code) formatted_fee = currency_service.format_amount(self.entry_fee, self.currency_code)
if self.is_custom_animation():
options.append(f"{formatted_fee} par personne")
else:
options.append(f"Frais d'inscription: {formatted_fee} par joueur") options.append(f"Frais d'inscription: {formatted_fee} par joueur")
# Club member fee reduction # Club member fee reduction

@ -61,6 +61,23 @@
justify-content: center; justify-content: center;
} }
.match-time-indication {
position: absolute;
color: #fff;
left: 50%; /* Center horizontally */
transform: translateX(-50%); /* Center it exactly */
text-align: center;
font-weight: bold;
width: 100%; /* Change from 100% to auto */
padding: 0px 0px;
white-space: nowrap; /* Prevent text from wrapping */
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.round-title.broadcast-mode { .round-title.broadcast-mode {
font-size: 0.8em; font-size: 0.8em;
width: auto; /* Change from 100% to auto */ width: auto; /* Change from 100% to auto */

@ -347,7 +347,7 @@ function renderBracket(options) {
} }
matchDiv.style.setProperty( matchDiv.style.setProperty(
"--semi-final-distance", "--semi-final-distance",
`${baseDistance / 2}px`, `${baseDistance / 2.3}px`,
); );
matchDiv.style.setProperty( matchDiv.style.setProperty(

@ -158,8 +158,15 @@
// Create the match content using our HTML generator // Create the match content using our HTML generator
template.innerHTML = `<div class="bubble broadcast-bracket-match ${(!match.ended && match.started) ? 'match-running' : ''}">${createMatchHTML(match)}</div>`; template.innerHTML = `<div class="bubble broadcast-bracket-match ${(!match.ended && match.started) ? 'match-running' : ''}">${createMatchHTML(match)}</div>`;
template_time = document.createElement('div');
template_time.className = 'match-time-indication';
template_time.style.textAlign = 'center';
template_time.innerHTML = `<div>${match.time_indication}</div>`;
template.appendChild(template_time);
tempContainer.appendChild(template); tempContainer.appendChild(template);
}); });
}); });

@ -176,8 +176,10 @@
<h1 class="club padding10">{{ tournament.full_name }}</h1> <h1 class="club padding10">{{ tournament.full_name }}</h1>
<div class="bubble"> <div class="bubble">
<div class="semibold">{{ tournament.local_start_date_formatted }}</div> <div class="semibold">{{ tournament.local_start_date_formatted }}</div>
{% if not tournament.is_custom_animation %}
<div>{{ tournament.day_duration_formatted }}</div> <div>{{ tournament.day_duration_formatted }}</div>
<div>{{ tournament.court_count }} piste{{ tournament.court_count|pluralize }}</div> <div>{{ tournament.court_count }} piste{{ tournament.court_count|pluralize }}</div>
{% endif %}
<p> <p>
</p> </p>
@ -202,6 +204,7 @@
{% endif %} {% endif %}
<hr/> <hr/>
{% if not tournament.is_custom_animation %}
<p> <p>
{% if tournament.umpire_contact %} {% if tournament.umpire_contact %}
<div class="semibold">Organisateur</div> <div class="semibold">Organisateur</div>
@ -214,7 +217,7 @@
<div><a href="tel:{{ tournament.umpire_phone }}" class="styled-link">{{ tournament.umpire_phone }}</a></div> <div><a href="tel:{{ tournament.umpire_phone }}" class="styled-link">{{ tournament.umpire_phone }}</a></div>
{% endif %} {% endif %}
</p> </p>
{% endif %}
{% if tournament.information %} {% if tournament.information %}
<p> <p>
<div class="semibold">Infos</div> <div class="semibold">Infos</div>
@ -225,7 +228,9 @@
{% if tournament.options_fee %} {% if tournament.options_fee %}
<p> <p>
{% if not tournament.is_custom_animation %}
<div class="semibold">Frais d'inscription</div> <div class="semibold">Frais d'inscription</div>
{% endif %}
<ul> <ul>
{% for option in tournament.options_fee %} {% for option in tournament.options_fee %}
<li>{{ option }}</li> <li>{{ option }}</li>
@ -235,6 +240,7 @@
{% endif %} {% endif %}
{% with status=tournament.get_online_registration_status %} {% with status=tournament.get_online_registration_status %}
{% if tournament.enable_online_registration %} {% if tournament.enable_online_registration %}
{% if not tournament.is_custom_animation %}
<p> <p>
<div class="semibold">Inscription en ligne</div> <div class="semibold">Inscription en ligne</div>
@ -263,6 +269,7 @@
</div> </div>
</p> </p>
{% endif %} {% endif %}
{% endif %}
{% if status.display_register_option and team is None %} {% if status.display_register_option and team is None %}
{% if tournament.account_is_required is False or user.is_authenticated and user.is_active %} {% if tournament.account_is_required is False or user.is_authenticated and user.is_active %}

Loading…
Cancel
Save