chrono/chrono/manager/templates/chrono/manager_meetings_agenda_day...

69 lines
2.7 KiB
HTML

{% extends "chrono/manager_agenda_day_view.html" %}
{% load i18n %}
{% block content %}
{% for period, desk_infos in view.get_timetable_infos %}
{% if forloop.first %}
<table class="agenda-table day-view hourspan-{{ hour_span }} desks-{{ desk_infos|length }} ">
<thead>
<tr>
<td></td>
{% for desk_info in desk_infos %}
<th>{{ desk_info.desk.label }}{% if agenda.kind == 'virtual' %} ({{ desk_info.desk.agenda.label }}){% endif %}</th>
{% endfor %}
</tr>
</thead>
<tbody>
{% endif %}
<tr class="{% cycle 'odd' 'even' %}">
<th class="hour">{{ period|date:"TIME_FORMAT" }}</th>
{% for desk_info in desk_infos %}
<td>
{% if forloop.parentloop.first %}
{# opening hours on the first row #}
{% for slot in desk_info.opening_hours %}
<div class="opening-hours"
style="height: {{ slot.css_height }}%; top: {{ slot.css_top }}%;"
>{{slot.begin}} {{slot.end}}</div>
{% endfor %}
{% for slot in desk_info.exceptions %}
<div class="exception-hours"
style="height: {{ slot.css_height }}%; top: {{ slot.css_top }}%;"
>{% if slot.label %}<span class="exception-label">{{slot.label}}</span>{% endif %}</div>
{% endfor %}
{% endif %}
{% for booking in desk_info.bookings %}
<div class="booking{% if booking.color %} booking-color-{{ booking.color.index }}{% endif %}"
style="height: {{ booking.css_height }}%; min-height: {{ booking.css_height }}%; top: {{ booking.css_top }}%;"
><span class="start-time">{{booking.event.start_datetime|date:"TIME_FORMAT"}}</span>
<a {% if booking.get_backoffice_url %}href="{{booking.get_backoffice_url}}"{% endif %}>{{ booking.get_user_block }}</a>
<a rel="popup" class="cancel" href="{% url 'chrono-manager-booking-cancel' pk=booking.event.agenda_id booking_pk=booking.pk %}?next={{ request.path }}">{% trans "Cancel" %}</a>
{% if booking.color %}<span class="booking-color-label booking-bg-color-{{ booking.color.index }}">{{ booking.color }}</span>{% endif %}
</div>
{% endfor %}
</td>
{% endfor %}
</tr>
{% if forloop.last %}
</tbody>
</table>
{% endif %}
{% empty %}
<div class="closed-for-the-day">
<p>{% trans "No opening hours this day." %}</p>
</div>
{% endfor %}
{% if booking_colors %}
{% include "chrono/booking_color_legend.html" with colors=booking_colors %}
{% endif %}
{% endblock %}