57 lines
2.4 KiB
HTML
57 lines
2.4 KiB
HTML
{% extends "chrono/manager_agenda_month_view.html" %}
|
|
{% load i18n %}
|
|
|
|
{% block extra-actions %}
|
|
<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">
|
|
<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.booked_slots %}
|
|
<div class="booking" style="left:{{ slot.css_left|stringformat:".1f" }}%;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.backoffice_url %}href="{{slot.booking.backoffice_url}}"{% endif %}
|
|
>{% if slot.booking.label or slot.booking.user_name %}
|
|
{{slot.booking.label}}{% if slot.booking.label and slot.booking.user_name %} - {% endif %} {{slot.booking.user_name}}
|
|
{% else %}{% trans "booked" %}{% endif %}</a>
|
|
<span class="desk">{{ slot.desk }}</span>
|
|
</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 %}
|
|
|
|
{% endblock %}
|