62 lines
2.6 KiB
HTML
62 lines
2.6 KiB
HTML
{% extends "chrono/manager_resource_detail.html" %}
|
|
{% load i18n %}
|
|
|
|
{% block breadcrumb %}
|
|
{{ block.super }}
|
|
<a>{{ day|date:"SHORT_DATE_FORMAT" }}</a>
|
|
{% endblock %}
|
|
|
|
{% block appbar-title %}
|
|
<span class="buttons-group">
|
|
<a class="date-prev pk-button" href="{{ view.get_previous_day_url }}"><span class="sr-only">{% trans "Previous day" %}</span></a>
|
|
<a class="date-next pk-button" href="{{ view.get_next_day_url }}"><span class="sr-only">{% trans "Next day" %}</span></a>
|
|
</span>
|
|
<h2 class="date-nav">
|
|
<span class="date-title">{{ view.date|date:"l j F Y" }}</span>
|
|
<button class="date-picker-opener"><span class="sr-only">{% trans "Pick a date" %}</span></button>
|
|
{% with selected_day=view.date|date:"j" selected_month=view.date|date:"n" selected_year=view.date|date:"Y" %}
|
|
<div class="date-picker" style="display: none">
|
|
<select name="day">{% for day in view.get_days %}<option value="{{ day }}" {% if selected_day == day %}selected{% endif %}>{{day}}</option>{% endfor %}</select>
|
|
<select name="month">{% for month, month_label in view.get_months %}<option value="{{ month }}" {% if selected_month == month %}selected{% endif %}>{{ month_label }}</option>{% endfor %}</select>
|
|
<select name="year">{% for year in view.get_years %}<option value="{{ year }}" {% if selected_year == year %}selected{% endif %}>{{year}}</option>{% endfor %}</select>
|
|
<button>{% trans 'Set Date' %}</button>
|
|
</div>
|
|
{% endwith %}
|
|
</h2>
|
|
{% endblock %}
|
|
{% block appbar-extras %}
|
|
{% include "chrono/manager_resource_view_buttons_fragment.html" with active='day' %}
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
|
|
{% for period, resource_info in view.get_timetable_infos %}
|
|
|
|
{% if forloop.first %}
|
|
<table class="agenda-table day-view hourspan-{{ hour_span }}">
|
|
<tbody>
|
|
{% endif %}
|
|
<tr class="{% cycle 'odd' 'even' %}">
|
|
<th class="hour">{{ period|date:"TIME_FORMAT" }}</th>
|
|
<td>
|
|
{% for booking in resource_info.bookings %}
|
|
<div class="booking"
|
|
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>
|
|
</div>
|
|
{% endfor %}
|
|
</td>
|
|
</tr>
|
|
{% if forloop.last %}
|
|
</tbody>
|
|
</table>
|
|
{% endif %}
|
|
{% empty %}
|
|
<div class="closed-for-the-day">
|
|
<p>{% trans "No bookings this day." %}</p>
|
|
</div>
|
|
{% endfor %}
|
|
|
|
{% endblock %}
|