chrono/chrono/manager/templates/chrono/manager_events_agenda_setti...

61 lines
2.5 KiB
HTML

{% extends "chrono/manager_agenda_settings.html" %}
{% load i18n %}
{% block agenda-extra-management-actions %}
<a rel="popup" href="{% url 'chrono-manager-agenda-import-events' pk=object.id %}">{% trans 'Import Events' %}</a>
<a rel="popup" href="{% url 'chrono-manager-agenda-add-event' pk=object.id %}">{% trans 'New Event' %}</a>
{% endblock %}
{% block agenda-settings %}
<div class="section">
<h3>{% trans "Events" %}</h3>
<div>
{% if object.event_set.count %}
<ul class="objects-list single-links">
{% for event in object.event_set.all %}
<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 rel="popup" href="{% if user_can_manage %}{% url 'chrono-manager-event-edit' pk=agenda.id event_pk=event.id %}?next=settings{% else %}#{% endif %}">
{% 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>
{% if user_can_manage %}<a rel="popup" class="delete" href="{% url 'chrono-manager-event-delete' pk=agenda.id event_pk=event.id %}?next=settings">{% trans "remove" %}</a>{% endif %}
<span class="occupation-bar"></span>
</li>
{% endfor %}
</ul>
{% else %}
<div class="big-msg-info">
{% blocktrans %}
This agenda doesn't have any event yet. Click on the "New Event" button in
the top right of the page to add a first one.
{% endblocktrans %}
</div>
{% endif %}
</div>
</div>
{% endblock %}