121 lines
5.0 KiB
HTML
121 lines
5.0 KiB
HTML
{% extends "chrono/manager_event_detail.html" %}
|
|
{% load static i18n %}
|
|
|
|
{% block breadcrumb %}
|
|
{{ block.super }}
|
|
<a href="{% url 'chrono-manager-event-check' pk=agenda.pk event_pk=object.pk %}">{% trans "Check" %}</a>
|
|
{% endblock %}
|
|
|
|
{% block appbar_actions %}{% endblock %}
|
|
|
|
{% block content %}
|
|
<div class="section">
|
|
<h3>
|
|
{% blocktrans with booked_places=object.booked_places places=object.places %}Bookings ({{ booked_places }}/{{ places }}){% endblocktrans %}
|
|
</h3>
|
|
<div>
|
|
<form class="check-bookings-filters">
|
|
{{ filterset.form.as_p }}
|
|
<script>
|
|
$(function() {
|
|
$('form.check-bookings-filters input').on('change',
|
|
function() {
|
|
$(this).parents('form').submit();
|
|
});
|
|
});
|
|
</script>
|
|
</form>
|
|
<table class="main check-bookings">
|
|
<tbody>
|
|
{% if results and not event.checked %}
|
|
<tr class="booking">
|
|
<td class="booking-actions">
|
|
<form method="post" action="{% url 'chrono-manager-event-checked' pk=agenda.pk event_pk=object.pk %}">
|
|
{% csrf_token %}
|
|
<button class="submit-button">{% trans "Mark the event as checked" %}</button>
|
|
</form>
|
|
</td>
|
|
</tr>
|
|
{% endif %}
|
|
{% if booked_without_status %}
|
|
{% if not event.checked or not agenda.disable_check_update %}
|
|
<tr class="booking all-bookings">
|
|
<td colspan="2"><b>{% trans "Mark all bookings without status:" %}</b></td>
|
|
<td class="booking-actions">
|
|
<form method="post" action="{% url 'chrono-manager-event-presence' pk=agenda.pk event_pk=object.pk %}" id="all-bookings-presence">
|
|
{% csrf_token %}
|
|
<button class="submit-button">{% trans "Presence" %}</button>
|
|
{% if presence_form.check_type.field.choices.1 %}{{ presence_form.check_type }}{% endif %}
|
|
<script>
|
|
$(function() {
|
|
$('#all-bookings-presence select').on('change',
|
|
function() {
|
|
$('#all-bookings-presence').submit();
|
|
});
|
|
});
|
|
</script>
|
|
</form>
|
|
<form method="post" action="{% url 'chrono-manager-event-absence' pk=agenda.pk event_pk=object.pk %}" id="all-bookings-absence">
|
|
{% csrf_token %}
|
|
<button class="submit-button">{% trans "Absence" %}</button>
|
|
{% if absence_form.check_type.field.choices.1 %}{{ absence_form.check_type }}{% endif %}
|
|
<script>
|
|
$(function() {
|
|
$('#all-bookings-absence select').on('change',
|
|
function() {
|
|
$('#all-bookings-absence').submit();
|
|
});
|
|
});
|
|
</script>
|
|
</form>
|
|
</td>
|
|
</tr>
|
|
{% endif %}
|
|
{% endif %}
|
|
{% for result in results %}
|
|
<tr class="booking">
|
|
{% if result.kind == 'booking' %}
|
|
{% if result.cancellation_datetime is None %}
|
|
{% include "chrono/manager_event_check_booking_fragment.html" with booking=result %}
|
|
{% else %}
|
|
<td class="booking-username main-list">{{ result.get_user_block }}</td>
|
|
<td class="booking-status">({% trans "Cancelled" %})</td>
|
|
{% if not event.checked or not agenda.disable_check_update %}
|
|
<td class="booking-actions"></td>
|
|
{% endif %}
|
|
{% endif %}
|
|
{% elif result.kind == 'subscription' %}
|
|
<td class="booking-username main-list">{{ result.get_user_block }}</td>
|
|
<td class="booking-status">({% trans "Not booked" %})</td>
|
|
{% if not event.checked or not agenda.disable_check_update %}
|
|
<td class="booking-actions"></td>
|
|
{% endif %}
|
|
{% endif %}
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
{% if object.waiting_list_places %}
|
|
<div class="section">
|
|
<h3>
|
|
{% blocktrans with booked_places=object.booked_waiting_list_places places=object.waiting_list_places %}Waiting List ({{ booked_places }}/{{ places }}){% endblocktrans %}
|
|
</h3>
|
|
<div>
|
|
<table class="main check-bookings">
|
|
<tbody>
|
|
{% for booking in waiting %}
|
|
<tr>
|
|
<td class="booking-username waiting">{{ booking.get_user_block }}{% if booking.places_count > 1 %} ({{ booking.places_count }} {% trans "places" %}){% endif %}</td>
|
|
<td>{% if booking.cancellation_datetime %}({% trans "Cancelled" %}){% endif %}</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
{% endblock %}
|