chrono/chrono/manager/templates/chrono/manager_events_agenda_month...

54 lines
1.9 KiB
HTML

{% extends "chrono/manager_agenda_month_view.html" %}
{% load i18n %}
{% block content %}
<div class="section">
<h3>{% trans "Events" %}</h3>
<div>
{% if object_list %}
<ul class="objects-list single-links">
{% for event in object_list %}
<li class="{% if event.booked_places > event.places %}overbooking{% endif %}
{% if event.full %}full{% endif %}
{% if not event.in_bookable_period %}not-{% endif %}bookable"
{% 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 href="{% url 'chrono-manager-event-view' pk=agenda.id event_pk=event.id %}">
{% if event.label %}{{event.label}} / {% endif %}
{{ event.start_datetime }}
{% if event.full %}/ <span class="full">{% trans "full" %}</span>{% endif %}
(
{% 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 %}
{% endif %}
)
{% if not event.in_bookable_period %}
({% trans "out of bookable period" %})
{% endif %}
</a>
<span class="occupation-bar"></span>
</li>
{% endfor %}
</ul>
{% include "gadjo/pagination.html" %}
{% else %}
<div class="big-msg-info">
{% blocktrans %}
This month doesn't have any event configured.
{% endblocktrans %}
</div>
{% endif %}
</div>
</div>
{% endblock %}