manager: display waiting list occupation if all places are for waiting list

This commit is contained in:
Frédéric Péters 2016-07-07 18:05:42 +02:00
parent 785dbc4955
commit 2c573c3c4c
1 changed files with 11 additions and 4 deletions

View File

@ -25,14 +25,21 @@
{% for event in object.event_set.all %}
<li class="{% if event.booked_places > event.places %}overbooking{% endif %}
{% if event.full %}full{% endif %}"
data-total="{{event.places}}"
data-booked="{{event.booked_places}}"><a rel="popup" href="{% url 'chrono-manager-event-edit' pk=event.id %}">
{% if event.places %}
data-total="{{event.places}}" data-booked="{{event.booked_places}}"
{% elif event.waiting_list_places %}
data-total="{{event.waiting_list_places}}" data-booked="{{event.waiting_list}}"
{% endif %}
><a rel="popup" href="{% url 'chrono-manager-event-edit' pk=event.id %}">
{% if event.label %}{{event.label}} / {% endif %}
{{ event.start_datetime }}
{% if event.full %}/ <span class="full">{% trans "full" %}</span>{% endif %}
({% blocktrans with places=event.places booked_places=event.booked_places %}{{ places }} places, {{ booked_places }} booked places{% endblocktrans %}
(
{% if event.places %}
{% blocktrans with places=event.places booked_places=event.booked_places %}{{ places }} places, {{ booked_places }} booked places{% endblocktrans %}
{% endif %}
{% if event.places and event.waiting_list_places %} / {% endif %}
{% if event.waiting_list_places %}
/
{% blocktrans with places=event.waiting_list_places waiting_places=event.waiting_list %}
{{waiting_places}} on {{ places }} in waiting list
{% endblocktrans %}