parent
9c456a9357
commit
285430d690
@ -1,43 +1,56 @@ |
|||||||
|
{% load tournament_tags %} |
||||||
|
{% with status=tournament.get_online_registration_status %} |
||||||
<a href="{% url 'tournament' tournament.id %}"> |
<a href="{% url 'tournament' tournament.id %}"> |
||||||
<div class="table-row-4-colums-tournament vertical-padding"> |
<div class="table-row-5-colums-tournament vertical-padding"> |
||||||
<div class="tight table-cell"> |
<div class="table-row-element tournament-date center"> |
||||||
<div class="large">{{ tournament.level }}</div> |
<div class="small">{{ tournament.week_day }}</div> |
||||||
|
<div class="very-large">{{ tournament.day }}</div> |
||||||
|
<div class="small">{{ tournament.month }}</div> |
||||||
|
</div> |
||||||
|
<div class="table-row-element tournament-type"> |
||||||
|
<div class="very-large">{{ tournament.level }}</div> |
||||||
|
{% if tournament.category %} |
||||||
<div class="small">{{ tournament.category }}</div> |
<div class="small">{{ tournament.category }}</div> |
||||||
|
{% endif %} |
||||||
{% if tournament.age %} |
{% if tournament.age %} |
||||||
<div class="small">{{ tournament.age }}</div> |
<div class="small">{{ tournament.age }}</div> |
||||||
{% endif %} |
{% endif %} |
||||||
</div> |
</div> |
||||||
<div class="table-cell-responsive-large table-cell-large horizontal-padding semibold"> |
<div class="table-row-element tournament-name"> |
||||||
<div><span>{{ tournament.event.club.name }}</span></div> |
<div class="very-large club-name">{{ tournament.event.club.name }}</div> |
||||||
{% if tournament.name_and_event %} |
<div class="small">{{ tournament.localized_day_duration }}</div> |
||||||
<div> |
</div> |
||||||
<span>{{ tournament.name_and_event }}</span> |
<div class="table-row-element tournament-status center"> |
||||||
|
<div class="small">Équipes</div> |
||||||
|
<div class="very-large">{{ tournament.team_count }}</div> |
||||||
|
{% if user.is_authenticated %} |
||||||
|
{% with user_registration_status=tournament|get_player_status:user %} |
||||||
|
{% if user_registration_status %} |
||||||
|
{% if user_registration_status.display_box %} |
||||||
|
<div class="box small {{ user_registration_status.box_class }}"> |
||||||
|
{{ user_registration_status.short_label }} |
||||||
</div> |
</div> |
||||||
{% endif %} |
{% endif %} |
||||||
|
{% else %} |
||||||
|
{% if status.display_box %} |
||||||
|
<div class="box small {{ status.box_class }}"> |
||||||
|
{{ status.short_label }} |
||||||
</div> |
</div> |
||||||
<div class="table-cell-responsive-short table-cell-large horizontal-padding semibold"> |
|
||||||
<div><span>{{ tournament.event.club.computedShortTitle }}</span></div> |
|
||||||
{% if tournament.event.name %} |
|
||||||
<div><span>{{ tournament.event.name }}</span></div> |
|
||||||
{% endif %} |
{% endif %} |
||||||
{% if tournament.name %} |
|
||||||
<div><span>{{ tournament.name }}</span></div> |
|
||||||
{% endif %} |
{% endif %} |
||||||
</div> |
{% endwith %} |
||||||
|
{% else %} |
||||||
{% if tournament.tournament_status_display %} |
{% if status.display_box %} |
||||||
<div class="table-cell-responsive-large right horizontal-padding"> |
<div class="box small {{ status.box_class }}"> |
||||||
{{ tournament.tournament_status_display|linebreaksbr }} |
{{ status.short_label }} |
||||||
</div> |
</div> |
||||||
{% endif %} |
{% endif %} |
||||||
<div class="table-cell"> |
|
||||||
<div class="mybox center">{{ tournament.formatted_start_date }}</div> |
|
||||||
{% if tournament.tournament_status_display %} |
|
||||||
<div class="table-cell-responsive-short small center">{{ tournament.tournament_status_display|linebreaksbr }}</div> |
|
||||||
{% endif %} |
{% endif %} |
||||||
|
|
||||||
</div> |
</div> |
||||||
</div> |
</div> |
||||||
</a> |
</a> |
||||||
{% if not forloop.last %} |
{% if not forloop.last %} |
||||||
<hr/> |
<hr/> |
||||||
{% endif %} |
{% endif %} |
||||||
|
{% endwith %} |
||||||
|
|||||||
@ -0,0 +1,7 @@ |
|||||||
|
from django import template |
||||||
|
|
||||||
|
register = template.Library() |
||||||
|
|
||||||
|
@register.filter |
||||||
|
def get_player_status(tournament, user): |
||||||
|
return tournament.get_player_registration_status_by_licence(user) |
||||||
Loading…
Reference in new issue