parent
9c456a9357
commit
285430d690
@ -1,43 +1,56 @@ |
||||
<a href="{% url 'tournament' tournament.id %}"> |
||||
<div class="table-row-4-colums-tournament vertical-padding"> |
||||
<div class="tight table-cell"> |
||||
<div class="large">{{ tournament.level }}</div> |
||||
<div class="small">{{ tournament.category }}</div> |
||||
{% if tournament.age %} |
||||
<div class="small">{{ tournament.age }}</div> |
||||
{% load tournament_tags %} |
||||
{% with status=tournament.get_online_registration_status %} |
||||
<a href="{% url 'tournament' tournament.id %}"> |
||||
<div class="table-row-5-colums-tournament vertical-padding"> |
||||
<div class="table-row-element tournament-date center"> |
||||
<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> |
||||
{% endif %} |
||||
{% if tournament.age %} |
||||
<div class="small">{{ tournament.age }}</div> |
||||
{% endif %} |
||||
</div> |
||||
<div class="table-row-element tournament-name"> |
||||
<div class="very-large club-name">{{ tournament.event.club.name }}</div> |
||||
<div class="small">{{ tournament.localized_day_duration }}</div> |
||||
</div> |
||||
<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> |
||||
{% endif %} |
||||
{% else %} |
||||
{% if status.display_box %} |
||||
<div class="box small {{ status.box_class }}"> |
||||
{{ status.short_label }} |
||||
</div> |
||||
{% endif %} |
||||
{% endif %} |
||||
</div> |
||||
<div class="table-cell-responsive-large table-cell-large horizontal-padding semibold"> |
||||
<div><span>{{ tournament.event.club.name }}</span></div> |
||||
{% if tournament.name_and_event %} |
||||
<div> |
||||
<span>{{ tournament.name_and_event }}</span> |
||||
{% endwith %} |
||||
{% else %} |
||||
{% if status.display_box %} |
||||
<div class="box small {{ status.box_class }}"> |
||||
{{ status.short_label }} |
||||
</div> |
||||
{% endif %} |
||||
</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 %} |
||||
{% if tournament.name %} |
||||
<div><span>{{ tournament.name }}</span></div> |
||||
{% endif %} |
||||
</div> |
||||
|
||||
{% if tournament.tournament_status_display %} |
||||
<div class="table-cell-responsive-large right horizontal-padding"> |
||||
{{ tournament.tournament_status_display|linebreaksbr }} |
||||
</div> |
||||
{% 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 %} |
||||
</div> |
||||
|
||||
</div> |
||||
</a> |
||||
{% if not forloop.last %} |
||||
<hr/> |
||||
{% endif %} |
||||
</div> |
||||
</a> |
||||
{% if not forloop.last %} |
||||
<hr/> |
||||
{% 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