67 lines
3.5 KiB
HTML
67 lines
3.5 KiB
HTML
{% extends "chrono/manager_agenda_month_view.html" %}
|
|
{% load i18n %}
|
|
|
|
{% block actions %}
|
|
{{ block.super }}
|
|
<a href="{% url 'chrono-manager-agenda-day-view' pk=agenda.id year=view.date|date:"Y" month=view.date|date:"m" day=view.date|date:"d" %}">{% trans 'Day view' %}</a>
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
|
|
{% for week_days in view.get_timetable_infos %}
|
|
{% if forloop.first %}
|
|
<table class="agenda-table month-view {% if single_desk %}single-desk{% endif %}">
|
|
<tbody>
|
|
{% endif %}
|
|
<tr>
|
|
<th></th>
|
|
{% for day in week_days.days %}
|
|
<th class="weekday {% if day.today %}today{% endif %}">{% if not day.other_month %}<a href="{% url 'chrono-manager-agenda-day-view' pk=agenda.id year=day.date|date:"Y" month=day.date|date:"m" day=day.date|date:"d" %}">{{ day.date|date:"l j" }}</a>{% endif %}</th>
|
|
{% endfor %}
|
|
</tr>
|
|
{% for hour in week_days.periods %}
|
|
<tr class="{% cycle 'odd' 'even' %}">
|
|
<th class="hour">{{ hour|date:"TIME_FORMAT" }}</th>
|
|
{% for day in week_days.days %}
|
|
<td class="{% if day.other_month %}other-month{% endif %} {% if day.today %}today{% endif %}">
|
|
{% if forloop.parentloop.first %}
|
|
{% for slot in day.infos.opening_hours %}
|
|
<div class="opening-hours" style="height:{{ slot.css_height|stringformat:".1f" }}%;top:{{ slot.css_top|stringformat:".1f" }}%;width:{{ slot.css_width|stringformat:".1f" }}%;left:{{ slot.css_left|stringformat:".1f" }}%;"></div>
|
|
{% endfor %}
|
|
|
|
{% for slot in day.infos.exceptions %}
|
|
<div class="exception-hours" style="height:{{ slot.css_height|stringformat:".1f" }}%;top:{{ slot.css_top|stringformat:".1f" }}%;width:{{ slot.css_width|stringformat:".1f" }}%;left:{{ slot.css_left|stringformat:".1f" }}%;" {% if slot.label %}title="{{ slot.label }}"{% endif %}></div>
|
|
{% endfor %}
|
|
|
|
{% for slot in day.infos.booked_slots %}
|
|
<div class="booking{% if slot.booking.color %} booking-color-{{ slot.booking.color.index }}{% endif %}" style="left:{{ slot.css_left|stringformat:".1f" }}%;height:{{ slot.css_height|stringformat:".1f" }}%;min-height:{{ slot.css_height|stringformat:".1f" }}%;top:{{ slot.css_top|stringformat:".1f" }}%;width:{{ slot.css_width|stringformat:".1f" }}%;">
|
|
<span class="start-time">{{slot.booking.event.start_datetime|date:"TIME_FORMAT"}}</span>
|
|
<a {% if slot.booking.get_backoffice_url %}href="{{slot.booking.get_backoffice_url}}"{% endif %}>{{ slot.booking.get_user_block }}</a>
|
|
<a rel="popup" class="cancel" href="{% url 'chrono-manager-booking-cancel' pk=slot.booking.event.agenda_id booking_pk=slot.booking.id %}?next={{ request.path }}">{% trans "Cancel" %}</a>
|
|
{% if not single_desk %}<span class="desk">{{ slot.desk }}</span>{% endif %}
|
|
{% if slot.booking.color %}<span class="booking-color-label booking-bg-color-{{ slot.booking.color.index }}">{{ slot.booking.color }}</span>{% endif %}
|
|
</div>
|
|
{% endfor %}
|
|
{% endif %}
|
|
</td>
|
|
{% endfor %}
|
|
</tr>
|
|
{% endfor %}
|
|
{% resetcycle %}
|
|
{% if forloop.last %}
|
|
</tbody>
|
|
</table>
|
|
{% endif %}
|
|
|
|
{% empty %}
|
|
<div class="closed-for-the-day">
|
|
<p>{% trans "No opening hours this month." %}</p>
|
|
</div>
|
|
{% endfor %}
|
|
|
|
{% if booking_colors %}
|
|
{% include "chrono/booking_color_legend.html" with colors=booking_colors %}
|
|
{% endif %}
|
|
|
|
{% endblock %}
|