misc: apply djhtml (#69404)

This commit is contained in:
Valentin Deniaud 2022-09-21 17:28:29 +02:00
parent 651931f7d2
commit 7c0eb04c45
79 changed files with 2173 additions and 2173 deletions

View File

@ -2,15 +2,15 @@
{% load i18n %}
{% block content %}
<p>{% trans "Hi," %}</p>
<p>{% trans "Hi," %}</p>
<p>
{% blocktrans %}
You have been notified because the status of event "{{ event }}" has changed.
{% endblocktrans %}
</p>
<p>
{% blocktrans %}
You have been notified because the status of event "{{ event }}" has changed.
{% endblocktrans %}
</p>
{% with _("View event") as button_label %}
{% include "emails/button-link.html" with url=event_url label=button_label %}
{% endwith %}
{% with _("View event") as button_label %}
{% include "emails/button-link.html" with url=event_url label=button_label %}
{% endwith %}
{% endblock %}

View File

@ -2,35 +2,35 @@
{% load i18n %}
{% block content %}
<p>{% trans "Hi," %}</p>
<p>{% trans "Hi," %}</p>
<p>
{% blocktrans trimmed with event=booking.event date=date|date:"l j F" time=date|time %}
You have a booking for event "{{ event }}", on {{ date }} at {{ time }}.
{% endblocktrans %}
</p>
<p>
{% blocktrans trimmed with event=booking.event date=date|date:"l j F" time=date|time %}
You have a booking for event "{{ event }}", on {{ date }} at {{ time }}.
{% endblocktrans %}
</p>
{% if email_extra_info %}
<p>{{ email_extra_info|force_escape|linebreaks }}</p>
{% endif %}
{% if email_extra_info %}
<p>{{ email_extra_info|force_escape|linebreaks }}</p>
{% endif %}
{% if booking.event.description %}
<p>{% trans "Additional information:" %}</p>
{{ booking.event.description|linebreaks }}
{% endif %}
{% if booking.event.description %}
<p>{% trans "Additional information:" %}</p>
{{ booking.event.description|linebreaks }}
{% endif %}
{% if booking.event.pricing %}
<p>{% trans "Pricing:" %} {{ booking.event.pricing }}</p>
{% endif %}
{% if booking.event.pricing %}
<p>{% trans "Pricing:" %} {{ booking.event.pricing }}</p>
{% endif %}
{% if booking.event.url %}
{% firstof event_url_button_label _("More information") as button_label %}
{% include "emails/button-link.html" with url=booking.event.url label=button_label %}
{% endif %}
{% if booking.event.url %}
{% firstof event_url_button_label _("More information") as button_label %}
{% include "emails/button-link.html" with url=booking.event.url label=button_label %}
{% endif %}
{% if booking.form_url %}
{% with _("Edit or cancel booking") as button_label %}
{% include "emails/button-link.html" with url=booking.get_form_url label=button_label %}
{% endwith %}
{% endif %}
{% if booking.form_url %}
{% with _("Edit or cancel booking") as button_label %}
{% include "emails/button-link.html" with url=booking.get_form_url label=button_label %}
{% endwith %}
{% endif %}
{% endblock %}

View File

@ -2,27 +2,27 @@
{% load i18n %}
{% block content %}
<p>{% trans "Hi," %}</p>
<p>{% trans "Hi," %}</p>
<p>
{% with date=date|date:"l j F" time=date|time %}
{% if booking.user_display_label %}
{% blocktrans trimmed with meeting=booking.user_display_label %}
Your meeting "{{ meeting }}" is scheduled on {{ date }} at {{ time }}.
{% endblocktrans %}
{% else %}
{% blocktrans %}You have a meeting scheduled on {{ date }} at {{ time }}.{% endblocktrans %}
{% endif %}
{% endwith %}
</p>
<p>
{% with date=date|date:"l j F" time=date|time %}
{% if booking.user_display_label %}
{% blocktrans trimmed with meeting=booking.user_display_label %}
Your meeting "{{ meeting }}" is scheduled on {{ date }} at {{ time }}.
{% endblocktrans %}
{% else %}
{% blocktrans %}You have a meeting scheduled on {{ date }} at {{ time }}.{% endblocktrans %}
{% endif %}
{% endwith %}
</p>
{% if email_extra_info %}
<p>{{ email_extra_info|force_escape|linebreaks }}</p>
{% endif %}
{% if email_extra_info %}
<p>{{ email_extra_info|force_escape|linebreaks }}</p>
{% endif %}
{% if booking.form_url %}
{% with _("Edit or cancel meeting") as button_label %}
{% include "emails/button-link.html" with url=booking.get_form_url label=button_label %}
{% endwith %}
{% endif %}
{% if booking.form_url %}
{% with _("Edit or cancel meeting") as button_label %}
{% include "emails/button-link.html" with url=booking.get_form_url label=button_label %}
{% endwith %}
{% endif %}
{% endblock %}

View File

@ -1,15 +1,15 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<div style="max-width: 60ex;">
<div class="content">
{% block content %}
{{ content }}
{% endblock %}
<head>
<meta charset="utf-8">
</head>
<body>
<div style="max-width: 60ex;">
<div class="content">
{% block content %}
{{ content }}
{% endblock %}
</div>
</div>
</div>
</body>
</body>
</html>

View File

@ -2,21 +2,21 @@
{% load i18n %}
{% block breadcrumb %}
{{ block.super }}
<a href="{% url 'chrono-manager-agendas-import' %}">{% trans 'Export' %}</a>
{{ block.super }}
<a href="{% url 'chrono-manager-agendas-import' %}">{% trans 'Export' %}</a>
{% endblock %}
{% block appbar %}
<h2>{% trans "Export" %}</h2>
<h2>{% trans "Export" %}</h2>
{% endblock %}
{% block content %}
<form method="post" enctype="multipart/form-data">
{% csrf_token %}
{{ form.as_p }}
<div class="buttons">
<button class="submit-button">{% trans "Export" %}</button>
<a class="cancel" href="{% url 'chrono-manager-homepage' %}">{% trans 'Cancel' %}</a>
</div>
</form>
<form method="post" enctype="multipart/form-data">
{% csrf_token %}
{{ form.as_p }}
<div class="buttons">
<button class="submit-button">{% trans "Export" %}</button>
<a class="cancel" href="{% url 'chrono-manager-homepage' %}">{% trans 'Cancel' %}</a>
</div>
</form>
{% endblock %}

View File

@ -2,21 +2,21 @@
{% load i18n %}
{% block breadcrumb %}
{{ block.super }}
<a href="{% url 'chrono-manager-agendas-import' %}">{% trans 'Import' %}</a>
{{ block.super }}
<a href="{% url 'chrono-manager-agendas-import' %}">{% trans 'Import' %}</a>
{% endblock %}
{% block appbar %}
<h2>{% trans "Import" %}</h2>
<h2>{% trans "Import" %}</h2>
{% endblock %}
{% block content %}
<form method="post" enctype="multipart/form-data">
{% csrf_token %}
{{ form.as_p }}
<div class="buttons">
<button class="submit-button">{% trans "Import" %}</button>
<a class="cancel" href="{% url 'chrono-manager-homepage' %}">{% trans 'Cancel' %}</a>
</div>
</form>
<form method="post" enctype="multipart/form-data">
{% csrf_token %}
{{ form.as_p }}
<div class="buttons">
<button class="submit-button">{% trans "Import" %}</button>
<a class="cancel" href="{% url 'chrono-manager-homepage' %}">{% trans 'Cancel' %}</a>
</div>
</form>
{% endblock %}

View File

@ -1,8 +1,8 @@
{% load i18n %}
<div class="booking-colors">
<strong>{% trans "Booking colors:" %}</strong>
{% for color in colors %}
<span class="booking-color-label booking-bg-color-{{ color.index }}">{{ color }}</span>
{% endfor %}
<strong>{% trans "Booking colors:" %}</strong>
{% for color in colors %}
<span class="booking-color-label booking-bg-color-{{ color.index }}">{{ color }}</span>
{% endfor %}
</div>

View File

@ -2,17 +2,17 @@
{% load i18n %}
{% block appbar %}
<h2>{% trans "New Agenda" %}</h2>
<h2>{% trans "New Agenda" %}</h2>
{% endblock %}
{% block content %}
<form method="post" enctype="multipart/form-data">
{% csrf_token %}
{{ form.as_p }}
<div class="buttons">
<button class="submit-button">{% trans "Save" %}</button>
<a class="cancel" href="{% url 'chrono-manager-homepage' %}">{% trans 'Cancel' %}</a>
</div>
</form>
<form method="post" enctype="multipart/form-data">
{% csrf_token %}
{{ form.as_p }}
<div class="buttons">
<button class="submit-button">{% trans "Save" %}</button>
<a class="cancel" href="{% url 'chrono-manager-homepage' %}">{% trans 'Cancel' %}</a>
</div>
</form>
{% endblock %}

View File

@ -4,30 +4,30 @@
{% block bodyargs %}class="dayview"{% endblock %}
{% block breadcrumb %}
{{ block.super }}
<a>{{ day|date:"SHORT_DATE_FORMAT" }}</a>
{{ block.super }}
<a>{{ day|date:"SHORT_DATE_FORMAT" }}</a>
{% endblock %}
{% block appbar %}
<h2>
<a href="{{ view.get_previous_day_url }}"></a>
<span class="date-title">{{ view.date|date:"l j F Y" }}</span>
{% 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 %}
<a href="{{ view.get_next_day_url }}"></a>
</h2>
<span class="actions">
{% block actions %}
{% if user_can_manage %}
<a href="{% url 'chrono-manager-agenda-settings' pk=agenda.id %}">{% trans 'Settings' %}</a>
{% endif %}
<a href="" onclick="window.print()">{% trans 'Print' %}</a>
{% endblock %}
</span>
<h2>
<a href="{{ view.get_previous_day_url }}"></a>
<span class="date-title">{{ view.date|date:"l j F Y" }}</span>
{% 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 %}
<a href="{{ view.get_next_day_url }}"></a>
</h2>
<span class="actions">
{% block actions %}
{% if user_can_manage %}
<a href="{% url 'chrono-manager-agenda-settings' pk=agenda.id %}">{% trans 'Settings' %}</a>
{% endif %}
<a href="" onclick="window.print()">{% trans 'Print' %}</a>
{% endblock %}
</span>
{% endblock %}

View File

@ -2,21 +2,21 @@
{% load i18n %}
{% block breadcrumb %}
{{ block.super }}
<a href="">{% trans "Duplicate Agenda" %}</a>
{{ block.super }}
<a href="">{% trans "Duplicate Agenda" %}</a>
{% endblock %}
{% block appbar %}
<h2>{% trans "Duplicate Agenda" %}</h2>
<h2>{% trans "Duplicate Agenda" %}</h2>
{% endblock %}
{% block content %}
<form method="post" enctype="multipart/form-data">
{% csrf_token %}
{{ form.as_p }}
<div class="buttons">
<button class="submit-button">{% trans "Duplicate" %}</button>
<a class="cancel" href="{% url 'chrono-manager-agenda-settings' pk=agenda.id %}">{% trans 'Cancel' %}</a>
</div>
</form>
<form method="post" enctype="multipart/form-data">
{% csrf_token %}
{{ form.as_p }}
<div class="buttons">
<button class="submit-button">{% trans "Duplicate" %}</button>
<a class="cancel" href="{% url 'chrono-manager-agenda-settings' pk=agenda.id %}">{% trans 'Cancel' %}</a>
</div>
</form>
{% endblock %}

View File

@ -1,25 +1,25 @@
{% load i18n %}
<li class="{% if event.booked_places > event.places %}overbooking{% endif %}
{% if event.main_list_full %}full{% endif %}
{% if event.cancellation_status %}cancelled{% endif %}
{% if not event.in_bookable_period %}not-{% endif %}bookable"
{% if event.places %}
data-total="{{ event.places }}" data-booked="{{ event.booked_places }}"
{% elif event.waiting_list_places %}
data-total="{{ event.waiting_list_places }}" data-booked="{{ event.booked_waiting_list_places }}"
{% endif %}
><a href="{% if view_mode == 'settings_view' %}{% url 'chrono-manager-event-edit' pk=agenda.pk event_pk=event.pk %}?next=settings{% elif event.pk %}{% url 'chrono-manager-event-view' pk=agenda.pk event_pk=event.pk %}{% else %}{% url 'chrono-manager-event-create-recurrence' pk=agenda.pk event_identifier=event.slug %}{% endif %}">
{% if event.cancellation_status %}
{% if event.main_list_full %}full{% endif %}
{% if event.cancellation_status %}cancelled{% endif %}
{% if not event.in_bookable_period %}not-{% endif %}bookable"
{% if event.places %}
data-total="{{ event.places }}" data-booked="{{ event.booked_places }}"
{% elif event.waiting_list_places %}
data-total="{{ event.waiting_list_places }}" data-booked="{{ event.booked_waiting_list_places }}"
{% endif %}
><a href="{% if view_mode == 'settings_view' %}{% url 'chrono-manager-event-edit' pk=agenda.pk event_pk=event.pk %}?next=settings{% elif event.pk %}{% url 'chrono-manager-event-view' pk=agenda.pk event_pk=event.pk %}{% else %}{% url 'chrono-manager-event-create-recurrence' pk=agenda.pk event_identifier=event.slug %}{% endif %}">
{% if event.cancellation_status %}
<span class="tag">{{ event.cancellation_status }}</span>
{% else %}
{% if event.main_list_full %}
{% else %}
{% if event.main_list_full %}
<span class="full tag">{% trans "Full" %}</span>
{% endif %}
{% if event.checked %}
<span class="checked tag">{% trans "Checked" %}</span>
{% endif %}
{% endif %}
<span class="event-info">
{% if event.checked %}
<span class="checked tag">{% trans "Checked" %}</span>
{% endif %}
{% endif %}
<span class="event-info">
{% if view_mode == 'settings_view' %}
{% if event.label %}{{ event.label }} {% endif %}[{% trans "identifier:" %} {{ event.slug }}]
{% else %}
@ -31,31 +31,31 @@
{{ event.get_recurrence_display }}
{% endif %}
{% if view_mode != 'settings_view' %}
{% if event.places or event.waiting_list_places %}-{% endif %}
{% if event.places %}
{% blocktrans count remaining_places=event.remaining_places %}{{ remaining_places }} remaining place{% plural %}{{ remaining_places }} remaining places{% endblocktrans %}
({% blocktrans with places=event.places count booked_places=event.booked_places %}{{ booked_places }}/{{ places }} booking{% plural %}{{ booked_places }}/{{ places }} bookings{% endblocktrans %})
{% endif %}
{% if event.waiting_list_places %}
({% trans "Waiting list:" %}
{% blocktrans count remaining_places=event.remaining_waiting_list_places %}{{ remaining_places }} remaining place{% plural %}{{ remaining_places }} remaining places{% endblocktrans %}
-
{% blocktrans with places=event.waiting_list_places count booked_places=event.booked_waiting_list_places %}{{ booked_places }}/{{ places }} booking{% plural %}{{ booked_places }}/{{ places }} bookings{% endblocktrans %})
{% endif %}
{% if event.places or event.waiting_list_places %}-{% endif %}
{% if event.places %}
{% blocktrans count remaining_places=event.remaining_places %}{{ remaining_places }} remaining place{% plural %}{{ remaining_places }} remaining places{% endblocktrans %}
({% blocktrans with places=event.places count booked_places=event.booked_places %}{{ booked_places }}/{{ places }} booking{% plural %}{{ booked_places }}/{{ places }} bookings{% endblocktrans %})
{% endif %}
{% if event.waiting_list_places %}
({% trans "Waiting list:" %}
{% blocktrans count remaining_places=event.remaining_waiting_list_places %}{{ remaining_places }} remaining place{% plural %}{{ remaining_places }} remaining places{% endblocktrans %}
-
{% blocktrans with places=event.waiting_list_places count booked_places=event.booked_waiting_list_places %}{{ booked_places }}/{{ places }} booking{% plural %}{{ booked_places }}/{{ places }} bookings{% endblocktrans %})
{% endif %}
{% endif %}
{% if view_mode == 'settings_view' and event.publication_datetime %}
({% trans "publication date:" %} {{ event.publication_datetime }})
({% trans "publication date:" %} {{ event.publication_datetime }})
{% endif %}
{% if not event.in_bookable_period %}
({% trans "out of bookable period" %})
({% trans "out of bookable period" %})
{% endif %}
</span>
</a>
{% if view_mode == 'settings_view' %}
</span>
</a>
{% if view_mode == 'settings_view' %}
<a rel="popup" class="link-action-icon duplicate" href="{% url 'chrono-manager-event-duplicate' pk=agenda.pk event_pk=event.pk %}">{% trans 'Duplicate' %}</a>
<a rel="popup" class="delete" href="{% url 'chrono-manager-event-delete' pk=agenda.pk event_pk=event.pk %}?next=settings">{% trans "remove" %}</a>
{% elif agenda.booking_form_url %}
{% elif agenda.booking_form_url %}
<a class="link-action-text" href="{{ event.get_booking_form_url }}&ReturnURL={{ request.build_absolute_uri }}">{% trans "Booking form" %}</a>
{% endif %}
<span class="occupation-bar"></span>
{% endif %}
<span class="occupation-bar"></span>
</li>

View File

@ -2,22 +2,22 @@
{% load i18n %}
{% block breadcrumb %}
{{ block.super }}
<a href="{{ agenda.get_settings_url }}">{% trans 'Settings' %}</a>
<a href="">{% firstof title view.title %}</a>
{{ block.super }}
<a href="{{ agenda.get_settings_url }}">{% trans 'Settings' %}</a>
<a href="">{% firstof title view.title %}</a>
{% endblock %}
{% block appbar %}
<h2>{% firstof title view.title %}</h2>
<h2>{% firstof title view.title %}</h2>
{% endblock %}
{% block content %}
<form method="post" enctype="multipart/form-data">
{% csrf_token %}
{{ form.as_p }}
<div class="buttons">
<button class="submit-button">{% trans "Save" %}</button>
<a class="cancel" href="{{ agenda.get_settings_url }}">{% trans 'Cancel' %}</a>
</div>
</form>
<form method="post" enctype="multipart/form-data">
{% csrf_token %}
{{ form.as_p }}
<div class="buttons">
<button class="submit-button">{% trans "Save" %}</button>
<a class="cancel" href="{{ agenda.get_settings_url }}">{% trans 'Cancel' %}</a>
</div>
</form>
{% endblock %}

View File

@ -4,29 +4,29 @@
{% block bodyargs %}class="monthview"{% endblock %}
{% block breadcrumb %}
{{ block.super }}
<a>{{ view.date|date:"F Y" }}</a>
{{ block.super }}
<a>{{ view.date|date:"F Y" }}</a>
{% endblock %}
{% block appbar %}
<h2>
<a href="{{ view.get_previous_month_url }}"></a>
<span class="date-title">{{ view.date|date:"F Y" }}</span>
{% with selected_month=view.date|date:"n" selected_year=view.date|date:"Y" %}
<div class="date-picker" style="display: none">
<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 %}
<a href="{{ view.get_next_month_url }}"></a>
</h2>
<span class="actions">
{% block actions %}
{% if user_can_manage %}
<a href="{{ agenda.get_settings_url }}">{% trans 'Settings' %}</a>
{% endif %}
<a href="" onclick="window.print()">{% trans 'Print' %}</a>
{% endblock %}
</span>
<h2>
<a href="{{ view.get_previous_month_url }}"></a>
<span class="date-title">{{ view.date|date:"F Y" }}</span>
{% with selected_month=view.date|date:"n" selected_year=view.date|date:"Y" %}
<div class="date-picker" style="display: none">
<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 %}
<a href="{{ view.get_next_month_url }}"></a>
</h2>
<span class="actions">
{% block actions %}
{% if user_can_manage %}
<a href="{{ agenda.get_settings_url }}">{% trans 'Settings' %}</a>
{% endif %}
<a href="" onclick="window.print()">{% trans 'Print' %}</a>
{% endblock %}
</span>
{% endblock %}

View File

@ -2,34 +2,34 @@
{% load i18n %}
{% block breadcrumb %}
{{ block.super }}
<a href="{% url 'chrono-manager-agenda-settings' agenda.pk %}">{% trans 'Settings' %}</a>
<a href="">{% trans "Notification settings" %}</a>
{{ block.super }}
<a href="{% url 'chrono-manager-agenda-settings' agenda.pk %}">{% trans 'Settings' %}</a>
<a href="">{% trans "Notification settings" %}</a>
{% endblock %}
{% block appbar %}
<h2>{% trans "Notification settings" %}</h2>
<h2>{% trans "Notification settings" %}</h2>
{% endblock %}
{% block content %}
<form method="post" enctype="multipart/form-data">
{% csrf_token %}
{{ form.as_p }}
<div class="buttons">
<button class="submit-button">{% trans "Save" %}</button>
<a class="cancel" href="{% url 'chrono-manager-agenda-settings' pk=agenda.id %}">{% trans 'Cancel' %}</a>
</div>
<form method="post" enctype="multipart/form-data">
{% csrf_token %}
{{ form.as_p }}
<div class="buttons">
<button class="submit-button">{% trans "Save" %}</button>
<a class="cancel" href="{% url 'chrono-manager-agenda-settings' pk=agenda.id %}">{% trans 'Cancel' %}</a>
</div>
<script>
$('select').change(function(){
role_field_id = $(this).attr('id')
email_field_id = '#' + role_field_id + '_emails'
if ($(this).val() == 'use-email-field')
$(email_field_id).parent('p').show();
else
$(email_field_id).parent('p').hide();
});
$('select').trigger('change');
</script>
</form>
<script>
$('select').change(function(){
role_field_id = $(this).attr('id')
email_field_id = '#' + role_field_id + '_emails'
if ($(this).val() == 'use-email-field')
$(email_field_id).parent('p').show();
else
$(email_field_id).parent('p').hide();
});
$('select').trigger('change');
</script>
</form>
{% endblock %}

View File

@ -4,42 +4,42 @@
{% block bodyargs %}class="openevents"{% endblock %}
{% block breadcrumb %}
{{ block.super }}
<a href="{% url 'chrono-manager-agenda-open-events-view' pk=agenda.pk %}">{% trans "Open events" %}</a>
{{ block.super }}
<a href="{% url 'chrono-manager-agenda-open-events-view' pk=agenda.pk %}">{% trans "Open events" %}</a>
{% endblock %}
{% block actions %}
{% if agenda.subscriptions.exists %}
<a class="extra-actions-menu-opener"></a>
<ul class="extra-actions-menu">
<li><a href="{% url 'chrono-manager-events-timesheet' pk=agenda.pk %}">{% trans 'Timesheet' %}</a></li>
</ul>
{% endif %}
{{ block.super }}
<a href="{% url 'chrono-manager-agenda-month-redirect-view' pk=agenda.pk %}">{% trans 'Month view' %}</a>
{% if agenda.subscriptions.exists %}
<a class="extra-actions-menu-opener"></a>
<ul class="extra-actions-menu">
<li><a href="{% url 'chrono-manager-events-timesheet' pk=agenda.pk %}">{% trans 'Timesheet' %}</a></li>
</ul>
{% endif %}
{{ block.super }}
<a href="{% url 'chrono-manager-agenda-month-redirect-view' pk=agenda.pk %}">{% trans 'Month view' %}</a>
{% endblock %}
{% block content %}
<div class="section">
<h3>{% trans "Open events" %}</h3>
<div>
{% if open_events %}
{% for event in open_events %}
{% ifchanged event.start_datetime|date:'n' event.start_datetime|date:'y' %}
{% if not forloop.first %}</ul>{% endif %}
<h4>{{ event.start_datetime|date:'YEAR_MONTH_FORMAT'|capfirst }}</h4>
<ul class="objects-list single-links">
{% endifchanged %}
{% include 'chrono/manager_agenda_event_fragment.html' %}
{% if forloop.last %}</ul>{% endif %}
{% endfor %}
{% else %}
<div class="big-msg-info">
{% blocktrans %}
This agenda doesn't have any open event configured.
{% endblocktrans %}
</div>
{% endif %}
</div>
</div>
<div class="section">
<h3>{% trans "Open events" %}</h3>
<div>
{% if open_events %}
{% for event in open_events %}
{% ifchanged event.start_datetime|date:'n' event.start_datetime|date:'y' %}
{% if not forloop.first %}</ul>{% endif %}
<h4>{{ event.start_datetime|date:'YEAR_MONTH_FORMAT'|capfirst }}</h4>
<ul class="objects-list single-links">
{% endifchanged %}
{% include 'chrono/manager_agenda_event_fragment.html' %}
{% if forloop.last %}</ul>{% endif %}
{% endfor %}
{% else %}
<div class="big-msg-info">
{% blocktrans %}
This agenda doesn't have any open event configured.
{% endblocktrans %}
</div>
{% endif %}
</div>
</div>
{% endblock %}

View File

@ -2,26 +2,26 @@
{% load i18n %}
{% block breadcrumb %}
{{ block.super }}
<a href="">{% trans "Reminder message preview" %}</a>
{{ block.super }}
<a href="">{% trans "Reminder message preview" %}</a>
{% endblock %}
{% block appbar %}
<h2>{% trans "Reminder message preview" %}</h2>
<h2>{% trans "Reminder message preview" %}</h2>
{% endblock %}
{% block content %}
<div id="message-preview">
{% if subject %}
<p>{% trans "Users will receive the following email:" %}</p>
<p class="email-subject"><strong>{% trans "Subject:" %}</strong> {{ subject }}</p>
{% else %}
<p>{% trans "Users will receive the following SMS:" %}</p>
{% endif %}
<p>{{ message }}</p>
<div id="message-preview">
{% if subject %}
<p>{% trans "Users will receive the following email:" %}</p>
<p class="email-subject"><strong>{% trans "Subject:" %}</strong> {{ subject }}</p>
{% else %}
<p>{% trans "Users will receive the following SMS:" %}</p>
{% endif %}
<p>{{ message }}</p>
<div class="buttons">
<a class="button" href="{% url 'chrono-manager-agenda-settings' pk=agenda.id %}">{% trans 'Return to settings' %}</a>
</div>
</div>
<div class="buttons">
<a class="button" href="{% url 'chrono-manager-agenda-settings' pk=agenda.id %}">{% trans 'Return to settings' %}</a>
</div>
</div>
{% endblock %}

View File

@ -2,22 +2,22 @@
{% load i18n %}
{% block breadcrumb %}
{{ block.super }}
<a href="">{% trans "Add resource" %}</a>
{{ block.super }}
<a href="">{% trans "Add resource" %}</a>
{% endblock %}
{% block appbar %}
<h2>{% trans "Add resource" %}</h2>
<h2>{% trans "Add resource" %}</h2>
{% endblock %}
{% block content %}
<form method="post" enctype="multipart/form-data">
{% csrf_token %}
{{ form.as_p }}
<div class="buttons">
<button class="submit-button">{% trans "Save" %}</button>
<a class="cancel" href="{% url 'chrono-manager-agenda-settings' pk=agenda.pk %}">{% trans 'Cancel' %}</a>
</div>
</form>
<form method="post" enctype="multipart/form-data">
{% csrf_token %}
{{ form.as_p }}
<div class="buttons">
<button class="submit-button">{% trans "Save" %}</button>
<a class="cancel" href="{% url 'chrono-manager-agenda-settings' pk=agenda.pk %}">{% trans 'Cancel' %}</a>
</div>
</form>
{% endblock %}

View File

@ -2,110 +2,110 @@
{% load i18n %}
{% block breadcrumb %}
{{ block.super }}
{% if desk %}
<a href="{% url 'chrono-manager-agenda-settings' desk.agenda_id %}">{% trans "Settings" %}</a>
{% else %}
<a href="{% url 'chrono-manager-agenda-settings' agenda.id|default:object.id %}">{% trans "Settings" %}</a>
{% endif %}
{{ block.super }}
{% if desk %}
<a href="{% url 'chrono-manager-agenda-settings' desk.agenda_id %}">{% trans "Settings" %}</a>
{% else %}
<a href="{% url 'chrono-manager-agenda-settings' agenda.id|default:object.id %}">{% trans "Settings" %}</a>
{% endif %}
{% endblock %}
{% block appbar %}
<h2>{% trans "Settings" %}
<h2>{% trans "Settings" %}
<span class="identifier">[{% trans "identifier:" %} {{object.slug}}]</span>
</h2>
<span class="actions">
<a class="extra-actions-menu-opener"></a>
{% block agenda-extra-management-actions %}
{% endblock %}
<ul class="extra-actions-menu">
<li><a rel="popup" href="{% url 'chrono-manager-agenda-edit' pk=object.id %}">{% trans 'Options' %}</a></li>
{% block agenda-extra-menu-actions %}{% endblock %}
<li><a rel="popup" class="action-duplicate" href="{% url 'chrono-manager-agenda-duplicate' pk=object.pk %}">{% trans 'Duplicate' %}</a></li>
<li><a download href="{% url 'chrono-manager-agenda-export' pk=object.id %}">{% trans 'Export Configuration (JSON)' %}</a></li>
{% if object.kind == 'events' %}
<li><a download href="{% url 'chrono-manager-agenda-export-events' pk=object.pk %}">{% trans 'Export Events (CSV)' %}</a></li>
{% endif %}
{% if user.is_staff %}
<li><a rel="popup" href="{% url 'chrono-manager-agenda-delete' pk=object.id %}">{% trans 'Delete' %}</a></li>
{% endif %}
</ul>
</span>
</h2>
<span class="actions">
<a class="extra-actions-menu-opener"></a>
{% block agenda-extra-management-actions %}
{% endblock %}
<ul class="extra-actions-menu">
<li><a rel="popup" href="{% url 'chrono-manager-agenda-edit' pk=object.id %}">{% trans 'Options' %}</a></li>
{% block agenda-extra-menu-actions %}{% endblock %}
<li><a rel="popup" class="action-duplicate" href="{% url 'chrono-manager-agenda-duplicate' pk=object.pk %}">{% trans 'Duplicate' %}</a></li>
<li><a download href="{% url 'chrono-manager-agenda-export' pk=object.id %}">{% trans 'Export Configuration (JSON)' %}</a></li>
{% if object.kind == 'events' %}
<li><a download href="{% url 'chrono-manager-agenda-export-events' pk=object.pk %}">{% trans 'Export Events (CSV)' %}</a></li>
{% endif %}
{% if user.is_staff %}
<li><a rel="popup" href="{% url 'chrono-manager-agenda-delete' pk=object.id %}">{% trans 'Delete' %}</a></li>
{% endif %}
</ul>
</span>
{% endblock %}
{% block content %}
<div class="section agenda-settings">
<div class="pk-tabs">
<div class="pk-tabs--tab-list" role="tablist">
{% block agenda-settings-extra-tab-buttons %}{% endblock %}
{% if object.kind != 'virtual' %}
<button aria-controls="panel-reminders" aria-selected="false" id="tab-reminders" role="tab" tabindex="-1">{% trans "Booking reminders" %}</button>
{% endif %}
<button aria-controls="panel-delays" aria-selected="false" id="tab-delays" role="tab" tabindex="-1">{% trans "Booking Delays" %}</button>
<button aria-controls="panel-permissions" aria-selected="false" id="tab-permissions" role="tab" tabindex="-1">{% trans "Permissions" %}</button>
</div>
<div class="pk-tabs--container">
{% block agenda-settings-extra-tab-list %}{% endblock %}
{% if object.kind != 'virtual' %}
<div aria-labelledby="tab-reminders" id="panel-reminders" role="tabpanel" tabindex="0" hidden="">
{% for info in agenda.reminder_settings.display_info %}
<p>{{ info }}</p>
{% empty %}
<p>{% trans "Reminders are disabled for this agenda." %}</p>
{% endfor %}
<p>
{% if agenda.reminder_settings.days_before_email %}
<a rel="popup" data-selector="#message-preview" href="{% url 'chrono-manager-agenda-reminder-preview' pk=object.id type='email' %}">{% trans "Preview email" %}</a>
<div class="section agenda-settings">
<div class="pk-tabs">
<div class="pk-tabs--tab-list" role="tablist">
{% block agenda-settings-extra-tab-buttons %}{% endblock %}
{% if object.kind != 'virtual' %}
<button aria-controls="panel-reminders" aria-selected="false" id="tab-reminders" role="tab" tabindex="-1">{% trans "Booking reminders" %}</button>
{% endif %}
{% if agenda.reminder_settings.days_before_sms %}
<a rel="popup" data-selector="#message-preview" href="{% url 'chrono-manager-agenda-reminder-preview' pk=object.id type='sms' %}">{% trans "Preview SMS" %}</a>
{% endif %}
</p>
{% if agenda.reminder_settings.days_before_email or agenda.reminder_settings.days_before_sms %}
<p>
<a rel="popup" href="{% url 'chrono-manager-agenda-reminder-test' pk=object.pk %}">{% trans "Test reminder sending" %}</a>
</p>
{% endif %}
<div class="panel--buttons">
<a rel="popup" class="button" href="{% url 'chrono-manager-agenda-reminder-settings' pk=object.id %}">{% trans "Configure" %}</a>
<button aria-controls="panel-delays" aria-selected="false" id="tab-delays" role="tab" tabindex="-1">{% trans "Booking Delays" %}</button>
<button aria-controls="panel-permissions" aria-selected="false" id="tab-permissions" role="tab" tabindex="-1">{% trans "Permissions" %}</button>
</div>
</div>
{% endif %}
<div class="pk-tabs--container">
<div aria-labelledby="tab-delays" hidden="" id="panel-delays" role="tabpanel" tabindex="0">
<ul>
<li>{% trans "Minimal booking delay:" %}
{% if agenda.minimal_booking_delay is not None %}
{% if agenda.minimal_booking_delay_in_working_days %}
{% blocktrans count count=agenda.minimal_booking_delay %}{{ count }} working day{% plural %}{{ count }} working days{% endblocktrans %}
{% else %}
{% blocktrans count count=agenda.minimal_booking_delay %}{{ count }} day{% plural %}{{ count }} days{% endblocktrans %}
{% block agenda-settings-extra-tab-list %}{% endblock %}
{% if object.kind != 'virtual' %}
<div aria-labelledby="tab-reminders" id="panel-reminders" role="tabpanel" tabindex="0" hidden="">
{% for info in agenda.reminder_settings.display_info %}
<p>{{ info }}</p>
{% empty %}
<p>{% trans "Reminders are disabled for this agenda." %}</p>
{% endfor %}
<p>
{% if agenda.reminder_settings.days_before_email %}
<a rel="popup" data-selector="#message-preview" href="{% url 'chrono-manager-agenda-reminder-preview' pk=object.id type='email' %}">{% trans "Preview email" %}</a>
{% endif %}
{% else %}<i>{% trans "undefined" %}</i>{% endif %}</li>
<li>{% trans "Maximal booking delay:" %}
{% if agenda.maximal_booking_delay is not None %}
{% blocktrans count count=agenda.maximal_booking_delay %}{{ count }} day{% plural %}{{ count }} days{% endblocktrans %}
{% else %}<i>{% trans "undefined" %}</i>{% endif %}</li>
</ul>
<div class="panel--buttons">
<a rel="popup" class="button" href="{% url 'chrono-manager-agenda-booking-delays' pk=object.id %}">{% trans 'Configure' %}</a>
{% if agenda.reminder_settings.days_before_sms %}
<a rel="popup" data-selector="#message-preview" href="{% url 'chrono-manager-agenda-reminder-preview' pk=object.id type='sms' %}">{% trans "Preview SMS" %}</a>
{% endif %}
</p>
{% if agenda.reminder_settings.days_before_email or agenda.reminder_settings.days_before_sms %}
<p>
<a rel="popup" href="{% url 'chrono-manager-agenda-reminder-test' pk=object.pk %}">{% trans "Test reminder sending" %}</a>
</p>
{% endif %}
<div class="panel--buttons">
<a rel="popup" class="button" href="{% url 'chrono-manager-agenda-reminder-settings' pk=object.id %}">{% trans "Configure" %}</a>
</div>
</div>
{% endif %}
<div aria-labelledby="tab-delays" hidden="" id="panel-delays" role="tabpanel" tabindex="0">
<ul>
<li>{% trans "Minimal booking delay:" %}
{% if agenda.minimal_booking_delay is not None %}
{% if agenda.minimal_booking_delay_in_working_days %}
{% blocktrans count count=agenda.minimal_booking_delay %}{{ count }} working day{% plural %}{{ count }} working days{% endblocktrans %}
{% else %}
{% blocktrans count count=agenda.minimal_booking_delay %}{{ count }} day{% plural %}{{ count }} days{% endblocktrans %}
{% endif %}
{% else %}<i>{% trans "undefined" %}</i>{% endif %}</li>
<li>{% trans "Maximal booking delay:" %}
{% if agenda.maximal_booking_delay is not None %}
{% blocktrans count count=agenda.maximal_booking_delay %}{{ count }} day{% plural %}{{ count }} days{% endblocktrans %}
{% else %}<i>{% trans "undefined" %}</i>{% endif %}</li>
</ul>
<div class="panel--buttons">
<a rel="popup" class="button" href="{% url 'chrono-manager-agenda-booking-delays' pk=object.id %}">{% trans 'Configure' %}</a>
</div>
</div>
<div aria-labelledby="tab-permissions" hidden="" id="panel-permissions" role="tabpanel" tabindex="0">
<ul>
<li>{% trans "Edit Role:" %} {% if agenda.edit_role %}{{ agenda.edit_role }}{% else %}<i>{% trans "undefined" %}</i>{% endif %}</li>
<li>{% trans "View Role:" %} {% if agenda.view_role %}{{ agenda.view_role }}{% else %}<i>{% trans "undefined" %}</i>{% endif %}</li>
</ul>
<div class="panel--buttons">
<a rel="popup" class="button" href="{% url 'chrono-manager-agenda-roles' pk=object.id %}">{% trans 'Configure' %}</a>
</div>
</div>
</div>
</div>
<div aria-labelledby="tab-permissions" hidden="" id="panel-permissions" role="tabpanel" tabindex="0">
<ul>
<li>{% trans "Edit Role:" %} {% if agenda.edit_role %}{{ agenda.edit_role }}{% else %}<i>{% trans "undefined" %}</i>{% endif %}</li>
<li>{% trans "View Role:" %} {% if agenda.view_role %}{{ agenda.view_role }}{% else %}<i>{% trans "undefined" %}</i>{% endif %}</li>
</ul>
<div class="panel--buttons">
<a rel="popup" class="button" href="{% url 'chrono-manager-agenda-roles' pk=object.id %}">{% trans 'Configure' %}</a>
</div>
</div>
</div>
</div>
</div>
{% endblock %}

View File

@ -2,22 +2,22 @@
{% load i18n %}
{% block breadcrumb %}
{{ block.super }}
<a href="">{% trans "Add unavailability calendar" %}</a>
{{ block.super }}
<a href="">{% trans "Add unavailability calendar" %}</a>
{% endblock %}
{% block appbar %}
<h2>{% trans "Add unavailability calendar" %}</h2>
<h2>{% trans "Add unavailability calendar" %}</h2>
{% endblock %}
{% block content %}
<form method="post" enctype="multipart/form-data">
{% csrf_token %}
{{ form.as_p }}
<div class="buttons">
<button class="submit-button">{% trans "Save" %}</button>
<a class="cancel" href="{% url 'chrono-manager-agenda-settings' pk=agenda.pk %}">{% trans 'Cancel' %}</a>
</div>
</form>
<form method="post" enctype="multipart/form-data">
{% csrf_token %}
{{ form.as_p }}
<div class="buttons">
<button class="submit-button">{% trans "Save" %}</button>
<a class="cancel" href="{% url 'chrono-manager-agenda-settings' pk=agenda.pk %}">{% trans 'Cancel' %}</a>
</div>
</form>
{% endblock %}

View File

@ -2,27 +2,27 @@
{% load i18n %}
{% block page-title-extra-label %}
- {% firstof agenda.label object.label %}
- {% firstof agenda.label object.label %}
{% endblock %}
{% block appbar %}
<h2>{{ object.label }}</h2>
<h2>{{ object.label }}</h2>
<span class="actions">
{% block actions %}
{% if user_can_manage %}
<a href="{{ object.get_settings_url }}">{% trans 'Settings' %}</a>
<a href="{{ object.get_settings_url }}">{% trans 'Settings' %}</a>
{% endif %}
{% endblock %}
</span>
{% endblock %}
{% block breadcrumb %}
{{ block.super }}
{% if agenda %}
<a href="{{ agenda.get_absolute_url }}">{{agenda.label}}</a>
{% elif object %}
<a href="{{ object.get_absolute_url }}">{{object.label}}</a>
{% endif %}
{{ block.super }}
{% if agenda %}
<a href="{{ agenda.get_absolute_url }}">{{agenda.label}}</a>
{% elif object %}
<a href="{{ object.get_absolute_url }}">{{object.label}}</a>
{% endif %}
{% endblock %}
{% block content %}

View File

@ -2,8 +2,8 @@
{% load static i18n %}
{% block extrascripts %}
{{ block.super }}
<script src="{% static 'js/chrono.manager.js' %}"></script>
{{ block.super }}
<script src="{% static 'js/chrono.manager.js' %}"></script>
{% endblock %}
{% block page-title %}
@ -22,8 +22,8 @@
{% block homepage-title %}{{portal_agent_title}}{% endblock %}
{% block breadcrumb %}
{% if portal_agent_url %}{{ block.super }}{% endif %}
<a href="{% url 'chrono-manager-homepage' %}">{% trans 'Agendas' %}</a>
{% if portal_agent_url %}{{ block.super }}{% endif %}
<a href="{% url 'chrono-manager-homepage' %}">{% trans 'Agendas' %}</a>
{% endblock %}
{% block logout-url %}{% url 'auth_logout' %}{% endblock %}

View File

@ -2,21 +2,21 @@
{% load i18n %}
{% block appbar %}
{% if object.id %}
<h2>{% trans "Edit Category" %}</h2>
{% else %}
<h2>{% trans "New Category" %}</h2>
{% endif %}
{% if object.id %}
<h2>{% trans "Edit Category" %}</h2>
{% else %}
<h2>{% trans "New Category" %}</h2>
{% endif %}
{% endblock %}
{% block content %}
<form method="post" enctype="multipart/form-data">
{% csrf_token %}
{{ form.as_p }}
<div class="buttons">
<button class="submit-button">{% trans "Save" %}</button>
<a class="cancel" href="{% url 'chrono-manager-category-list' %}">{% trans 'Cancel' %}</a>
</div>
</form>
<form method="post" enctype="multipart/form-data">
{% csrf_token %}
{{ form.as_p }}
<div class="buttons">
<button class="submit-button">{% trans "Save" %}</button>
<a class="cancel" href="{% url 'chrono-manager-category-list' %}">{% trans 'Cancel' %}</a>
</div>
</form>
{% endblock %}

View File

@ -2,36 +2,36 @@
{% load i18n %}
{% block breadcrumb %}
{{ block.super }}
<a href="{% url 'chrono-manager-category-list' %}">{% trans "Categories" %}</a>
{{ block.super }}
<a href="{% url 'chrono-manager-category-list' %}">{% trans "Categories" %}</a>
{% endblock %}
{% block appbar %}
<h2>{% trans 'Categories' %}</h2>
<span class="actions">
<a rel="popup" href="{% url 'chrono-manager-category-add' %}">{% trans 'New' %}</a>
</span>
<h2>{% trans 'Categories' %}</h2>
<span class="actions">
<a rel="popup" href="{% url 'chrono-manager-category-add' %}">{% trans 'New' %}</a>
</span>
{% endblock %}
{% block content %}
{% if object_list %}
<div>
<ul class="objects-list single-links">
{% for object in object_list %}
<li>
<a href="{% url 'chrono-manager-category-edit' pk=object.pk %}">{{ object.label }} ({{ object.slug }})</a>
<a rel="popup" class="delete" href="{% url 'chrono-manager-category-delete' pk=object.id %}">{% trans "remove" %}</a>
</li>
{% endfor %}
</ul>
</div>
{% else %}
<div class="big-msg-info">
{% blocktrans %}
This site doesn't have any category yet. Click on the "New" button in the top
right of the page to add a first one.
{% endblocktrans %}
</div>
{% endif %}
{% if object_list %}
<div>
<ul class="objects-list single-links">
{% for object in object_list %}
<li>
<a href="{% url 'chrono-manager-category-edit' pk=object.pk %}">{{ object.label }} ({{ object.slug }})</a>
<a rel="popup" class="delete" href="{% url 'chrono-manager-category-delete' pk=object.id %}">{% trans "remove" %}</a>
</li>
{% endfor %}
</ul>
</div>
{% else %}
<div class="big-msg-info">
{% blocktrans %}
This site doesn't have any category yet. Click on the "New" button in the top
right of the page to add a first one.
{% endblocktrans %}
</div>
{% endif %}
{% endblock %}

View File

@ -2,38 +2,38 @@
{% load i18n %}
{% block appbar %}
<h2>{% trans "Cancel booking" %}</h2>
<h2>{% trans "Cancel booking" %}</h2>
{% endblock %}
{% block content %}
<form method="post">
{% if object.get_backoffice_url and not object.cancel_callback_url %}
{% if not user.is_staff %}
<p>{% trans "This booking has no callback url configured, cancellation must be handled from corresponding form." %}</p>
<p><a href="{{ object.get_backoffice_url }}">{% trans "Open form" %}</a></p>
{% else %}
<div class="warningnotice">
<p>{% trans "This booking has no callback url configured, cancellation should be handled from corresponding form in order to garantee a coherent situation." %}</p>
</div>
<p><a href="{{ object.get_backoffice_url }}">{% trans "Open form" %}</a></p>
<p>{% trans "However, since you are an administrator, you can choose to cancel it anyway." %}</p>
{% endif %}
{% else %}
<p>
{% blocktrans trimmed with booking=booking.events_display %}
Are you sure you want to cancel booking "{{ booking }}"?
{% endblocktrans %}
</p>
{% endif %}
<form method="post">
{% if object.get_backoffice_url and not object.cancel_callback_url %}
{% if not user.is_staff %}
<p>{% trans "This booking has no callback url configured, cancellation must be handled from corresponding form." %}</p>
<p><a href="{{ object.get_backoffice_url }}">{% trans "Open form" %}</a></p>
{% else %}
<div class="warningnotice">
<p>{% trans "This booking has no callback url configured, cancellation should be handled from corresponding form in order to garantee a coherent situation." %}</p>
</div>
<p><a href="{{ object.get_backoffice_url }}">{% trans "Open form" %}</a></p>
<p>{% trans "However, since you are an administrator, you can choose to cancel it anyway." %}</p>
{% endif %}
{% else %}
<p>
{% blocktrans trimmed with booking=booking.events_display %}
Are you sure you want to cancel booking "{{ booking }}"?
{% endblocktrans %}
</p>
{% endif %}
{% if not object.get_backoffice_url or object.cancel_callback_url or user.is_staff %}
{% csrf_token %}
<input type="hidden" name="next" value="{% firstof request.POST.next request.GET.next %}">
{{ form.as_p }}
<div class="buttons">
<button class="delete-button">{% trans "Proceed with cancellation" %}</button>
<a class="cancel" href="{{ view.get_success_url }}">{% trans 'Abort' %}</a>
</div>
{% endif %}
</form>
{% if not object.get_backoffice_url or object.cancel_callback_url or user.is_staff %}
{% csrf_token %}
<input type="hidden" name="next" value="{% firstof request.POST.next request.GET.next %}">
{{ form.as_p }}
<div class="buttons">
<button class="delete-button">{% trans "Proceed with cancellation" %}</button>
<a class="cancel" href="{{ view.get_success_url }}">{% trans 'Abort' %}</a>
</div>
{% endif %}
</form>
{% endblock %}

View File

@ -2,22 +2,22 @@
{% load i18n %}
{% block appbar %}
<h2>{{ view.model.get_verbose_name }}</h2>
<h2>{{ view.model.get_verbose_name }}</h2>
{% endblock %}
{% block content %}
<form method="post">
{% csrf_token %}
<p>
{% if cannot_delete %}
{{ cannot_delete_msg }}
{% else %}
{% blocktrans %}Are you sure you want to delete this?{% endblocktrans %}
{% endif %}
</p>
<div class="buttons">
<button class="delete-button" {% if cannot_delete %}disabled="disabled"{% endif %}>{% trans 'Delete' %}</button>
<a class="cancel" href="{{ object.get_absolute_url }}">{% trans 'Cancel' %}</a>
</div>
</form>
<form method="post">
{% csrf_token %}
<p>
{% if cannot_delete %}
{{ cannot_delete_msg }}
{% else %}
{% blocktrans %}Are you sure you want to delete this?{% endblocktrans %}
{% endif %}
</p>
<div class="buttons">
<button class="delete-button" {% if cannot_delete %}disabled="disabled"{% endif %}>{% trans 'Delete' %}</button>
<a class="cancel" href="{{ object.get_absolute_url }}">{% trans 'Cancel' %}</a>
</div>
</form>
{% endblock %}

View File

@ -2,42 +2,42 @@
{% load i18n %}
{% block appbar %}
<h2>{{ view.model.get_verbose_name }}</h2>
<h2>{{ view.model.get_verbose_name }}</h2>
{% endblock %}
{% block content %}
<form method="post">
{% if cancellation_forbidden %}
<div class="warningnotice">
{% blocktrans trimmed %}
This event has bookings with no callback url configured. Their cancellation must be
handled individually from the forms attached to them. Only then, cancelling this event
will be allowed.
{% endblocktrans %}
</div>
{% else %}
{% csrf_token %}
<p>
{% trans "Are you sure you want to cancel this event?" %}
{% if bookings_count %}
{% if cancel_bookings %}
{% blocktrans trimmed count count=bookings_count %}
{{ count }} related booking will also be cancelled.
{% plural %}
{{ count }} related bookings will also be cancelled.
{% endblocktrans %}
{% else %}
{% trans "Related bookings will have to be manually cancelled if needed." %}
{% endif %}
{% endif %}
</p>
<input type="hidden" name="next" value="{% firstof request.POST.next request.GET.next %}">
{{ form.as_p }}
<div class="buttons">
<button class="delete-button">{% trans "Proceed with cancellation" %}</button>
<a class="cancel" href="{{ view.get_success_url }}">{% trans 'Abort' %}</a>
</div>
{% endif %}
</form>
<form method="post">
{% if cancellation_forbidden %}
<div class="warningnotice">
{% blocktrans trimmed %}
This event has bookings with no callback url configured. Their cancellation must be
handled individually from the forms attached to them. Only then, cancelling this event
will be allowed.
{% endblocktrans %}
</div>
{% else %}
{% csrf_token %}
<p>
{% trans "Are you sure you want to cancel this event?" %}
{% if bookings_count %}
{% if cancel_bookings %}
{% blocktrans trimmed count count=bookings_count %}
{{ count }} related booking will also be cancelled.
{% plural %}
{{ count }} related bookings will also be cancelled.
{% endblocktrans %}
{% else %}
{% trans "Related bookings will have to be manually cancelled if needed." %}
{% endif %}
{% endif %}
</p>
<input type="hidden" name="next" value="{% firstof request.POST.next request.GET.next %}">
{{ form.as_p }}
<div class="buttons">
<button class="delete-button">{% trans "Proceed with cancellation" %}</button>
<a class="cancel" href="{{ view.get_success_url }}">{% trans 'Abort' %}</a>
</div>
{% endif %}
</form>
{% endblock %}

View File

@ -2,23 +2,23 @@
{% load i18n %}
{% block appbar %}
<h2>{{ view.model.get_verbose_name }}</h2>
<h2>{{ view.model.get_verbose_name }}</h2>
{% endblock %}
{% block content %}
<form method="post">
{% csrf_token %}
<input type="hidden" name="next" value="{% firstof request.POST.next request.GET.next %}">
<p>
{% if cannot_delete %}
{% blocktrans %}This cannot be removed as there are bookings.{% endblocktrans %}
{% else %}
{% blocktrans %}Are you sure you want to delete this event?{% endblocktrans %}
{% endif %}
</p>
<div class="buttons">
<button class="delete-button" {% if cannot_delete %}disabled="disabled"{% endif %}>{% trans 'Delete' %}</button>
<a class="cancel" href="{{ view.get_success_url }}">{% trans 'Cancel' %}</a>
</div>
</form>
<form method="post">
{% csrf_token %}
<input type="hidden" name="next" value="{% firstof request.POST.next request.GET.next %}">
<p>
{% if cannot_delete %}
{% blocktrans %}This cannot be removed as there are bookings.{% endblocktrans %}
{% else %}
{% blocktrans %}Are you sure you want to delete this event?{% endblocktrans %}
{% endif %}
</p>
<div class="buttons">
<button class="delete-button" {% if cannot_delete %}disabled="disabled"{% endif %}>{% trans 'Delete' %}</button>
<a class="cancel" href="{{ view.get_success_url }}">{% trans 'Cancel' %}</a>
</div>
</form>
{% endblock %}

View File

@ -2,18 +2,18 @@
{% load i18n %}
{% block appbar %}
<h2>{{ object }}</h2>
<h2>{{ object }}</h2>
{% endblock %}
{% block content %}
<form method="post">
{% csrf_token %}
<p>
{% blocktrans %}Are you sure you want to delete this exception?{% endblocktrans %}
</p>
<div class="buttons">
<button class="delete-button" {% if cannot_delete %}disabled="disabled"{% endif %}>{% trans 'Delete' %}</button>
<a class="cancel" href="{{ object.get_absolute_url }}">{% trans 'Cancel' %}</a>
</div>
</form>
<form method="post">
{% csrf_token %}
<p>
{% blocktrans %}Are you sure you want to delete this exception?{% endblocktrans %}
</p>
<div class="buttons">
<button class="delete-button" {% if cannot_delete %}disabled="disabled"{% endif %}>{% trans 'Delete' %}</button>
<a class="cancel" href="{{ object.get_absolute_url }}">{% trans 'Cancel' %}</a>
</div>
</form>
{% endblock %}

View File

@ -2,18 +2,18 @@
{% load i18n %}
{% block appbar %}
<h2>{{ object }}</h2>
<h2>{{ object }}</h2>
{% endblock %}
{% block content %}
<form method="post">
{% csrf_token %}
<p>
{% blocktrans %}Are you sure you want to delete this exception source?{% endblocktrans %}
</p>
<div class="buttons">
<button class="delete-button">{% trans 'Delete' %}</button>
<a class="cancel" href="{{ view.get_success_url }}">{% trans 'Cancel' %}</a>
</div>
</form>
<form method="post">
{% csrf_token %}
<p>
{% blocktrans %}Are you sure you want to delete this exception source?{% endblocktrans %}
</p>
<div class="buttons">
<button class="delete-button">{% trans 'Delete' %}</button>
<a class="cancel" href="{{ view.get_success_url }}">{% trans 'Cancel' %}</a>
</div>
</form>
{% endblock %}

View File

@ -2,18 +2,18 @@
{% load i18n %}
{% block appbar %}
<h2>{% trans "Exclude Agenda" %}</h2>
<h2>{% trans "Exclude Agenda" %}</h2>
{% endblock %}
{% block content %}
<form method="post">
{% csrf_token %}
<p>
{% blocktrans %}Are you sure you want to exclude this agenda from the virtual agenda ?{% endblocktrans %}
</p>
<div class="buttons">
<button class="delete-button">{% trans 'Exclude' %}</button>
<a class="cancel" href="{% url 'chrono-manager-agenda-settings' agenda.pk %}">{% trans 'Cancel' %}</a>
</div>
</form>
<form method="post">
{% csrf_token %}
<p>
{% blocktrans %}Are you sure you want to exclude this agenda from the virtual agenda ?{% endblocktrans %}
</p>
<div class="buttons">
<button class="delete-button">{% trans 'Exclude' %}</button>
<a class="cancel" href="{% url 'chrono-manager-agenda-settings' agenda.pk %}">{% trans 'Cancel' %}</a>
</div>
</form>
{% endblock %}

View File

@ -2,38 +2,38 @@
{% load i18n %}
{% block extrascripts %}
{{ block.super }}
{{ form.media }}
{{ block.super }}
{{ form.media }}
{% endblock %}
{% block breadcrumb %}
{{ block.super }}
{% if object.id %}
<a href="">{{object.label}}</a>
{% else %}
<a href="">{% trans "New Desk" %}</a>
{% endif %}
{{ block.super }}
{% if object.id %}
<a href="">{{object.label}}</a>
{% else %}
<a href="">{% trans "New Desk" %}</a>
{% endif %}
{% endblock %}
{% block appbar %}
{% if object.id %}
<h2>{% trans "Edit Desk" %}</h2>
<span class="actions">
<a rel="popup" href="{% url 'chrono-manager-desk-delete' pk=object.id %}">{% trans 'Delete' %}</a>
</span>
{% else %}
<h2>{% trans "New Desk" %}</h2>
{% endif %}
{% if object.id %}
<h2>{% trans "Edit Desk" %}</h2>
<span class="actions">
<a rel="popup" href="{% url 'chrono-manager-desk-delete' pk=object.id %}">{% trans 'Delete' %}</a>
</span>
{% else %}
<h2>{% trans "New Desk" %}</h2>
{% endif %}
{% endblock %}
{% block content %}
<form method="post" enctype="multipart/form-data">
{% csrf_token %}
{{ form.as_p }}
<div class="buttons">
<button class="submit-button">{% trans "Save" %}</button>
<a class="cancel" href="{% url 'chrono-manager-agenda-settings' pk=agenda.id %}">{% trans 'Cancel' %}</a>
</div>
</form>
<form method="post" enctype="multipart/form-data">
{% csrf_token %}
{{ form.as_p }}
<div class="buttons">
<button class="submit-button">{% trans "Save" %}</button>
<a class="cancel" href="{% url 'chrono-manager-agenda-settings' pk=agenda.id %}">{% trans 'Cancel' %}</a>
</div>
</form>
{% endblock %}

View File

@ -2,26 +2,26 @@
{% load i18n %}
{% block page-title-extra-label %}
{{ block.super }} - {% trans "Cancellation error report" %}
{{ block.super }} - {% trans "Cancellation error report" %}
{% endblock %}
{% block breadcrumb %}
{{ block.super }}
<a href="{% url 'chrono-manager-event-cancellation-report-list' pk=agenda.id %}">{% trans "Cancellation error reports" %}</a>
{{ block.super }}
<a href="{% url 'chrono-manager-event-cancellation-report-list' pk=agenda.id %}">{% trans "Cancellation error reports" %}</a>
{% endblock %}
{% block appbar %}
<h2>{% trans "Cancellation error report:" %} {{ report }}</h2>
{% block actions %}
<a rel="popup" href="{% url 'chrono-manager-event-cancel' pk=agenda.pk event_pk=report.event.pk %}?force_cancellation=True">{% trans "Force cancellation" %}</a>
{% endblock %}
<h2>{% trans "Cancellation error report:" %} {{ report }}</h2>
{% block actions %}
<a rel="popup" href="{% url 'chrono-manager-event-cancel' pk=agenda.pk event_pk=report.event.pk %}?force_cancellation=True">{% trans "Force cancellation" %}</a>
{% endblock %}
{% endblock %}
{% block content %}
<p>{% trans "Cancellation failed for the following bookings:" %}</p>
<ul>
{% for booking, error in errors.items %}
<li><a href="{{ booking.get_backoffice_url }}">{{ booking.events_display }}</a>: {{ error }}</li>
{% endfor %}
</ul>
<p>{% trans "Cancellation failed for the following bookings:" %}</p>
<ul>
{% for booking, error in errors.items %}
<li><a href="{{ booking.get_backoffice_url }}">{{ booking.events_display }}</a>: {{ error }}</li>
{% endfor %}
</ul>
{% endblock %}

View File

@ -1,10 +1,10 @@
{% load i18n %}
{% for report in cancellation_reports %}
<div class="warningnotice">
<p>
{% blocktrans with event=report.event %}Errors occured during cancellation of event "{{ event }}".{% endblocktrans %}
<a href="{% url 'chrono-manager-event-cancellation-report' pk=agenda.pk report_pk=report.pk %}">{% trans "Details" %}</a>
</p>
</div>
<div class="warningnotice">
<p>
{% blocktrans with event=report.event %}Errors occured during cancellation of event "{{ event }}".{% endblocktrans %}
<a href="{% url 'chrono-manager-event-cancellation-report' pk=agenda.pk report_pk=report.pk %}">{% trans "Details" %}</a>
</p>
</div>
{% endfor %}

View File

@ -2,27 +2,27 @@
{% load i18n %}
{% block page-title-extra-label %}
{{ block.super }} - {% trans "Cancellation error reports" %}
{{ block.super }} - {% trans "Cancellation error reports" %}
{% endblock %}
{% block breadcrumb %}
{{ block.super }}
<a href="{% url 'chrono-manager-event-cancellation-report-list' pk=agenda.pk %}">{% trans "Cancellation error reports" %}</a>
{{ block.super }}
<a href="{% url 'chrono-manager-event-cancellation-report-list' pk=agenda.pk %}">{% trans "Cancellation error reports" %}</a>
{% endblock %}
{% block appbar %}
<h2>{% trans "Cancellation error reports" %}</h2>
<h2>{% trans "Cancellation error reports" %}</h2>
{% endblock %}
{% block content %}
<ul>
{% for report in cancellation_reports %}
<li {% if not report.seen %}class="new-report"{% endif %}>
<a href="{% url 'chrono-manager-event-cancellation-report' pk=agenda.pk report_pk=report.pk %}">{{ report }}</a>
({% blocktrans count count=report.bookings.count %}{{ count }} failure{% plural %}{{ count }} failures{% endblocktrans %})
</li>
{% empty %}
<li>{% trans "No error report to show." %}</li>
{% endfor %}
</ul>
<ul>
{% for report in cancellation_reports %}
<li {% if not report.seen %}class="new-report"{% endif %}>
<a href="{% url 'chrono-manager-event-cancellation-report' pk=agenda.pk report_pk=report.pk %}">{{ report }}</a>
({% blocktrans count count=report.bookings.count %}{{ count }} failure{% plural %}{{ count }} failures{% endblocktrans %})
</li>
{% empty %}
<li>{% trans "No error report to show." %}</li>
{% endfor %}
</ul>
{% endblock %}

View File

@ -2,119 +2,119 @@
{% load static i18n %}
{% block breadcrumb %}
{{ block.super }}
<a href="{% url 'chrono-manager-event-check' pk=agenda.pk event_pk=object.pk %}">{% trans "Check" %}</a>
{{ 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',
<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>
</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 %}
{% 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>
</tr>
{% endfor %}
</tbody>
</table>
</div>
</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 %}
{% 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 %}

View File

@ -8,36 +8,36 @@
{% endif %}
</td>
{% if not event.checked or not agenda.disable_check_update %}
<td class="booking-actions" data-booking-id="{{ booking.id }}">
<form method="post" action="{% url 'chrono-manager-booking-presence' pk=agenda.pk booking_pk=booking.pk %}" class="with-ajax presence">
{% csrf_token %}
<button class="submit-button"
{% if booking.user_was_present is True %}disabled{% endif %}
>{% trans "Presence" %}</button>
{% if booking.presence_form.check_type.field.choices.1 %}{{ booking.presence_form.check_type }}{% endif %}
<script>
$(function() {
$('td[data-booking-id="{{ booking.id }}"] form.presence select').on('change',
<td class="booking-actions" data-booking-id="{{ booking.id }}">
<form method="post" action="{% url 'chrono-manager-booking-presence' pk=agenda.pk booking_pk=booking.pk %}" class="with-ajax presence">
{% csrf_token %}
<button class="submit-button"
{% if booking.user_was_present is True %}disabled{% endif %}
>{% trans "Presence" %}</button>
{% if booking.presence_form.check_type.field.choices.1 %}{{ booking.presence_form.check_type }}{% endif %}
<script>
$(function() {
$('td[data-booking-id="{{ booking.id }}"] form.presence select').on('change',
function() {
$(this).parents('form.presence').submit();
});
});
});
</script>
</form>
<form method="post" action="{% url 'chrono-manager-booking-absence' pk=agenda.pk booking_pk=booking.pk %}" class="with-ajax absence">
{% csrf_token %}
<button class="submit-button"
{% if booking.user_was_present is False %}disabled{% endif %}
>{% trans "Absence" %}</button>
{% if booking.absence_form.check_type.field.choices.1 %}{{ booking.absence_form.check_type }}{% endif %}
<script>
$(function() {
$('td[data-booking-id="{{ booking.id }}"] form.absence select').on('change',
</script>
</form>
<form method="post" action="{% url 'chrono-manager-booking-absence' pk=agenda.pk booking_pk=booking.pk %}" class="with-ajax absence">
{% csrf_token %}
<button class="submit-button"
{% if booking.user_was_present is False %}disabled{% endif %}
>{% trans "Absence" %}</button>
{% if booking.absence_form.check_type.field.choices.1 %}{{ booking.absence_form.check_type }}{% endif %}
<script>
$(function() {
$('td[data-booking-id="{{ booking.id }}"] form.absence select').on('change',
function() {
$(this).parents('form.absence').submit();
});
});
});
</script>
</form>
</td>
</script>
</form>
</td>
{% endif %}

View File

@ -2,63 +2,63 @@
{% load static i18n %}
{% block extrascripts %}
{{ block.super }}
<script src="{% static 'js/chrono_events.manager.js' %}"></script>
{{ block.super }}
<script src="{% static 'js/chrono_events.manager.js' %}"></script>
{% endblock %}
{% block page-title-extra-label %}
- {% firstof agenda.label event.label %}
- {% firstof agenda.label event.label %}
{% endblock %}
{% block breadcrumb %}
{{ block.super }}
<a href="{% url 'chrono-manager-agenda-view' pk=agenda.id %}">{{agenda.label}}</a>
<a href="{% url 'chrono-manager-event-view' pk=agenda.id event_pk=event.id %}">{{event}}</a>
{{ block.super }}
<a href="{% url 'chrono-manager-agenda-view' pk=agenda.id %}">{{agenda.label}}</a>
<a href="{% url 'chrono-manager-event-view' pk=agenda.id event_pk=event.id %}">{{event}}</a>
{% endblock %}
{% block appbar %}
<h2>
{% if event.label %}
{{ event.label }} — {{event.start_datetime|date:"DATETIME_FORMAT"}}
{% else %}
{{ event.start_datetime|date:"DATETIME_FORMAT"}}
{% endif %}
{% if event.cancellation_status %}<span class="tag">{{ event.cancellation_status }}</span>{% endif %}
{% if event.main_list_full %}<span class="tag">{% trans "Full" %}</span>{% endif %}
{% if event.checked %}<span class="tag">{% trans "Checked" %}</span>{% endif %}
</h2>
{% block appbar_actions %}
<span class="actions">
{% if user_can_manage or event.agenda.booking_form_url %}
<a class="extra-actions-menu-opener"></a>
<ul class="extra-actions-menu">
{% if user_can_manage %}
{% if not event.primary_event %}
<li><a rel="popup" href="{% url 'chrono-manager-event-delete' pk=event.agenda.id event_pk=event.id %}">{% trans 'Delete' %}</a></li>
<h2>
{% if event.label %}
{{ event.label }} — {{event.start_datetime|date:"DATETIME_FORMAT"}}
{% else %}
{{ event.start_datetime|date:"DATETIME_FORMAT"}}
{% endif %}
{% if not event.cancellation_status %}
<li><a rel="popup" href="{% url 'chrono-manager-event-cancel' pk=agenda.pk event_pk=event.pk %}?next={{ request.path }}">{% trans "Cancel" %}</a></li>
{% endif %}
<li><a href="{% url 'chrono-manager-event-edit' pk=agenda.id event_pk=event.id %}">{% trans "Options" %}</a></li>
{% endif %}
{% if event.agenda.booking_form_url %}
<li><a href="{{ event.get_booking_form_url }}&ReturnURL={{ request.build_absolute_uri }}">{% trans "Booking form" %}</a></li>
{% endif %}
{% if not event.cancelled and agenda.subscriptions.exists %}
<li><a href="{% url 'chrono-manager-event-timesheet' pk=agenda.pk event_pk=event.pk %}">{% trans "Timesheet" %}</a></li>
{% endif %}
</ul>
{% endif %}
{% if event.is_day_past and not event.cancelled %}
<a href="{% url 'chrono-manager-event-check' pk=agenda.pk event_pk=event.pk %}">{% trans "Check" %}</a>
{% endif %}
</span>
{% endblock %}
{% if event.cancellation_status %}<span class="tag">{{ event.cancellation_status }}</span>{% endif %}
{% if event.main_list_full %}<span class="tag">{% trans "Full" %}</span>{% endif %}
{% if event.checked %}<span class="tag">{% trans "Checked" %}</span>{% endif %}
</h2>
{% block appbar_actions %}
<span class="actions">
{% if user_can_manage or event.agenda.booking_form_url %}
<a class="extra-actions-menu-opener"></a>
<ul class="extra-actions-menu">
{% if user_can_manage %}
{% if not event.primary_event %}
<li><a rel="popup" href="{% url 'chrono-manager-event-delete' pk=event.agenda.id event_pk=event.id %}">{% trans 'Delete' %}</a></li>
{% endif %}
{% if not event.cancellation_status %}
<li><a rel="popup" href="{% url 'chrono-manager-event-cancel' pk=agenda.pk event_pk=event.pk %}?next={{ request.path }}">{% trans "Cancel" %}</a></li>
{% endif %}
<li><a href="{% url 'chrono-manager-event-edit' pk=agenda.id event_pk=event.id %}">{% trans "Options" %}</a></li>
{% endif %}
{% if event.agenda.booking_form_url %}
<li><a href="{{ event.get_booking_form_url }}&ReturnURL={{ request.build_absolute_uri }}">{% trans "Booking form" %}</a></li>
{% endif %}
{% if not event.cancelled and agenda.subscriptions.exists %}
<li><a href="{% url 'chrono-manager-event-timesheet' pk=agenda.pk event_pk=event.pk %}">{% trans "Timesheet" %}</a></li>
{% endif %}
</ul>
{% endif %}
{% if event.is_day_past and not event.cancelled %}
<a href="{% url 'chrono-manager-event-check' pk=agenda.pk event_pk=event.pk %}">{% trans "Check" %}</a>
{% endif %}
</span>
{% endblock %}
{% endblock %}
{% block content %}
<div id="event_details">
{% include "chrono/manager_event_detail_fragment.html" %}
</div>
<div id="event_details">
{% include "chrono/manager_event_detail_fragment.html" %}
</div>
{% endblock %}

View File

@ -1,13 +1,13 @@
{% load i18n %}
{% if object.description or object.pricing or object.url %}
<div class="section">
<div>
{% if object.description %}{{ object.description|linebreaks }}{% endif %}
{% if object.pricing %}<p>{% trans "Pricing:" %} {{ object.pricing }}</p>{% endif %}
{% if object.url %}<p><a href="{{ object.url }}">{{ object.url|truncatechars:100 }}</a></p>{% endif %}
{% if object.publication_datetime %}<p>{% trans "Publication date:" %} {{ object.publication_datetime }}</p>{% endif %}
</div>
</div>
<div class="section">
<div>
{% if object.description %}{{ object.description|linebreaks }}{% endif %}
{% if object.pricing %}<p>{% trans "Pricing:" %} {{ object.pricing }}</p>{% endif %}
{% if object.url %}<p><a href="{{ object.url }}">{{ object.url|truncatechars:100 }}</a></p>{% endif %}
{% if object.publication_datetime %}<p>{% trans "Publication date:" %} {{ object.publication_datetime }}</p>{% endif %}
</div>
</div>
{% endif %}
<div class="section">
@ -18,44 +18,44 @@
Bookings ({{ booked_places }}/{{ places }}): {{ remaining_places }} remaining places
{% endblocktrans %}
</h3>
<div>
<div>
{% if object.booked_places > event.places %}
<div class="errornotice"><p>{% trans "This event is overbooked." %}</p></div>
{% elif object.booked_places == event.places %}
<div class="infonotice"><p>{% trans "This event is full." %}</p></div>
{% endif %}
<ul class="objects-list single-links">
{% for booking in booked %}
<li>
<a {% if booking.get_backoffice_url %}href="{{ booking.get_backoffice_url }}"{% endif %}>{{ booking.get_user_block }}, {{ booking.creation_datetime|date:"DATETIME_FORMAT" }}</a>
{% if not booking.primary_booking %}
<a rel="popup" class="delete" href="{% url 'chrono-manager-booking-cancel' pk=agenda.id booking_pk=booking.id %}?next={{ request.path }}">{% trans "Cancel" %}</a>
{% else %}
<a class="delete disabled" title="{% trans "Can not cancel a secondary booking" %}" href="#">{% trans "Cancel" %}</a>
{% if object.booked_places > event.places %}
<div class="errornotice"><p>{% trans "This event is overbooked." %}</p></div>
{% elif object.booked_places == event.places %}
<div class="infonotice"><p>{% trans "This event is full." %}</p></div>
{% endif %}
</li>
{% endfor %}
</ul>
</div>
<ul class="objects-list single-links">
{% for booking in booked %}
<li>
<a {% if booking.get_backoffice_url %}href="{{ booking.get_backoffice_url }}"{% endif %}>{{ booking.get_user_block }}, {{ booking.creation_datetime|date:"DATETIME_FORMAT" }}</a>
{% if not booking.primary_booking %}
<a rel="popup" class="delete" href="{% url 'chrono-manager-booking-cancel' pk=agenda.id booking_pk=booking.id %}?next={{ request.path }}">{% trans "Cancel" %}</a>
{% else %}
<a class="delete disabled" title="{% trans "Can not cancel a secondary booking" %}" href="#">{% trans "Cancel" %}</a>
{% endif %}
</li>
{% endfor %}
</ul>
</div>
</div>
{% if object.waiting_list_places %}
<div class="section">
<h3>
{% blocktrans with places=object.waiting_list_places booked_places=object.booked_waiting_list_places count remaining_places=object.remaining_waiting_list_places %}
Waiting List ({{ booked_places }}/{{ places }}): {{ remaining_places }} remaining place
{% plural %}
Waiting List ({{ booked_places }}/{{ places }}): {{ remaining_places }} remaining places
{% endblocktrans %}
</h3>
<div>
<ul class="objects-list single-links">
{% for booking in waiting %}
<li><a {% if booking.get_backoffice_url %}href="{{ booking.get_backoffice_url }}"{% endif %}>{{ booking.get_user_block }}, {{ booking.creation_datetime|date:"DATETIME_FORMAT" }}</a></li>
{% endfor %}
</ul>
</div>
</div>
<div class="section">
<h3>
{% blocktrans with places=object.waiting_list_places booked_places=object.booked_waiting_list_places count remaining_places=object.remaining_waiting_list_places %}
Waiting List ({{ booked_places }}/{{ places }}): {{ remaining_places }} remaining place
{% plural %}
Waiting List ({{ booked_places }}/{{ places }}): {{ remaining_places }} remaining places
{% endblocktrans %}
</h3>
<div>
<ul class="objects-list single-links">
{% for booking in waiting %}
<li><a {% if booking.get_backoffice_url %}href="{{ booking.get_backoffice_url }}"{% endif %}>{{ booking.get_user_block }}, {{ booking.creation_datetime|date:"DATETIME_FORMAT" }}</a></li>
{% endfor %}
</ul>
</div>
</div>
{% endif %}

View File

@ -2,22 +2,22 @@
{% load i18n %}
{% block breadcrumb %}
{{ block.super }}
<a href="{{ agenda.get_settings_url }}">{% trans 'Settings' %}</a>
<a href="">{% trans "Duplicate Event" %}</a>
{{ block.super }}
<a href="{{ agenda.get_settings_url }}">{% trans 'Settings' %}</a>
<a href="">{% trans "Duplicate Event" %}</a>
{% endblock %}
{% block appbar %}
<h2>{% trans "Duplicate Event" %}</h2>
<h2>{% trans "Duplicate Event" %}</h2>
{% endblock %}
{% block content %}
<form method="post" enctype="multipart/form-data">
{% csrf_token %}
{{ form.as_p }}
<div class="buttons">
<button class="submit-button">{% trans "Duplicate" %}</button>
<a class="cancel" href="{% url 'chrono-manager-event-edit' pk=agenda.id event_pk=object.pk %}">{% trans 'Cancel' %}</a>
</div>
</form>
<form method="post" enctype="multipart/form-data">
{% csrf_token %}
{{ form.as_p }}
<div class="buttons">
<button class="submit-button">{% trans "Duplicate" %}</button>
<a class="cancel" href="{% url 'chrono-manager-event-edit' pk=agenda.id event_pk=object.pk %}">{% trans 'Cancel' %}</a>
</div>
</form>
{% endblock %}

View File

@ -2,54 +2,54 @@
{% load i18n gadjo %}
{% block extrascripts %}
{{ block.super }}
{{ form.media }}
{{ block.super }}
{{ form.media }}
{% endblock %}
{% block breadcrumb %}
{{ block.super }}
{% if object.id %}
<a href="{% url 'chrono-manager-agenda-view' pk=object.agenda.id %}">{{object.agenda.label}}</a>
{% endif %}
{{ block.super }}
{% if object.id %}
<a href="{% url 'chrono-manager-agenda-view' pk=object.agenda.id %}">{{object.agenda.label}}</a>
{% endif %}
{% endblock %}
{% block appbar %}
{% if object.id %}
<h2>{% trans "Edit Event" %}</h2>
<span class="actions">
{% if not object.primary_event %}
<a rel="popup" href="{% url 'chrono-manager-event-delete' pk=object.agenda.id event_pk=object.id %}?next={{view.request.GET.next}}">{% trans 'Delete' %}</a>
{% endif %}
</span>
{% else %}
<h2>{% trans "New Event" %}</h2>
{% endif %}
{% if object.id %}
<h2>{% trans "Edit Event" %}</h2>
<span class="actions">
{% if not object.primary_event %}
<a rel="popup" href="{% url 'chrono-manager-event-delete' pk=object.agenda.id event_pk=object.id %}?next={{view.request.GET.next}}">{% trans 'Delete' %}</a>
{% endif %}
</span>
{% else %}
<h2>{% trans "New Event" %}</h2>
{% endif %}
{% endblock %}
{% block content %}
<form method="post" enctype="multipart/form-data">
{% csrf_token %}
<input type="hidden" name="next" value="{% firstof request.POST.next request.GET.next %}">
{{ form|with_template }}
<div class="buttons">
<button class="submit-button">{% trans "Save" %}</button>
<a class="cancel" href="{{ view.get_success_url }}">{% trans 'Cancel' %}</a>
</div>
<form method="post" enctype="multipart/form-data">
{% csrf_token %}
<input type="hidden" name="next" value="{% firstof request.POST.next request.GET.next %}">
{{ form|with_template }}
<div class="buttons">
<button class="submit-button">{% trans "Save" %}</button>
<a class="cancel" href="{{ view.get_success_url }}">{% trans 'Cancel' %}</a>
</div>
<script>
$(function () {
recurrence_fields = $('.widget[id^=id_recurrence]');
$('input[type=radio][name=frequency]').change(function() {
if(!this.checked)
<script>
$(function () {
recurrence_fields = $('.widget[id^=id_recurrence]');
$('input[type=radio][name=frequency]').change(function() {
if(!this.checked)
return;
if(this.value == 'unique') {
recurrence_fields.hide();
} else {
recurrence_fields.show();
}
}).change();
});
</script>
</form>
if(this.value == 'unique') {
recurrence_fields.hide();
} else {
recurrence_fields.show();
}
}).change();
});
</script>
</form>
{% endblock %}

View File

@ -2,8 +2,8 @@
{% load i18n %}
{% block breadcrumb %}
{{ block.super }}
<a href="{% url 'chrono-manager-event-timesheet' pk=agenda.pk event_pk=event.pk %}">{% trans "Timesheet" %}</a>
{{ block.super }}
<a href="{% url 'chrono-manager-event-timesheet' pk=agenda.pk event_pk=event.pk %}">{% trans "Timesheet" %}</a>
{% endblock %}
{% block appbar_actions %}{% endblock %}

View File

@ -2,35 +2,35 @@
{% load i18n %}
{% block actions %}
{% if agenda.subscriptions.exists %}
<a class="extra-actions-menu-opener"></a>
<ul class="extra-actions-menu">
<li><a href="{% url 'chrono-manager-events-timesheet' pk=agenda.pk %}">{% trans 'Timesheet' %}</a></li>
</ul>
{% endif %}
{{ block.super }}
<a href="{% url 'chrono-manager-agenda-open-events-view' pk=agenda.pk %}">{% trans 'Open events' %}</a>
<a href="{% url 'chrono-manager-agenda-month-view' pk=agenda.pk year=view.date|date:"Y" month=view.date|date:"n" %}">{% trans 'Month view' %}</a>
{% if agenda.subscriptions.exists %}
<a class="extra-actions-menu-opener"></a>
<ul class="extra-actions-menu">
<li><a href="{% url 'chrono-manager-events-timesheet' pk=agenda.pk %}">{% trans 'Timesheet' %}</a></li>
</ul>
{% endif %}
{{ block.super }}
<a href="{% url 'chrono-manager-agenda-open-events-view' pk=agenda.pk %}">{% trans 'Open events' %}</a>
<a href="{% url 'chrono-manager-agenda-month-view' pk=agenda.pk year=view.date|date:"Y" month=view.date|date:"n" %}">{% trans 'Month view' %}</a>
{% endblock %}
{% block content %}
<div class="section">
<h3>{% trans "Events" %}</h3>
<div>
{% if object_list %}
<ul class="objects-list single-links">
{% for event in object_list %}
{% include 'chrono/manager_agenda_event_fragment.html' with view_mode='day_view' %}
{% endfor %}
</ul>
{% include "gadjo/pagination.html" %}
{% else %}
<div class="big-msg-info">
{% blocktrans %}
This day doesn't have any event configured.
{% endblocktrans %}
</div>
{% endif %}
</div>
</div>
<div class="section">
<h3>{% trans "Events" %}</h3>
<div>
{% if object_list %}
<ul class="objects-list single-links">
{% for event in object_list %}
{% include 'chrono/manager_agenda_event_fragment.html' with view_mode='day_view' %}
{% endfor %}
</ul>
{% include "gadjo/pagination.html" %}
{% else %}
<div class="big-msg-info">
{% blocktrans %}
This day doesn't have any event configured.
{% endblocktrans %}
</div>
{% endif %}
</div>
</div>
{% endblock %}

View File

@ -2,42 +2,42 @@
{% load i18n %}
{% block actions %}
<a class="extra-actions-menu-opener"></a>
<ul class="extra-actions-menu">
<li><a href="{% url 'chrono-manager-event-cancellation-report-list' pk=agenda.pk %}">{% trans 'Cancellation error reports' %}</a></li>
{% if agenda.subscriptions.exists %}
<li><a href="{% url 'chrono-manager-events-timesheet' pk=agenda.pk %}">{% trans 'Timesheet' %}</a></li>
{% endif %}
</ul>
{{ block.super }}
<a href="{% url 'chrono-manager-agenda-open-events-view' pk=agenda.pk %}">{% trans 'Open events' %}</a>
<a href="{% url 'chrono-manager-agenda-day-view' pk=agenda.pk year=view.date|date:"Y" month=view.date|date:"m" day=view.date|date:"d" %}">{% trans 'Day view' %}</a>
<a class="extra-actions-menu-opener"></a>
<ul class="extra-actions-menu">
<li><a href="{% url 'chrono-manager-event-cancellation-report-list' pk=agenda.pk %}">{% trans 'Cancellation error reports' %}</a></li>
{% if agenda.subscriptions.exists %}
<li><a href="{% url 'chrono-manager-events-timesheet' pk=agenda.pk %}">{% trans 'Timesheet' %}</a></li>
{% endif %}
</ul>
{{ block.super }}
<a href="{% url 'chrono-manager-agenda-open-events-view' pk=agenda.pk %}">{% trans 'Open events' %}</a>
<a href="{% url 'chrono-manager-agenda-day-view' pk=agenda.pk year=view.date|date:"Y" month=view.date|date:"m" day=view.date|date:"d" %}">{% trans 'Day view' %}</a>
{% endblock %}
{% block content %}
<div class="section">
<h3>{% trans "Events" %}</h3>
{% include 'chrono/manager_event_cancellation_report_notice.html' %}
<div>
{% if object_list %}
<ul class="objects-list single-links">
{% for object in object_list %}
{% if object.is_exception %}
<li><a class="disabled">{% trans "Exception:"%} {{ object }}</a></li>
{% else %}
{% include 'chrono/manager_agenda_event_fragment.html' with event=object %}
{% endif %}
{% endfor %}
</ul>
{% include "gadjo/pagination.html" %}
{% else %}
<div class="big-msg-info">
{% blocktrans %}
This month doesn't have any event configured.
{% endblocktrans %}
</div>
{% endif %}
</div>
</div>
<div class="section">
<h3>{% trans "Events" %}</h3>
{% include 'chrono/manager_event_cancellation_report_notice.html' %}
<div>
{% if object_list %}
<ul class="objects-list single-links">
{% for object in object_list %}
{% if object.is_exception %}
<li><a class="disabled">{% trans "Exception:"%} {{ object }}</a></li>
{% else %}
{% include 'chrono/manager_agenda_event_fragment.html' with event=object %}
{% endif %}
{% endfor %}
</ul>
{% include "gadjo/pagination.html" %}
{% else %}
<div class="big-msg-info">
{% blocktrans %}
This month doesn't have any event configured.
{% endblocktrans %}
</div>
{% endif %}
</div>
</div>
{% endblock %}

View File

@ -13,60 +13,60 @@
{% endblock %}
{% block agenda-settings-extra-tab-buttons %}
<button aria-controls="panel-events" aria-selected="true" id="tab-events" role="tab" tabindex="0">{% trans "Events" %}</button>
{% if has_recurring_events %}
<button aria-controls="panel-events" aria-selected="true" id="tab-events" role="tab" tabindex="0">{% trans "Events" %}</button>
{% if has_recurring_events %}
<button aria-controls="panel-time-periods" aria-selected="false" id="tab-time-periods" role="tab" tabindex="-1">{% trans "Recurrence exceptions" %}</button>
{% endif %}
<button aria-controls="panel-display-options" aria-selected="false" id="tab-display-options" role="tab" tabindex="-1">{% trans "Display options" %}</button>
<button aria-controls="panel-booking-check-options" aria-selected="false" id="tab-booking-check-options" role="tab" tabindex="-1">{% trans "Booking check options" %}</button>
<button aria-controls="panel-notifications" aria-selected="false" id="tab-notifications" role="tab" tabindex="-1">{% trans "Notifications" %}</button>
{% endif %}
<button aria-controls="panel-display-options" aria-selected="false" id="tab-display-options" role="tab" tabindex="-1">{% trans "Display options" %}</button>
<button aria-controls="panel-booking-check-options" aria-selected="false" id="tab-booking-check-options" role="tab" tabindex="-1">{% trans "Booking check options" %}</button>
<button aria-controls="panel-notifications" aria-selected="false" id="tab-notifications" role="tab" tabindex="-1">{% trans "Notifications" %}</button>
{% endblock %}
{% block agenda-settings-extra-tab-list %}
<div aria-labelledby="tab-events" id="panel-events" role="tabpanel" tabindex="0">
{% with view.get_events as events %}
<div aria-labelledby="tab-events" id="panel-events" role="tabpanel" tabindex="0">
{% with view.get_events as events %}
{% if events %}
<ul class="objects-list single-links">
{% for event in events %}
{% include 'chrono/manager_agenda_event_fragment.html' with view_mode='settings_view' %}
{% endfor %}
</ul>
{% else %}
<div class="big-msg-info">
{% blocktrans %}
This agenda doesn't have any event yet. Click on the "New Event" button in
the top right of the page to add a first one.
{% endblocktrans %}
</div>
{% endif %}
{% endwith %}
</div>
{% if has_recurring_events %}
<div aria-labelledby="tab-time-periods" hidden="" id="panel-time-periods" role="tabpanel" tabindex="0">
{% if object.recurrence_exceptions_report.events.exists %}
<div class="warningnotice">
<p>{% trans "The following events exist despite exceptions because they have active bookings:" %}</p>
<ul>
{% for event in object.recurrence_exceptions_report.events.all %}
<li><a href="{{ event.get_absolute_view_url }}">{{ event }}{% if event.label %} - {{ event.start_datetime|date:"DATETIME_FORMAT" }}{% endif %}</a></li>
{% for event in events %}
{% include 'chrono/manager_agenda_event_fragment.html' with view_mode='settings_view' %}
{% endfor %}
</ul>
<p>{% trans "You can cancel them manually for this warning to go away, or wait until they are passed." %}</p>
</div>
{% else %}
<div class="big-msg-info">
{% blocktrans %}
This agenda doesn't have any event yet. Click on the "New Event" button in
the top right of the page to add a first one.
{% endblocktrans %}
</div>
{% endif %}
{% endwith %}
</div>
{% if has_recurring_events %}
<div aria-labelledby="tab-time-periods" hidden="" id="panel-time-periods" role="tabpanel" tabindex="0">
{% if object.recurrence_exceptions_report.events.exists %}
<div class="warningnotice">
<p>{% trans "The following events exist despite exceptions because they have active bookings:" %}</p>
<ul>
{% for event in object.recurrence_exceptions_report.events.all %}
<li><a href="{{ event.get_absolute_view_url }}">{{ event }}{% if event.label %} - {{ event.start_datetime|date:"DATETIME_FORMAT" }}{% endif %}</a></li>
{% endfor %}
</ul>
<p>{% trans "You can cancel them manually for this warning to go away, or wait until they are passed." %}</p>
</div>
{% endif %}
<ul class="objects-list single-links">
{% for exception in exceptions|slice:":5" %}
<li>
<a rel="popup" {% if not exception.read_only %}href="{% url 'chrono-manager-time-period-exception-edit' pk=exception.pk %}"{% endif %}>{{ exception }}</a>
{% if not exception.read_only %}
<a rel="popup" class="delete" href="{% url 'chrono-manager-time-period-exception-delete' pk=exception.id %}">{% trans "remove" %}</a>
{% endif %}
</li>
<li>
<a rel="popup" {% if not exception.read_only %}href="{% url 'chrono-manager-time-period-exception-edit' pk=exception.pk %}"{% endif %}>{{ exception }}</a>
{% if not exception.read_only %}
<a rel="popup" class="delete" href="{% url 'chrono-manager-time-period-exception-delete' pk=exception.id %}">{% trans "remove" %}</a>
{% endif %}
</li>
{% endfor %}
{% if exceptions|length > 5 %}
<li><a class="timeperiod-exception-all desk-{{ desk.pk }}" rel="popup" data-selector="div.timeperiod" href="{% url 'chrono-manager-time-period-exception-extract-list' pk=desk.id %}">({% trans 'see all exceptions' %})</a></li>
<li><a class="timeperiod-exception-all desk-{{ desk.pk }}" rel="popup" data-selector="div.timeperiod" href="{% url 'chrono-manager-time-period-exception-extract-list' pk=desk.id %}">({% trans 'see all exceptions' %})</a></li>
{% endif %}
<li><a class="add" rel="popup" href="{% url 'chrono-manager-agenda-add-time-period-exception' agenda_pk=object.pk pk=desk.pk %}">{% trans 'Add a time period exception' %}</a></li>
</ul>
@ -74,66 +74,66 @@
<a rel="popup" class="button" href="{% url 'chrono-manager-desk-add-import-time-period-exceptions' pk=desk.pk %}">{% trans 'Configure' %}</a>
</div>
</div>
{% endif %}
{% endif %}
<div aria-labelledby="tab-display-options" hidden="" id="panel-display-options" role="tabpanel" tabindex="0">
<ul>
<li>
{% if agenda.event_display_template %}
{% trans "Event display template:" %}
<pre>{{ agenda.event_display_template }}</pre>
{% else %}
<div aria-labelledby="tab-display-options" hidden="" id="panel-display-options" role="tabpanel" tabindex="0">
<ul>
<li>
{% if agenda.event_display_template %}
{% trans "Event display template:" %}
<pre>{{ agenda.event_display_template }}</pre>
{% else %}
{% trans "No event display template configured for this agenda." %}
{% endif %}
</li>
<li>
{% trans "Booking display template:" %}
<pre>{{ agenda.get_booking_user_block_template }}</pre>
</li>
</ul>
<div class="panel--buttons">
<a rel="popup" class="button" href="{% url 'chrono-manager-agenda-display-settings' pk=object.pk %}">{% trans 'Configure' %}</a>
</div>
{% endif %}
</li>
<li>
{% trans "Booking display template:" %}
<pre>{{ agenda.get_booking_user_block_template }}</pre>
</li>
</ul>
<div class="panel--buttons">
<a rel="popup" class="button" href="{% url 'chrono-manager-agenda-display-settings' pk=object.pk %}">{% trans 'Configure' %}</a>
</div>
</div>
<div aria-labelledby="tab-booking-check-options" hidden="" id="panel-booking-check-options" role="tabpanel" tabindex="0">
<ul>
{% with agenda.get_booking_check_filters as check_filters %}
{% if check_filters %}
<div aria-labelledby="tab-booking-check-options" hidden="" id="panel-booking-check-options" role="tabpanel" tabindex="0">
<ul>
{% with agenda.get_booking_check_filters as check_filters %}
{% if check_filters %}
<li>{% trans "Filters:" %}
<ul>
{% for key in check_filters %}
<li>{{ key }}</li>
<li>{{ key }}</li>
{% endfor %}
</ul>
</li>
{% else %}
{% else %}
<li>{% trans "No filters configured for this agenda." %}</li>
{% endif %}
{% endwith %}
<li>{% trans "Automatically mark event as checked when all bookings have been checked:" %} {{ agenda.mark_event_checked_auto|yesno }}</li>
<li>{% trans "Prevent the check of bookings when event was marked as checked:" %} {{ agenda.disable_check_update|yesno }}</li>
</ul>
<div class="panel--buttons">
<a rel="popup" class="button" href="{% url 'chrono-manager-agenda-booking-check-settings' pk=object.pk %}">{% trans 'Configure' %}</a>
</div>
{% endif %}
{% endwith %}
<li>{% trans "Automatically mark event as checked when all bookings have been checked:" %} {{ agenda.mark_event_checked_auto|yesno }}</li>
<li>{% trans "Prevent the check of bookings when event was marked as checked:" %} {{ agenda.disable_check_update|yesno }}</li>
</ul>
<div class="panel--buttons">
<a rel="popup" class="button" href="{% url 'chrono-manager-agenda-booking-check-settings' pk=object.pk %}">{% trans 'Configure' %}</a>
</div>
</div>
<div aria-labelledby="tab-notifications" hidden="" id="panel-notifications" role="tabpanel" tabindex="0">
{% for notification_type in object.notifications_settings.get_notification_types %}
<div aria-labelledby="tab-notifications" hidden="" id="panel-notifications" role="tabpanel" tabindex="0">
{% for notification_type in object.notifications_settings.get_notification_types %}
{% if forloop.first %}<ul>{% endif %}
<li>
<li>
{% blocktrans trimmed with display_value=notification_type.display_value label=notification_type.label %}
{{ label }}: {{ display_value }} will be notified.
{{ label }}: {{ display_value }} will be notified.
{% endblocktrans %}
</li>
</li>
{% if forloop.last %}</ul>{% endif %}
{% empty %}
<p>{% trans "Notifications are disabled for this agenda." %}</p>
{% endfor %}
<div class="panel--buttons">
<a rel="popup" class="button" href="{% url 'chrono-manager-agenda-notifications-settings' pk=object.id %}">{% trans 'Configure' %}</a>
</div>
{% empty %}
<p>{% trans "Notifications are disabled for this agenda." %}</p>
{% endfor %}
<div class="panel--buttons">
<a rel="popup" class="button" href="{% url 'chrono-manager-agenda-notifications-settings' pk=object.id %}">{% trans 'Configure' %}</a>
</div>
</div>
{% endblock %}

View File

@ -2,8 +2,8 @@
{% load i18n %}
{% block breadcrumb %}
{{ block.super }}
<a href="{% url 'chrono-manager-events-timesheet' pk=agenda.pk %}">{% trans "Timesheet" %}</a>
{{ block.super }}
<a href="{% url 'chrono-manager-events-timesheet' pk=agenda.pk %}">{% trans "Timesheet" %}</a>
{% endblock %}
{% block appbar_actions %}{% endblock %}

View File

@ -6,34 +6,34 @@
<form id="timesheet">
{{ form.as_p }}
<script>
$(function() {
$('#id_date_display').on('change', function() {
if ($(this).val() == 'custom') {
$('#id_custom_nb_dates_per_page').parent().show();
} else {
$('#id_custom_nb_dates_per_page').parent().hide();
}
$(function() {
$('#id_date_display').on('change', function() {
if ($(this).val() == 'custom') {
$('#id_custom_nb_dates_per_page').parent().show();
} else {
$('#id_custom_nb_dates_per_page').parent().hide();
}
});
$('#id_date_display').trigger('change');
$('#id_group_by').on('change', function() {
if ($(this).val()) {
$('#id_with_page_break').parent().show();
} else {
$('#id_with_page_break').parent().hide();
}
});
$('#id_group_by').trigger('change');
});
$('#id_date_display').trigger('change');
$('#id_group_by').on('change', function() {
if ($(this).val()) {
$('#id_with_page_break').parent().show();
} else {
$('#id_with_page_break').parent().hide();
}
});
$('#id_group_by').trigger('change');
});
</script>
<button class="submit-button">{% trans "See timesheet" %}</button>
{% if request.GET and form.is_valid %}
<button class="submit-button" name="pdf">{% trans "Get PDF file" %}</button>
<button class="submit-button" name="csv">{% trans "Get CSV file" %}</button>
<button class="submit-button" name="pdf">{% trans "Get PDF file" %}</button>
<button class="submit-button" name="csv">{% trans "Get CSV file" %}</button>
{% endif %}
</form>
{% if request.GET and form.is_valid %}
{% include 'chrono/manager_events_timesheet_fragment.html' %}
{% include 'chrono/manager_events_timesheet_fragment.html' %}
{% endif %}
</div>
</div>

View File

@ -1,69 +1,69 @@
{% load i18n %}
{% if event %}
<h4>{% blocktrans with event_date=event.start_datetime %}Timesheet - {{ event }} - {{ event_date }}{% endblocktrans %}</h4>
<h4>{% blocktrans with event_date=event.start_datetime %}Timesheet - {{ event }} - {{ event_date }}{% endblocktrans %}</h4>
{% else %}
<h4>{% blocktrans with start=form.cleaned_data.date_start end=form.cleaned_data.date_end %}Timesheet from {{ start }} to {{ end }}{% endblocktrans %}</h4>
<h4>{% blocktrans with start=form.cleaned_data.date_start end=form.cleaned_data.date_end %}Timesheet from {{ start }} to {{ end }}{% endblocktrans %}</h4>
{% endif %}
{% with slots=form.get_slots %}
{% with events_num=slots.events|length %}
{% for dates in slots.dates %}
{% for grouper in slots.users %}
{% if form.cleaned_data.group_by %}<h5>{{ form.cleaned_data.group_by }}: {{ grouper.grouper }}</h5>{% endif %}
<table class="main timesheet">
<thead>
<tr>
<th>{% trans "First name" %}</th>
<th>{% trans "Last name" %}</th>
{% for k in slots.extra_data %}<th>{{ k }}</th>{% endfor %}
{% if events_num > 1 and form.cleaned_data.activity_display != 'col' %}<th class="activity">{% trans "Activity" %}</th>{% endif %}
{% for date, events in dates %}
{% if form.cleaned_data.activity_display == 'col' %}
{% for event in events %}
<th class="date-event" data-id="{{ date|date:"d-m" }}:{{ event.slug }}">{% blocktrans with date=date|date:"d/m" %}{{ event }} of {{ date }}{% endblocktrans %}</th>
{% endfor %}
{% else %}
<th class="date" data-id="{{ date|date:"d-m" }}">{{ date|date:"D d/m" }}</th>
{% endif %}
{% with events_num=slots.events|length %}
{% for dates in slots.dates %}
{% for grouper in slots.users %}
{% if form.cleaned_data.group_by %}<h5>{{ form.cleaned_data.group_by }}: {{ grouper.grouper }}</h5>{% endif %}
<table class="main timesheet">
<thead>
<tr>
<th>{% trans "First name" %}</th>
<th>{% trans "Last name" %}</th>
{% for k in slots.extra_data %}<th>{{ k }}</th>{% endfor %}
{% if events_num > 1 and form.cleaned_data.activity_display != 'col' %}<th class="activity">{% trans "Activity" %}</th>{% endif %}
{% for date, events in dates %}
{% if form.cleaned_data.activity_display == 'col' %}
{% for event in events %}
<th class="date-event" data-id="{{ date|date:"d-m" }}:{{ event.slug }}">{% blocktrans with date=date|date:"d/m" %}{{ event }} of {{ date }}{% endblocktrans %}</th>
{% endfor %}
{% else %}
<th class="date" data-id="{{ date|date:"d-m" }}">{{ date|date:"D d/m" }}</th>
{% endif %}
{% endfor %}
</tr>
</thead>
<tbody>
{% if form.cleaned_data.activity_display == 'col' %}
{% for user in grouper.users %}
<tr>
<td>{{ user.user_first_name }}</td>
<td>{{ user.user_last_name }}</td>
{% for k in slots.extra_data %}<td>{{ user.extra_data|get:k }}</td>{% endfor %}
{% for date, events in dates %}
{% for event in events %}
{% for item in user.events %}{% if item.event == event %}{% with booked=item.dates|get:date %}<td class="date" data-id="{{ date|date:"d-m" }}:{{ item.event.slug }}:{{ user.user_id }}">{% if booked is True %}☐{% elif booked is None %}-{% endif %}</td>{% endwith %}{% endif %}{% endfor %}
{% endfor %}
{% endfor %}
</tr>
{% endfor %}
{% else %}
{% for user in grouper.users %}{% for item in user.events %}
<tr>
{% if forloop.first %}
<td {% if events_num > 1 %}rowspan="{{ events_num }}"{% endif %}>{{ user.user_first_name }}</td>
<td {% if events_num > 1 %}rowspan="{{ events_num }}"{% endif %}>{{ user.user_last_name }}</td>
{% for k in slots.extra_data %}<td {% if events_num > 1 %}rowspan="{{ events_num }}"{% endif %}>{{ user.extra_data|get:k }}</td>{% endfor %}
{% endif %}
{% if events_num > 1 %}<td class="activity">{{ item.event }}</td>{% endif %}
{% for date, events in dates %}
{% with booked=item.dates|get:date %}<td class="date" data-id="{{ date|date:"d-m" }}:{{ item.event.slug }}:{{ user.user_id }}">{% if booked is True %}☐{% elif booked is None %}-{% endif %}</td>{% endwith %}
{% endfor %}
</tr>
{% endfor %}{% endfor %}
{% endif %}
</tbody>
</table>
{% if form.cleaned_data.with_page_break %}{% if not forloop.last or not forloop.parentloop.last %}<div class="page_break"></div>{% endif %}{% endif %}
{% endfor %}
</tr>
</thead>
<tbody>
{% if form.cleaned_data.activity_display == 'col' %}
{% for user in grouper.users %}
<tr>
<td>{{ user.user_first_name }}</td>
<td>{{ user.user_last_name }}</td>
{% for k in slots.extra_data %}<td>{{ user.extra_data|get:k }}</td>{% endfor %}
{% for date, events in dates %}
{% for event in events %}
{% for item in user.events %}{% if item.event == event %}{% with booked=item.dates|get:date %}<td class="date" data-id="{{ date|date:"d-m" }}:{{ item.event.slug }}:{{ user.user_id }}">{% if booked is True %}☐{% elif booked is None %}-{% endif %}</td>{% endwith %}{% endif %}{% endfor %}
{% endfor %}
{% endfor %}
</tr>
{% endfor %}
{% else %}
{% for user in grouper.users %}{% for item in user.events %}
<tr>
{% if forloop.first %}
<td {% if events_num > 1 %}rowspan="{{ events_num }}"{% endif %}>{{ user.user_first_name }}</td>
<td {% if events_num > 1 %}rowspan="{{ events_num }}"{% endif %}>{{ user.user_last_name }}</td>
{% for k in slots.extra_data %}<td {% if events_num > 1 %}rowspan="{{ events_num }}"{% endif %}>{{ user.extra_data|get:k }}</td>{% endfor %}
{% endif %}
{% if events_num > 1 %}<td class="activity">{{ item.event }}</td>{% endif %}
{% for date, events in dates %}
{% with booked=item.dates|get:date %}<td class="date" data-id="{{ date|date:"d-m" }}:{{ item.event.slug }}:{{ user.user_id }}">{% if booked is True %}☐{% elif booked is None %}-{% endif %}</td>{% endwith %}
{% endfor %}
</tr>
{% endfor %}{% endfor %}
{% endif %}
</tbody>
</table>
{% if form.cleaned_data.with_page_break %}{% if not forloop.last or not forloop.parentloop.last %}<div class="page_break"></div>{% endif %}{% endif %}
{% endfor %}
{% if not form.cleaned_data.with_page_break and not forloop.last %}<div class="page_break"></div>{% endif %}
{% endfor %}
{% endwith %}
{% if not form.cleaned_data.with_page_break and not forloop.last %}<div class="page_break"></div>{% endif %}
{% endfor %}
{% endwith %}
{% endwith %}

View File

@ -1,22 +1,22 @@
{% load static i18n %}
<html>
<head>
<base href="{{ base_uri }}" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>{% blocktrans with start=form.cleaned_data.date_start end=form.cleaned_data.date_end %}Timesheet from {{ start }} to {{ end }}{% endblocktrans %}</title>
<meta name="author" content="Entr'ouvert" />
<link href="{% static 'css/timesheet.css' %}" media="print" rel="stylesheet" />
<style media="print">
@page {
<head>
<base href="{{ base_uri }}" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>{% blocktrans with start=form.cleaned_data.date_start end=form.cleaned_data.date_end %}Timesheet from {{ start }} to {{ end }}{% endblocktrans %}</title>
<meta name="author" content="Entr'ouvert" />
<link href="{% static 'css/timesheet.css' %}" media="print" rel="stylesheet" />
<style media="print">
@page {
size: {{ form.cleaned_data.orientation|default:"portrait" }};
}
</style>
</head>
<body>
<div id="main">
{% if request.GET and form.is_valid %}
{% include 'chrono/manager_events_timesheet_fragment.html' %}
{% endif %}
</div>
</body>
}
</style>
</head>
<body>
<div id="main">
{% if request.GET and form.is_valid %}
{% include 'chrono/manager_events_timesheet_fragment.html' %}
{% endif %}
</div>
</body>
</html>

View File

@ -2,56 +2,56 @@
{% load i18n %}
{% block breadcrumb %}
{{ block.super }}
{% if object.pk %}
<a href="{% url 'chrono-manager-events-type-edit' pk=object.pk %}">{{ object.label }}</a>
{% else %}
<a href="{% url 'chrono-manager-events-type-add' %}">{% trans "New events type" %}</a>
{% endif %}
{{ block.super }}
{% if object.pk %}
<a href="{% url 'chrono-manager-events-type-edit' pk=object.pk %}">{{ object.label }}</a>
{% else %}
<a href="{% url 'chrono-manager-events-type-add' %}">{% trans "New events type" %}</a>
{% endif %}
{% endblock %}
{% block appbar %}
{% if object.pk %}
<h2>{% trans "Edit events type" %}</h2>
{% else %}
<h2>{% trans "New events type" %}</h2>
{% endif %}
{% if object.pk %}
<h2>{% trans "Edit events type" %}</h2>
{% else %}
<h2>{% trans "New events type" %}</h2>
{% endif %}
{% endblock %}
{% block content %}
<form method="post" enctype="multipart/form-data">
{% csrf_token %}
{{ form.as_p }}
{% if object.pk %}
<h3>{% trans "Custom fields" %}</h3>
{{ formset.management_form }}
<table id="custom-field-forms">
<thead>
<tr>
{% for field in formset.0 %}
<th class="column-{{ field.name }}{% if field.required %} required{% endif %}">{{ field.label }}</th>
{% endfor %}
</tr>
</thead>
<tbody>
{% for sub_form in formset %}
<tr class='custom-field-form'>
{% for field in sub_form %}
<td class="field-{{ field.name }}">
{{ field.errors.as_ul }}
{{ field }}
</td>
{% endfor %}
</tr>
{% endfor %}
</tbody>
</table>
<button id="add-custom-field-form" type="button">{% trans "Add another custom field" %}</button>
{% endif %}
<div class="buttons">
<button class="submit-button">{% trans "Save" %}</button>
<a class="cancel" href="{% url 'chrono-manager-events-type-list' %}">{% trans 'Cancel' %}</a>
</div>
</form>
<form method="post" enctype="multipart/form-data">
{% csrf_token %}
{{ form.as_p }}
{% if object.pk %}
<h3>{% trans "Custom fields" %}</h3>
{{ formset.management_form }}
<table id="custom-field-forms">
<thead>
<tr>
{% for field in formset.0 %}
<th class="column-{{ field.name }}{% if field.required %} required{% endif %}">{{ field.label }}</th>
{% endfor %}
</tr>
</thead>
<tbody>
{% for sub_form in formset %}
<tr class='custom-field-form'>
{% for field in sub_form %}
<td class="field-{{ field.name }}">
{{ field.errors.as_ul }}
{{ field }}
</td>
{% endfor %}
</tr>
{% endfor %}
</tbody>
</table>
<button id="add-custom-field-form" type="button">{% trans "Add another custom field" %}</button>
{% endif %}
<div class="buttons">
<button class="submit-button">{% trans "Save" %}</button>
<a class="cancel" href="{% url 'chrono-manager-events-type-list' %}">{% trans 'Cancel' %}</a>
</div>
</form>
{% endblock %}

View File

@ -2,38 +2,38 @@
{% load i18n %}
{% block breadcrumb %}
{{ block.super }}
<a href="{% url 'chrono-manager-events-type-list' %}">{% trans "Events types" %}</a>
{{ block.super }}
<a href="{% url 'chrono-manager-events-type-list' %}">{% trans "Events types" %}</a>
{% endblock %}
{% block appbar %}
<h2>{% trans 'Events types' %}</h2>
<span class="actions">
<a rel="popup" href="{% url 'chrono-manager-events-type-add' %}">{% trans 'New' %}</a>
</span>
<h2>{% trans 'Events types' %}</h2>
<span class="actions">
<a rel="popup" href="{% url 'chrono-manager-events-type-add' %}">{% trans 'New' %}</a>
</span>
{% endblock %}
{% block content %}
<div class="pk-information">
<p>{% trans "Define here events types to set on events agendas." %}</p>
</div>
{% if object_list %}
<div>
<ul class="objects-list single-links">
{% for object in object_list %}
<li>
<a href="{% url 'chrono-manager-events-type-edit' pk=object.pk %}">{{ object.label }} ({{ object.slug }})</a>
<a rel="popup" class="delete" href="{% url 'chrono-manager-events-type-delete' pk=object.pk %}">{% trans "remove" %}</a>
</li>
{% endfor %}
</ul>
</div>
{% else %}
<div class="big-msg-info">
{% blocktrans %}
This site doesn't have any events type yet. Click on the "New" button in the top
right of the page to add a first one.
{% endblocktrans %}
</div>
{% endif %}
<div class="pk-information">
<p>{% trans "Define here events types to set on events agendas." %}</p>
</div>
{% if object_list %}
<div>
<ul class="objects-list single-links">
{% for object in object_list %}
<li>
<a href="{% url 'chrono-manager-events-type-edit' pk=object.pk %}">{{ object.label }} ({{ object.slug }})</a>
<a rel="popup" class="delete" href="{% url 'chrono-manager-events-type-delete' pk=object.pk %}">{% trans "remove" %}</a>
</li>
{% endfor %}
</ul>
</div>
{% else %}
<div class="big-msg-info">
{% blocktrans %}
This site doesn't have any events type yet. Click on the "New" button in the top
right of the page to add a first one.
{% endblocktrans %}
</div>
{% endif %}
{% endblock %}

View File

@ -2,55 +2,55 @@
{% load i18n %}
{% block appbar %}
<h2>{% trans 'Agendas' %}</h2>
<span class="actions">
{% if user.is_staff or has_access_to_unavailability_calendars %}
<a class="extra-actions-menu-opener"></a>
<ul class="extra-actions-menu">
{% if user.is_staff %}
<li><a rel="popup" href="{% url 'chrono-manager-agendas-import' %}">{% trans 'Import' %}</a></li>
<li><a rel="popup" href="{% url 'chrono-manager-agendas-export' %}" data-autoclose-dialog="true">{% trans 'Export' %}</a></li>
<li><a href="{% url 'chrono-manager-events-type-list' %}">{% trans 'Events types' %}</a></li>
{% if shared_custody_enabled %}
<li><a rel="popup" href="{% url 'chrono-manager-shared-custody-settings' %}">{% trans 'Shared custody' %}</a></li>
{% endif %}
{% endif %}
{% if has_access_to_unavailability_calendars %}
<li><a href="{% url 'chrono-manager-unavailability-calendar-list' %}">{% trans 'Unavailability calendars' %}</a></li>
<h2>{% trans 'Agendas' %}</h2>
<span class="actions">
{% if user.is_staff or has_access_to_unavailability_calendars %}
<a class="extra-actions-menu-opener"></a>
<ul class="extra-actions-menu">
{% if user.is_staff %}
<li><a rel="popup" href="{% url 'chrono-manager-agendas-import' %}">{% trans 'Import' %}</a></li>
<li><a rel="popup" href="{% url 'chrono-manager-agendas-export' %}" data-autoclose-dialog="true">{% trans 'Export' %}</a></li>
<li><a href="{% url 'chrono-manager-events-type-list' %}">{% trans 'Events types' %}</a></li>
{% if shared_custody_enabled %}
<li><a rel="popup" href="{% url 'chrono-manager-shared-custody-settings' %}">{% trans 'Shared custody' %}</a></li>
{% endif %}
{% endif %}
{% if has_access_to_unavailability_calendars %}
<li><a href="{% url 'chrono-manager-unavailability-calendar-list' %}">{% trans 'Unavailability calendars' %}</a></li>
{% endif %}
{% if user.is_staff %}
<li><a href="{% url 'chrono-manager-resource-list' %}">{% trans 'Resources' %}</a></li>
{% endif %}
</ul>
{% endif %}
{% if user.is_staff %}
<li><a href="{% url 'chrono-manager-resource-list' %}">{% trans 'Resources' %}</a></li>
<a href="{% url 'chrono-manager-category-list' %}">{% trans 'Categories' %}</a>
<a rel="popup" href="{% url 'chrono-manager-agenda-add' %}">{% trans 'New' %}</a>
{% endif %}
</ul>
{% endif %}
{% if user.is_staff %}
<a href="{% url 'chrono-manager-category-list' %}">{% trans 'Categories' %}</a>
<a rel="popup" href="{% url 'chrono-manager-agenda-add' %}">{% trans 'New' %}</a>
{% endif %}
</span>
</span>
{% endblock %}
{% block content %}
{% if object_list %}
{% regroup object_list by category as agenda_groups %}
{% for group in agenda_groups %}
<div class="section">
{% if group.grouper %}<h3>{{ group.grouper }}</h3>{% elif not forloop.first %}<h3>{% trans "Misc" %}</h3>{% endif %}
<ul class="objects-list single-links">
{% for object in group.list %}
<li><a href="{% url 'chrono-manager-agenda-view' pk=object.id %}"><span class="badge">{{ object.get_kind_display }}</span> {{ object.label }}{% if user.is_staff %} <span class="identifier">[{% trans "identifier:" %} {{ object.slug }}]{% endif %}</span></a></li>
{% if object_list %}
{% regroup object_list by category as agenda_groups %}
{% for group in agenda_groups %}
<div class="section">
{% if group.grouper %}<h3>{{ group.grouper }}</h3>{% elif not forloop.first %}<h3>{% trans "Misc" %}</h3>{% endif %}
<ul class="objects-list single-links">
{% for object in group.list %}
<li><a href="{% url 'chrono-manager-agenda-view' pk=object.id %}"><span class="badge">{{ object.get_kind_display }}</span> {{ object.label }}{% if user.is_staff %} <span class="identifier">[{% trans "identifier:" %} {{ object.slug }}]{% endif %}</span></a></li>
{% endfor %}
</ul>
</div>
{% endfor %}
</ul>
</div>
{% endfor %}
{% else %}
<div class="big-msg-info">
{% blocktrans %}
This site doesn't have any agenda yet. Click on the "New" button in the top
right of the page to add a first one.
{% endblocktrans %}
</div>
{% endif %}
{% else %}
<div class="big-msg-info">
{% blocktrans %}
This site doesn't have any agenda yet. Click on the "New" button in the top
right of the page to add a first one.
{% endblocktrans %}
</div>
{% endif %}
{% endblock %}

View File

@ -2,30 +2,30 @@
{% load i18n %}
{% block extrascripts %}
{{ block.super }}
{{ form.media }}
{{ block.super }}
{{ form.media }}
{% endblock %}
{% block breadcrumb %}
{{ block.super }}
<a href="{% url 'chrono-manager-agenda-view' pk=agenda.id %}">{{agenda.label}}</a>
{{ block.super }}
<a href="{% url 'chrono-manager-agenda-view' pk=agenda.id %}">{{agenda.label}}</a>
{% endblock %}
{% block appbar %}
<h2>{% trans "Import Events" %}</h2>
<h2>{% trans "Import Events" %}</h2>
{% endblock %}
{% block content %}
<form method="post" enctype="multipart/form-data">
{% csrf_token %}
{{ form.as_p }}
<p>
<a href="{% url 'chrono-manager-sample-events-csv' %}">{% trans 'Download sample file' %}</a>
</p>
<div class="buttons">
<button>{% trans "Import" %}</button>
<a class="cancel" href="{% url 'chrono-manager-agenda-settings' pk=agenda.id %}">{% trans 'Cancel' %}</a>
</div>
</form>
<form method="post" enctype="multipart/form-data">
{% csrf_token %}
{{ form.as_p }}
<p>
<a href="{% url 'chrono-manager-sample-events-csv' %}">{% trans 'Download sample file' %}</a>
</p>
<div class="buttons">
<button>{% trans "Import" %}</button>
<a class="cancel" href="{% url 'chrono-manager-agenda-settings' pk=agenda.id %}">{% trans 'Cancel' %}</a>
</div>
</form>
{% endblock %}

View File

@ -2,56 +2,56 @@
{% load i18n %}
{% block extrascripts %}
{{ block.super }}
{{ form.media }}
{{ block.super }}
{{ form.media }}
{% endblock %}
{% block breadcrumb %}
{{ block.super }}
<a href="">{% trans "Manage exception sources" %}</a>
{{ block.super }}
<a href="">{% trans "Manage exception sources" %}</a>
{% endblock %}
{% block appbar %}
<h2>{% trans "Manage exception sources" %}</h2>
<h2>{% trans "Manage exception sources" %}</h2>
{% endblock %}
{% block content %}
<form method="post" enctype="multipart/form-data">
{% if exception_sources or unavailability_calendars %}
<ul class="objects-list single-links">
{% for object in exception_sources %}
<li>
<form method="post" enctype="multipart/form-data">
{% if exception_sources or unavailability_calendars %}
<ul class="objects-list single-links">
{% for object in exception_sources %}
<li>
<a {% if not object.enabled %}class="disabled"{% endif %} title="{{ object }}" {% if object.ics_url %}href="{{ object.render_ics_url }}"{% endif %}>{{ object|truncatechars:50 }}</a>
{% if object.ics_filename %}
<a rel="popup" class="link-action-icon refresh" href="{% url 'chrono-manager-time-period-exception-source-replace' object.pk %}">{% trans "replace" %}</a>
{% elif object.ics_url %}
<a class="link-action-icon refresh" href="{% url 'chrono-manager-time-period-exception-source-refresh' object.pk %}">{% trans "refresh" %}</a>
{% endif %}
{% if not object.settings_slug %}
<a rel="popup" class="delete" href="{% url 'chrono-manager-time-period-exception-source-delete' object.pk %}">{% trans "remove" %}</a>
{% else %}
<a class="link-action-text" href="{% url 'chrono-manager-time-period-exception-source-toggle' object.pk %}">({{ object.enabled|yesno:_("disable,enable") }})</a>
{% endif %}
</li>
{% endfor %}
{% for unavailability_calendar in unavailability_calendars %}
<li>
<a {% if not unavailability_calendar.enabled %}class="disabled"{% endif %} title="{{ unavailability_calendar }}" href="{{ unavailability_calendar.get_absolute_url }}">{{ unavailability_calendar|truncatechars:50 }}</a>
<a class="link-action-text" href="{% url 'chrono-manager-unavailability-calendar-toggle-view' desk.pk unavailability_calendar.pk %}">({{ unavailability_calendar.enabled|yesno:_("disable,enable") }})</a>
</li>
{% endfor %}
</ul>
{% endif %}
{% if object.ics_filename %}
<a rel="popup" class="link-action-icon refresh" href="{% url 'chrono-manager-time-period-exception-source-replace' object.pk %}">{% trans "replace" %}</a>
{% elif object.ics_url %}
<a class="link-action-icon refresh" href="{% url 'chrono-manager-time-period-exception-source-refresh' object.pk %}">{% trans "refresh" %}</a>
{% endif %}
{% if not object.settings_slug %}
<a rel="popup" class="delete" href="{% url 'chrono-manager-time-period-exception-source-delete' object.pk %}">{% trans "remove" %}</a>
{% else %}
<a class="link-action-text" href="{% url 'chrono-manager-time-period-exception-source-toggle' object.pk %}">({{ object.enabled|yesno:_("disable,enable") }})</a>
{% endif %}
</li>
{% endfor %}
{% for unavailability_calendar in unavailability_calendars %}
<li>
<a {% if not unavailability_calendar.enabled %}class="disabled"{% endif %} title="{{ unavailability_calendar }}" href="{{ unavailability_calendar.get_absolute_url }}">{{ unavailability_calendar|truncatechars:50 }}</a>
<a class="link-action-text" href="{% url 'chrono-manager-unavailability-calendar-toggle-view' desk.pk unavailability_calendar.pk %}">({{ unavailability_calendar.enabled|yesno:_("disable,enable") }})</a>
</li>
{% endfor %}
</ul>
{% endif %}
<p class="notice">{% trans "To add new exceptions, you can upload a file or specify an address to a remote calendar." %}</p>
{% csrf_token %}
{{ form.as_p }}
<p>
</p>
<div class="buttons">
<button>{% trans "Import" %}</button>
<a class="cancel" href="{{ view.get_success_url }}">{% trans 'Cancel' %}</a>
</div>
</form>
<p class="notice">{% trans "To add new exceptions, you can upload a file or specify an address to a remote calendar." %}</p>
{% csrf_token %}
{{ form.as_p }}
<p>
</p>
<div class="buttons">
<button>{% trans "Import" %}</button>
<a class="cancel" href="{{ view.get_success_url }}">{% trans 'Cancel' %}</a>
</div>
</form>
{% endblock %}

View File

@ -2,36 +2,36 @@
{% load i18n %}
{% block extrascripts %}
{{ block.super }}
{{ form.media }}
{{ block.super }}
{{ form.media }}
{% endblock %}
{% block breadcrumb %}
{{ block.super }}
{% if object.id %}
<a href="{% url 'chrono-manager-agenda-view' pk=object.agenda.id %}">{{object.agenda.label}}</a>
{% endif %}
{{ block.super }}
{% if object.id %}
<a href="{% url 'chrono-manager-agenda-view' pk=object.agenda.id %}">{{object.agenda.label}}</a>
{% endif %}
{% endblock %}
{% block appbar %}
{% if object.id %}
<h2>{% trans "Edit Meeting Type" %}</h2>
<span class="actions">
<a rel="popup" href="{% url 'chrono-manager-meeting-type-delete' pk=object.id %}">{% trans 'Delete' %}</a>
</span>
{% else %}
<h2>{% trans "New Meeting Type" %}</h2>
{% endif %}
{% if object.id %}
<h2>{% trans "Edit Meeting Type" %}</h2>
<span class="actions">
<a rel="popup" href="{% url 'chrono-manager-meeting-type-delete' pk=object.id %}">{% trans 'Delete' %}</a>
</span>
{% else %}
<h2>{% trans "New Meeting Type" %}</h2>
{% endif %}
{% endblock %}
{% block content %}
<form method="post" enctype="multipart/form-data">
{% csrf_token %}
{{ form.as_p }}
<div class="buttons">
<button class="submit-button">{% trans "Save" %}</button>
<a class="cancel" href="{% url 'chrono-manager-agenda-settings' pk=agenda.id %}">{% trans 'Cancel' %}</a>
</div>
</form>
<form method="post" enctype="multipart/form-data">
{% csrf_token %}
{{ form.as_p }}
<div class="buttons">
<button class="submit-button">{% trans "Save" %}</button>
<a class="cancel" href="{% url 'chrono-manager-agenda-settings' pk=agenda.id %}">{% trans 'Cancel' %}</a>
</div>
</form>
{% endblock %}

View File

@ -2,72 +2,72 @@
{% load i18n %}
{% block actions %}
{{ block.super }}
<a href="{% url 'chrono-manager-agenda-month-view' pk=agenda.id year=view.date|date:"Y" month=view.date|date:"n" %}">{% trans 'Month view' %}</a>
{{ block.super }}
<a href="{% url 'chrono-manager-agenda-month-view' pk=agenda.id year=view.date|date:"Y" month=view.date|date:"n" %}">{% trans 'Month view' %}</a>
{% endblock %}
{% block content %}
{% for period, desk_infos in view.get_timetable_infos %}
{% 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 %}
{% 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>
<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 %}
{% 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 %}"
{% 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>
<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 %}
{% if forloop.last %}
</tbody>
</table>
{% endif %}
{% empty %}
<div class="closed-for-the-day">
<p>{% trans "No opening hours this day." %}</p>
</div>
{% endfor %}
{% 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 %}
{% if booking_colors %}
{% include "chrono/booking_color_legend.html" with colors=booking_colors %}
{% endif %}
{% endblock %}

View File

@ -2,65 +2,65 @@
{% 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>
{{ 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>
{% 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.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>
{% 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 %}
</tr>
{% resetcycle %}
{% if forloop.last %}
</tbody>
</table>
{% endif %}
{% empty %}
<div class="closed-for-the-day">
<p>{% trans "No opening hours this month." %}</p>
</div>
{% 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 %}
{% if booking_colors %}
{% include "chrono/booking_color_legend.html" with colors=booking_colors %}
{% endif %}
{% endblock %}

View File

@ -4,11 +4,11 @@
{% block extrascripts %}
{{ block.super }}
{% if 'display_exceptions' in request.GET %}
<script>
$(function () {
$('a.timeperiod-exception-all.desk-{{ request.GET.display_exceptions }}').click();
});
</script>
<script>
$(function () {
$('a.timeperiod-exception-all.desk-{{ request.GET.display_exceptions }}').click();
});
</script>
{% endif %}
{% endblock %}
@ -20,60 +20,60 @@
{% block agenda-extra-menu-actions %}
{% if object.desk_simple_management %}
<li><a href="{% url 'chrono-manager-agenda-desk-management-toggle-view' pk=object.pk %}">{% trans 'Switch to invididual desk management' %}</a></li>
<li><a href="{% url 'chrono-manager-agenda-desk-management-toggle-view' pk=object.pk %}">{% trans 'Switch to invididual desk management' %}</a></li>
{% elif agenda_is_available_for_simple_management %}
<li><a href="{% url 'chrono-manager-agenda-desk-management-toggle-view' pk=object.pk %}">{% trans 'Switch to global desk management' %}</a></li>
<li><a href="{% url 'chrono-manager-agenda-desk-management-toggle-view' pk=object.pk %}">{% trans 'Switch to global desk management' %}</a></li>
{% endif %}
{% endblock %}
{% block agenda-settings-extra-tab-buttons %}
<button aria-controls="panel-meeting-types"
aria-selected="{{meeting_types|yesno:"false,true"}}"
id="tab-meeting-types" role="tab"
tabindex="{{meeting_types|yesno:"-1,0"}}"
>{% trans "Meeting Types" %}</button>
{% if object.desk_simple_management %}
<button aria-controls="panel-meeting-types"
aria-selected="{{meeting_types|yesno:"false,true"}}"
id="tab-meeting-types" role="tab"
tabindex="{{meeting_types|yesno:"-1,0"}}"
>{% trans "Meeting Types" %}</button>
{% if object.desk_simple_management %}
<button aria-controls="panel-desks" aria-selected="false" id="tab-desks" role="tab" tabindex="-1">{% trans "Desks" %}</button>
{% endif %}
<button aria-controls="panel-time-periods"
aria-selected="{{meeting_types|yesno:"true,false"}}"
id="tab-time-periods" role="tab"
tabindex="{{meeting_types|yesno:"0"}}"
>{% trans "Time Periods" %}</button>
{% if has_resources %}
{% endif %}
<button aria-controls="panel-time-periods"
aria-selected="{{meeting_types|yesno:"true,false"}}"
id="tab-time-periods" role="tab"
tabindex="{{meeting_types|yesno:"0"}}"
>{% trans "Time Periods" %}</button>
{% if has_resources %}
<button aria-controls="panel-resources" aria-selected="false" id="tab-resources" role="tab" tabindex="-1">{% trans "Resources" %}</button>
{% endif %}
<button aria-controls="panel-display-options" aria-selected="false" id="tab-display-options" role="tab" tabindex="-1">{% trans "Display options" %}</button>
{% endif %}
<button aria-controls="panel-display-options" aria-selected="false" id="tab-display-options" role="tab" tabindex="-1">{% trans "Display options" %}</button>
{% endblock %}
{% block agenda-settings-extra-tab-list %}
<div aria-labelledby="tab-meeting-types" id="panel-meeting-types" role="tabpanel" tabindex="0"
{% if meeting_types %}hidden{% endif %}>
{% if meeting_types %}
<div aria-labelledby="tab-meeting-types" id="panel-meeting-types" role="tabpanel" tabindex="0"
{% if meeting_types %}hidden{% endif %}>
{% if meeting_types %}
<ul class="objects-list single-links">
{% for meeting_type in meeting_types %}
<li>
<a rel="popup" href="{% url 'chrono-manager-meeting-type-edit' pk=meeting_type.id %}">
{{meeting_type.label}}
<span class="duration">({{meeting_type.duration}} {% trans "minutes" %})</span>
<span class="identifier">[{% trans "identifier:" %} {{meeting_type.slug}}]</span>
</a>
<a rel="popup" class="delete" href="{% url 'chrono-manager-meeting-type-delete' pk=meeting_type.id %}">{% trans "remove" %}</a>
</li>
<li>
<a rel="popup" href="{% url 'chrono-manager-meeting-type-edit' pk=meeting_type.id %}">
{{meeting_type.label}}
<span class="duration">({{meeting_type.duration}} {% trans "minutes" %})</span>
<span class="identifier">[{% trans "identifier:" %} {{meeting_type.slug}}]</span>
</a>
<a rel="popup" class="delete" href="{% url 'chrono-manager-meeting-type-delete' pk=meeting_type.id %}">{% trans "remove" %}</a>
</li>
{% endfor %}
</ul>
{% else %}
{% else %}
<div class="big-msg-info">
{% blocktrans %}
This agenda doesn't have any meeting type yet. Click on the "New Meeting Type" button in
the top right of the page to add a first one.
This agenda doesn't have any meeting type yet. Click on the "New Meeting Type" button in
the top right of the page to add a first one.
{% endblocktrans %}
</div>
{% endif %}
</div>
{% endif %}
</div>
{% if object.desk_simple_management %}
{% if object.desk_simple_management %}
<div aria-labelledby="tab-desks" hidden="" id="panel-desks" role="tabpanel" tabindex="0">
<ul class="objects-list single-links">
{% for desk in object.prefetched_desks %}
@ -84,100 +84,100 @@
{% endfor %}
</ul>
</div>
{% endif %}
{% endif %}
<div aria-labelledby="tab-time-periods" {% if not meeting_types %}hidden{% endif %} id="panel-time-periods" role="tabpanel" tabindex="0">
{% if object.prefetched_desks %}
<div aria-labelledby="tab-time-periods" {% if not meeting_types %}hidden{% endif %} id="panel-time-periods" role="tabpanel" tabindex="0">
{% if object.prefetched_desks %}
<div class="timeperiods">
{% for desk in object.prefetched_desks %}
{% if not object.desk_simple_management or object.desk_simple_management and forloop.counter == 1 %}
<div class="timeperiod">
{% url 'chrono-manager-agenda-add-time-period' agenda_pk=object.pk pk=desk.pk as add_time_period_url %}
<ul class="objects-list single-links">
{% if not object.desk_simple_management and object.prefetched_desks|length > 1 %}
<li>
<a rel="popup" href="{% url 'chrono-manager-desk-edit' pk=desk.id %}">
<strong>{{ desk.label }}</strong>
</a>
<a rel="popup" class="delete" href="{% url 'chrono-manager-desk-delete' pk=desk.id %}">{% trans "remove" %}</a>
</li>
{% endif %}
{% for time_period in desk.timeperiod_set.all %}
<li>
<a rel="popup" href="{% url 'chrono-manager-time-period-edit' pk=time_period.id %}">{{ time_period }}</a>
<a rel="popup" class="delete" href="{% url 'chrono-manager-time-period-delete' pk=time_period.id %}">{% trans "remove" %}</a>
</li>
{% endfor %}
<li><a class="add" rel="popup" href="{{add_time_period_url}}">{% trans 'Add a time period' %}</a></li>
{% url 'chrono-manager-agenda-add-time-period-exception' agenda_pk=object.pk pk=desk.pk as add_time_period_exception_url %}
<li>
<a><strong>{% trans 'Exceptions' %}</strong></a>
<a class="link-action-icon settings" rel="popup" href="{% url 'chrono-manager-desk-add-import-time-period-exceptions' pk=desk.pk %}" title="{% trans 'Manage exception sources' %}">{% trans 'manage exceptions' %}</a>
</li>
{% for exception in desk.get_exceptions_within_two_weeks %}
<li>
<a rel="popup" {% if not exception.read_only %}href="{% url 'chrono-manager-time-period-exception-edit' pk=exception.pk %}"{% endif %}>{{ exception }}</a>
{% if not exception.read_only %}
<a rel="popup" class="delete" href="{% url 'chrono-manager-time-period-exception-delete' pk=exception.id %}">{% trans "remove" %}</a>
{% endif %}
</li>
{% endfor %}
{% if not desk.are_all_exceptions_displayed %}
<li><a class="timeperiod-exception-all desk-{{ desk.pk }}" rel="popup" data-selector="div.timeperiod" href="{% url 'chrono-manager-time-period-exception-extract-list' pk=desk.id %}">({% trans 'see all exceptions' %})</a></li>
{% endif %}
<li><a class="add" rel="popup" href="{{add_time_period_exception_url}}">{% trans 'Add a time period exception' %}</a></li>
</ul>
</div>
{% endif %}
{% if not object.desk_simple_management or object.desk_simple_management and forloop.counter == 1 %}
<div class="timeperiod">
{% url 'chrono-manager-agenda-add-time-period' agenda_pk=object.pk pk=desk.pk as add_time_period_url %}
<ul class="objects-list single-links">
{% if not object.desk_simple_management and object.prefetched_desks|length > 1 %}
<li>
<a rel="popup" href="{% url 'chrono-manager-desk-edit' pk=desk.id %}">
<strong>{{ desk.label }}</strong>
</a>
<a rel="popup" class="delete" href="{% url 'chrono-manager-desk-delete' pk=desk.id %}">{% trans "remove" %}</a>
</li>
{% endif %}
{% for time_period in desk.timeperiod_set.all %}
<li>
<a rel="popup" href="{% url 'chrono-manager-time-period-edit' pk=time_period.id %}">{{ time_period }}</a>
<a rel="popup" class="delete" href="{% url 'chrono-manager-time-period-delete' pk=time_period.id %}">{% trans "remove" %}</a>
</li>
{% endfor %}
<li><a class="add" rel="popup" href="{{add_time_period_url}}">{% trans 'Add a time period' %}</a></li>
{% url 'chrono-manager-agenda-add-time-period-exception' agenda_pk=object.pk pk=desk.pk as add_time_period_exception_url %}
<li>
<a><strong>{% trans 'Exceptions' %}</strong></a>
<a class="link-action-icon settings" rel="popup" href="{% url 'chrono-manager-desk-add-import-time-period-exceptions' pk=desk.pk %}" title="{% trans 'Manage exception sources' %}">{% trans 'manage exceptions' %}</a>
</li>
{% for exception in desk.get_exceptions_within_two_weeks %}
<li>
<a rel="popup" {% if not exception.read_only %}href="{% url 'chrono-manager-time-period-exception-edit' pk=exception.pk %}"{% endif %}>{{ exception }}</a>
{% if not exception.read_only %}
<a rel="popup" class="delete" href="{% url 'chrono-manager-time-period-exception-delete' pk=exception.id %}">{% trans "remove" %}</a>
{% endif %}
</li>
{% endfor %}
{% if not desk.are_all_exceptions_displayed %}
<li><a class="timeperiod-exception-all desk-{{ desk.pk }}" rel="popup" data-selector="div.timeperiod" href="{% url 'chrono-manager-time-period-exception-extract-list' pk=desk.id %}">({% trans 'see all exceptions' %})</a></li>
{% endif %}
<li><a class="add" rel="popup" href="{{add_time_period_exception_url}}">{% trans 'Add a time period exception' %}</a></li>
</ul>
</div>
{% endif %}
{% endfor %}
</div>
{% else %}
{% else %}
<div class="big-msg-info">
{% blocktrans %}
This agenda doesn't have any desk yet. Click on the "New Desk" button in
the top right of the page to add a first one.
This agenda doesn't have any desk yet. Click on the "New Desk" button in
the top right of the page to add a first one.
{% endblocktrans %}
</div>
{% endif %}
</div>
{% endif %}
</div>
{% if has_resources %}
{% if has_resources %}
<div aria-labelledby="tab-resources" hidden="" id="panel-resources" role="tabpanel" tabindex="0">
{% with object.resources.all as agenda_resources %}
{% if agenda_resources %}
<ul class="objects-list single-links">
{% for resource in agenda_resources %}
<li>
<a href="{% url 'chrono-manager-resource-view' pk=resource.pk %}">
{{ resource.label }}
<span class="identifier">[{% trans "identifier:" %} {{ resource.slug }}]</span>
</a>
<a rel="popup" class="delete" href="{% url 'chrono-manager-agenda-delete-resource' pk=object.pk resource_pk=resource.pk %}">{% trans "remove" %}</a>
</li>
{% endfor %}
</ul>
{% else %}
<div class="big-msg-info">
{% blocktrans %}
This agenda doesn't have any resource yet. Click on the "Add resource" button in
the top right of the page to add a first one.
{% endblocktrans %}
</div>
{% endif %}
{% if agenda_resources %}
<ul class="objects-list single-links">
{% for resource in agenda_resources %}
<li>
<a href="{% url 'chrono-manager-resource-view' pk=resource.pk %}">
{{ resource.label }}
<span class="identifier">[{% trans "identifier:" %} {{ resource.slug }}]</span>
</a>
<a rel="popup" class="delete" href="{% url 'chrono-manager-agenda-delete-resource' pk=object.pk resource_pk=resource.pk %}">{% trans "remove" %}</a>
</li>
{% endfor %}
</ul>
{% else %}
<div class="big-msg-info">
{% blocktrans %}
This agenda doesn't have any resource yet. Click on the "Add resource" button in
the top right of the page to add a first one.
{% endblocktrans %}
</div>
{% endif %}
{% endwith %}
</div>
{% endif %}
{% endif %}
<div aria-labelledby="tab-display-options" hidden="" id="panel-display-options" role="tabpanel" tabindex="0">
<ul>
<li>
{% trans "Booking display template:" %}
<pre>{{ agenda.get_booking_user_block_template }}</pre>
</li>
</ul>
<div class="panel--buttons">
<a rel="popup" class="button" href="{% url 'chrono-manager-agenda-display-settings' pk=object.pk %}">{% trans 'Configure' %}</a>
</div>
<div aria-labelledby="tab-display-options" hidden="" id="panel-display-options" role="tabpanel" tabindex="0">
<ul>
<li>
{% trans "Booking display template:" %}
<pre>{{ agenda.get_booking_user_block_template }}</pre>
</li>
</ul>
<div class="panel--buttons">
<a rel="popup" class="button" href="{% url 'chrono-manager-agenda-display-settings' pk=object.pk %}">{% trans 'Configure' %}</a>
</div>
</div>
{% endblock %}

View File

@ -2,12 +2,12 @@
{% load i18n %}
{% block appbar %}
<h2>{% trans 'Agendas' %}</h2>
<h2>{% trans 'Agendas' %}</h2>
{% endblock %}
{% block content %}
<div class="big-msg-sorry">
<p>{% trans 'This screen displays agendas you can access.' %}</p>
<p>{% trans 'Unfortunately, there is still no agenda configured this way.' %}</p>
</div>
<div class="big-msg-sorry">
<p>{% trans 'This screen displays agendas you can access.' %}</p>
<p>{% trans 'Unfortunately, there is still no agenda configured this way.' %}</p>
</div>
{% endblock %}

View File

@ -2,19 +2,19 @@
{% load i18n %}
{% block appbar %}
<h2>{% trans "Replace exceptions" %}</h2>
<h2>{% trans "Replace exceptions" %}</h2>
{% endblock %}
{% block content %}
<form method="post" enctype="multipart/form-data">
<p class="notice">{% trans "To replace existing exceptions, please upload a new file." %}</p>
{% csrf_token %}
{{ form.as_p }}
<p>
</p>
<div class="buttons">
<button>{% trans "Replace" %}</button>
<a class="cancel" href="{{ view.get_success_url }">{% trans 'Cancel' %}</a>
</div>
</form>
<form method="post" enctype="multipart/form-data">
<p class="notice">{% trans "To replace existing exceptions, please upload a new file." %}</p>
{% csrf_token %}
{{ form.as_p }}
<p>
</p>
<div class="buttons">
<button>{% trans "Replace" %}</button>
<a class="cancel" href="{{ view.get_success_url }">{% trans 'Cancel' %}</a>
</div>
</form>
{% endblock %}

View File

@ -2,57 +2,57 @@
{% load i18n %}
{% block breadcrumb %}
{{ block.super }}
<a>{{ day|date:"SHORT_DATE_FORMAT" }}</a>
{{ block.super }}
<a>{{ day|date:"SHORT_DATE_FORMAT" }}</a>
{% endblock %}
{% block appbar-title %}
<h2>
<a href="{{ view.get_previous_day_url }}"></a>
<span class="date-title">{{ view.date|date:"l j F Y" }}</span>
{% 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 %}
<a href="{{ view.get_next_day_url }}"></a>
</h2>
<h2>
<a href="{{ view.get_previous_day_url }}"></a>
<span class="date-title">{{ view.date|date:"l j F Y" }}</span>
{% 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 %}
<a href="{{ view.get_next_day_url }}"></a>
</h2>
{% endblock %}
{% block appbar-extras %}
<a href="{% url 'chrono-manager-resource-month-view' pk=resource.pk year=view.date|date:"Y" month=view.date|date:"n" %}">{% trans 'Month view' %}</a>
<a href="{% url 'chrono-manager-resource-month-view' pk=resource.pk year=view.date|date:"Y" month=view.date|date:"n" %}">{% trans 'Month view' %}</a>
{% endblock %}
{% block content %}
{% for period, resource_info in view.get_timetable_infos %}
{% for period, resource_info in view.get_timetable_infos %}
{% if forloop.first %}
<table class="agenda-table day-view hourspan-{{ hour_span }}">
<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>
<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>
</tbody>
</table>
{% endif %}
{% empty %}
<div class="closed-for-the-day">
<p>{% trans "No bookings this day." %}</p>
</div>
{% endfor %}
{% empty %}
<div class="closed-for-the-day">
<p>{% trans "No bookings this day." %}</p>
</div>
{% endfor %}
{% endblock %}

View File

@ -2,58 +2,58 @@
{% load i18n %}
{% block page-title-extra-label %}
- {{ resource.label }}
- {{ resource.label }}
{% endblock %}
{% block breadcrumb %}
{{ block.super }}
<a href="{% url 'chrono-manager-resource-view' pk=resource.pk %}">{{ resource.label }}</a>
{{ block.super }}
<a href="{% url 'chrono-manager-resource-view' pk=resource.pk %}">{{ resource.label }}</a>
{% endblock %}
{% block appbar %}
{% block appbar-title %}
<h2>{{ resource }}</h2>
{% endblock %}
<span class="actions">
{% block appbar-extras %}
{% if request.user.is_staff %}
<a rel="popup" href="{% url 'chrono-manager-resource-edit' pk=resource.pk %}">{% trans 'Edit' %}</a>
<a rel="popup" href="{% url 'chrono-manager-resource-delete' pk=resource.pk %}">{% trans 'Delete' %}</a>
{% endif %}
{% now "Y" as today_year %}
{% now "n" as today_month %}
{% now "j" as today_day %}
<a href="{% url 'chrono-manager-resource-month-view' pk=resource.pk year=today_year month=today_month %}">{% trans 'Month view' %}</a>
<a href="{% url 'chrono-manager-resource-day-view' pk=resource.pk year=today_year month=today_month day=today_day %}">{% trans 'Day view' %}</a>
{% endblock %}
</span>
{% block appbar-title %}
<h2>{{ resource }}</h2>
{% endblock %}
<span class="actions">
{% block appbar-extras %}
{% if request.user.is_staff %}
<a rel="popup" href="{% url 'chrono-manager-resource-edit' pk=resource.pk %}">{% trans 'Edit' %}</a>
<a rel="popup" href="{% url 'chrono-manager-resource-delete' pk=resource.pk %}">{% trans 'Delete' %}</a>
{% endif %}
{% now "Y" as today_year %}
{% now "n" as today_month %}
{% now "j" as today_day %}
<a href="{% url 'chrono-manager-resource-month-view' pk=resource.pk year=today_year month=today_month %}">{% trans 'Month view' %}</a>
<a href="{% url 'chrono-manager-resource-day-view' pk=resource.pk year=today_year month=today_month day=today_day %}">{% trans 'Day view' %}</a>
{% endblock %}
</span>
{% endblock %}
{% block content %}
<div class="section">
<h3>{% trans 'Used in meetings agendas' %}</h3>
<div>
{% with resource.agenda_set.all as agendas %}
{% if agendas %}
<ul class="objects-list single-links">
{% for agenda in agendas %}
<li>
<a href="{% url 'chrono-manager-agenda-settings' pk=agenda.pk %}">
{{ agenda.label }}
</a>
</li>
{% endfor %}
</ul>
{% else %}
<div class="big-msg-info">
{% blocktrans %}
This resource is not used yet.
{% endblocktrans %}
</div>
{% endif %}
{% endwith %}
</div>
</div>
<div class="section">
<h3>{% trans 'Used in meetings agendas' %}</h3>
<div>
{% with resource.agenda_set.all as agendas %}
{% if agendas %}
<ul class="objects-list single-links">
{% for agenda in agendas %}
<li>
<a href="{% url 'chrono-manager-agenda-settings' pk=agenda.pk %}">
{{ agenda.label }}
</a>
</li>
{% endfor %}
</ul>
{% else %}
<div class="big-msg-info">
{% blocktrans %}
This resource is not used yet.
{% endblocktrans %}
</div>
{% endif %}
{% endwith %}
</div>
</div>
{% endblock %}

View File

@ -2,21 +2,21 @@
{% load i18n %}
{% block appbar %}
{% if object.id %}
<h2>{% trans "Edit Resource" %}</h2>
{% else %}
<h2>{% trans "New Resource" %}</h2>
{% endif %}
{% if object.id %}
<h2>{% trans "Edit Resource" %}</h2>
{% else %}
<h2>{% trans "New Resource" %}</h2>
{% endif %}
{% endblock %}
{% block content %}
<form method="post" enctype="multipart/form-data">
{% csrf_token %}
{{ form.as_p }}
<div class="buttons">
<button class="submit-button">{% trans "Save" %}</button>
<a class="cancel" href="{% url 'chrono-manager-resource-list' %}">{% trans 'Cancel' %}</a>
</div>
</form>
<form method="post" enctype="multipart/form-data">
{% csrf_token %}
{{ form.as_p }}
<div class="buttons">
<button class="submit-button">{% trans "Save" %}</button>
<a class="cancel" href="{% url 'chrono-manager-resource-list' %}">{% trans 'Cancel' %}</a>
</div>
</form>
{% endblock %}

View File

@ -2,35 +2,35 @@
{% load i18n %}
{% block breadcrumb %}
{{ block.super }}
<a href="{% url 'chrono-manager-resource-list' %}">{% trans "Resources" %}</a>
{{ block.super }}
<a href="{% url 'chrono-manager-resource-list' %}">{% trans "Resources" %}</a>
{% endblock %}
{% block appbar %}
<h2>{% trans 'Resources' %}</h2>
<span class="actions">
<a rel="popup" href="{% url 'chrono-manager-resource-add' %}">{% trans 'New' %}</a>
</span>
<h2>{% trans 'Resources' %}</h2>
<span class="actions">
<a rel="popup" href="{% url 'chrono-manager-resource-add' %}">{% trans 'New' %}</a>
</span>
{% endblock %}
{% block content %}
{% if object_list %}
<div>
<ul class="objects-list single-links">
{% for object in object_list %}
<li>
<a href="{% url 'chrono-manager-resource-view' pk=object.pk %}">{{ object.label }} ({{ object.slug }})</a>
</li>
{% endfor %}
</ul>
</div>
{% else %}
<div class="big-msg-info">
{% blocktrans %}
This site doesn't have any resource yet. Click on the "New" button in the top
right of the page to add a first one.
{% endblocktrans %}
</div>
{% endif %}
{% if object_list %}
<div>
<ul class="objects-list single-links">
{% for object in object_list %}
<li>
<a href="{% url 'chrono-manager-resource-view' pk=object.pk %}">{{ object.label }} ({{ object.slug }})</a>
</li>
{% endfor %}
</ul>
</div>
{% else %}
<div class="big-msg-info">
{% blocktrans %}
This site doesn't have any resource yet. Click on the "New" button in the top
right of the page to add a first one.
{% endblocktrans %}
</div>
{% endif %}
{% endblock %}

View File

@ -4,67 +4,67 @@
{% block bodyargs %}class="monthview"{% endblock %}
{% block breadcrumb %}
{{ block.super }}
<a>{{ view.date|date:"F Y" }}</a>
{{ block.super }}
<a>{{ view.date|date:"F Y" }}</a>
{% endblock %}
{% block appbar-title %}
<h2>
<a href="{{ view.get_previous_month_url }}"></a>
<span class="date-title">{{ view.date|date:"F Y" }}</span>
{% with selected_month=view.date|date:"n" selected_year=view.date|date:"Y" %}
<div class="date-picker" style="display: none">
<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 %}
<a href="{{ view.get_next_month_url }}"></a>
</h2>
<h2>
<a href="{{ view.get_previous_month_url }}"></a>
<span class="date-title">{{ view.date|date:"F Y" }}</span>
{% with selected_month=view.date|date:"n" selected_year=view.date|date:"Y" %}
<div class="date-picker" style="display: none">
<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 %}
<a href="{{ view.get_next_month_url }}"></a>
</h2>
{% endblock %}
{% block appbar-extras %}
<a href="{% url 'chrono-manager-resource-day-view' pk=resource.pk year=view.date|date:"Y" month=view.date|date:"n" day=1 %}">{% trans 'Day view' %}</a>
<a href="{% url 'chrono-manager-resource-day-view' pk=resource.pk year=view.date|date:"Y" month=view.date|date:"n" day=1 %}">{% trans 'Day view' %}</a>
{% endblock %}
{% block content %}
{% for week_days in view.get_timetable_infos %}
{% for week_days in view.get_timetable_infos %}
{% if forloop.first %}
<table class="agenda-table month-view single-desk">
<table class="agenda-table month-view single-desk">
<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-resource-day-view' pk=resource.pk year=day.date|date:"Y" month=day.date|date:"m" day=day.date|date:"j" %}">{{ 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.booked_slots %}
<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-resource-day-view' pk=resource.pk year=day.date|date:"Y" month=day.date|date:"m" day=day.date|date:"j" %}">{{ 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.booked_slots %}
<div class="booking" style="height:{{ slot.css_height|stringformat:".1f" }}%;min-height:{{ slot.css_height|stringformat:".1f" }}%;top:{{ slot.css_top|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>
<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>
</div>
{% endfor %}
{% endif %}
</td>
{% endfor %}
</tr>
{% endfor %}
{% endif %}
</td>
{% endfor %}
</tr>
{% endfor %}
{% if forloop.last %}
</tbody>
</table>
</tbody>
</table>
{% endif %}
{% empty %}
<div class="closed-for-the-day">
<p>{% trans "No bookings this month." %}</p>
</div>
{% endfor %}
{% empty %}
<div class="closed-for-the-day">
<p>{% trans "No bookings this month." %}</p>
</div>
{% endfor %}
{% endblock %}

View File

@ -2,22 +2,22 @@
{% load i18n gadjo %}
{% block breadcrumb %}
{{ block.super }}
<a href="{% url 'chrono-manager-agenda-settings' agenda.pk %}">{% trans 'Settings' %}</a>
<a href="{% url 'chrono-manager-agenda-edit' agenda.pk %}">{{ title }}</a>
{{ block.super }}
<a href="{% url 'chrono-manager-agenda-settings' agenda.pk %}">{% trans 'Settings' %}</a>
<a href="{% url 'chrono-manager-agenda-edit' agenda.pk %}">{{ title }}</a>
{% endblock %}
{% block appbar %}
<h2>{% trans "Test reminder sending" %}</h2>
<h2>{% trans "Test reminder sending" %}</h2>
{% endblock %}
{% block content %}
<form method="post" enctype="multipart/form-data">
{% csrf_token %}
{{ form|with_template }}
<div class="buttons">
<button class="submit-button">{% trans "Send" %}</button>
<a class="cancel" href="{% url 'chrono-manager-agenda-settings' pk=agenda.id %}">{% trans 'Cancel' %}</a>
</div>
</form>
<form method="post" enctype="multipart/form-data">
{% csrf_token %}
{{ form|with_template }}
<div class="buttons">
<button class="submit-button">{% trans "Send" %}</button>
<a class="cancel" href="{% url 'chrono-manager-agenda-settings' pk=agenda.id %}">{% trans 'Cancel' %}</a>
</div>
</form>
{% endblock %}

View File

@ -2,34 +2,34 @@
{% load i18n %}
{% block content %}
{% if agenda.is_complete %}
{% for week, slots in slots_by_week.items %}
{% if forloop.first %}
<table class="agenda-table month-view single-desk">
<tbody>
{% endif %}
{% if agenda.is_complete %}
{% for week, slots in slots_by_week.items %}
{% if forloop.first %}
<table class="agenda-table month-view single-desk">
<tbody>
{% endif %}
<tr>
<th></th>
{% for slot in slots %}
<th class="weekday {% if slot.date == today %}today{% endif %}"><span>{{ slot.date|date:"l j" }}</span></th>
{% endfor %}
</tr>
<tr>
<th>{% trans "Week" %} {{ week }}</th>
{% for slot in slots %}
<td class="guardian {% if slot.guardian == agenda.first_guardian %}first-guardian{% else %}second-guardian{% endif %}">{{ slot }}</td>
{% endfor %}
</tr>
<tr>
<th></th>
{% for slot in slots %}
<th class="weekday {% if slot.date == today %}today{% endif %}"><span>{{ slot.date|date:"l j" }}</span></th>
{% endfor %}
</tr>
<tr>
<th>{% trans "Week" %} {{ week }}</th>
{% for slot in slots %}
<td class="guardian {% if slot.guardian == agenda.first_guardian %}first-guardian{% else %}second-guardian{% endif %}">{{ slot }}</td>
{% endfor %}
</tr>
{% if forloop.last %}
</tbody>
</table>
{% endif %}
{% endfor %}
{% else %}
<div class="warningnotice">
<p>{% trans "Configuration is not completed yet." %}</p>
</div>
{% endif %}
{% if forloop.last %}
</tbody>
</table>
{% endif %}
{% endfor %}
{% else %}
<div class="warningnotice">
<p>{% trans "Configuration is not completed yet." %}</p>
</div>
{% endif %}
{% endblock %}

View File

@ -2,116 +2,116 @@
{% load i18n %}
{% block breadcrumb %}
{{ block.super }}
<a href=".">{% trans "Settings" %}</a>
{{ block.super }}
<a href=".">{% trans "Settings" %}</a>
{% endblock %}
{% block appbar %}
<h2>{% trans "Settings" %}</h2>
<span class="actions">
{% if user.is_staff %}
<a class="extra-actions-menu-opener"></a>
{% endif %}
<a rel="popup" href="{% url 'chrono-manager-shared-custody-agenda-add-period' pk=object.id %}">{% trans 'Add custody period' %}</a>
{% if has_holidays %}
<a rel="popup" href="{% url 'chrono-manager-shared-custody-agenda-add-holiday-rule' pk=object.id %}">{% trans 'Add custody rule during holidays' %}</a>
{% endif %}
<a rel="popup" href="{% url 'chrono-manager-shared-custody-agenda-add-rule' pk=object.id %}">{% trans 'Add custody rule' %}</a>
{% if user.is_staff %}
<ul class="extra-actions-menu">
<li><a rel="popup" href="{% url 'chrono-manager-shared-custody-agenda-delete' pk=object.id %}">{% trans 'Delete' %}</a></li>
</ul>
{% endif %}
</span>
<h2>{% trans "Settings" %}</h2>
<span class="actions">
{% if user.is_staff %}
<a class="extra-actions-menu-opener"></a>
{% endif %}
<a rel="popup" href="{% url 'chrono-manager-shared-custody-agenda-add-period' pk=object.id %}">{% trans 'Add custody period' %}</a>
{% if has_holidays %}
<a rel="popup" href="{% url 'chrono-manager-shared-custody-agenda-add-holiday-rule' pk=object.id %}">{% trans 'Add custody rule during holidays' %}</a>
{% endif %}
<a rel="popup" href="{% url 'chrono-manager-shared-custody-agenda-add-rule' pk=object.id %}">{% trans 'Add custody rule' %}</a>
{% if user.is_staff %}
<ul class="extra-actions-menu">
<li><a rel="popup" href="{% url 'chrono-manager-shared-custody-agenda-delete' pk=object.id %}">{% trans 'Delete' %}</a></li>
</ul>
{% endif %}
</span>
{% endblock %}
{% block content %}
{% if not agenda.is_complete %}
<div class="warningnotice">
<p>{% trans "Custody rules are not complete." %}</p>
</div>
{% endif %}
{% if not agenda.is_complete %}
<div class="warningnotice">
<p>{% trans "Custody rules are not complete." %}</p>
</div>
{% endif %}
<div class="section agenda-settings">
<div class="pk-tabs">
<div class="pk-tabs--tab-list" role="tablist">
<button aria-controls="panel-rules" aria-selected="true" id="tab-rules" role="tab" tabindex="0">{% trans "Custody rules" %}</button>
{% if has_holidays %}
<button aria-controls="panel-holidays" aria-selected="false" id="tab-holidays" role="tab" tabindex="-1">{% trans "Custody rules during holidays" %}</button>
{% endif %}
<button aria-controls="panel-time-periods" aria-selected="false" id="tab-time-periods" role="tab" tabindex="-1">{% trans "Exceptional custody periods" %}</button>
<div class="section agenda-settings">
<div class="pk-tabs">
<div class="pk-tabs--tab-list" role="tablist">
<button aria-controls="panel-rules" aria-selected="true" id="tab-rules" role="tab" tabindex="0">{% trans "Custody rules" %}</button>
{% if has_holidays %}
<button aria-controls="panel-holidays" aria-selected="false" id="tab-holidays" role="tab" tabindex="-1">{% trans "Custody rules during holidays" %}</button>
{% endif %}
<button aria-controls="panel-time-periods" aria-selected="false" id="tab-time-periods" role="tab" tabindex="-1">{% trans "Exceptional custody periods" %}</button>
</div>
<div class="pk-tabs--container">
<div aria-labelledby="tab-rules" id="panel-rules" role="tabpanel" tabindex="0">
{% if agenda.rules.all %}
<ul class="objects-list single-links">
{% for rule in agenda.rules.all %}
<li><a rel="popup" href="{% url 'chrono-manager-shared-custody-agenda-edit-rule' pk=agenda.pk rule_pk=rule.pk %}">
<span class="rule-info">
{{ rule.guardian }}, {{ rule.label }}
</span>
</a>
<a rel="popup" class="delete" href="{% url 'chrono-manager-shared-custody-agenda-delete-rule' pk=agenda.pk rule_pk=rule.pk %}?next=settings">{% trans "remove" %}</a>
</li>
{% endfor %}
</ul>
{% else %}
<div class="big-msg-info">
{% blocktrans trimmed %}
This agenda doesn't have any custody rules yet.
{% endblocktrans %}
</div>
{% endif %}
</div>
{% if has_holidays %}
<div aria-labelledby="tab-holidays" hidden="" id="panel-holidays" role="tabpanel" tabindex="0">
{% if agenda.holiday_rules.all %}
<ul class="objects-list single-links">
{% for rule in agenda.holiday_rules.all %}
<li><a rel="popup" href="{% url 'chrono-manager-shared-custody-agenda-edit-holiday-rule' pk=agenda.pk rule_pk=rule.pk %}">
<span class="rule-info">
{{ rule.guardian }}, {{ rule.label }}
</span>
</a>
<a rel="popup" class="delete" href="{% url 'chrono-manager-shared-custody-agenda-delete-holiday-rule' pk=agenda.pk rule_pk=rule.pk %}?next=settings">{% trans "remove" %}</a>
</li>
{% endfor %}
</ul>
{% else %}
<div class="big-msg-info">
{% blocktrans trimmed %}
This agenda doesn't specify any custody rules during holidays. It means normal rules will be applied.
{% endblocktrans %}
</div>
{% endif %}
</div>
{% endif %}
<div aria-labelledby="tab-time-periods" hidden="" id="panel-time-periods" role="tabpanel" tabindex="0">
{% if exceptional_periods %}
<ul class="objects-list single-links">
{% for period in exceptional_periods %}
<li>
<a rel="popup" href="{% url 'chrono-manager-shared-custody-agenda-edit-period' pk=agenda.pk period_pk=period.pk %}">
{{ period }}
<a rel="popup" class="delete" href="{% url 'chrono-manager-shared-custody-agenda-delete-period' pk=agenda.pk period_pk=period.pk %}?next=settings">{% trans "remove" %}</a>
</a>
</li>
{% endfor %}
</ul>
{% else %}
<div class="big-msg-info">
{% blocktrans trimmed %}
This agenda doesn't have any custody period. They can be used to specify explicit moments when one of the guardian should have custody, regardless of global rules.
{% endblocktrans %}
</div>
{% endif %}
</div>
</div>
</div>
</div>
<div class="pk-tabs--container">
<div aria-labelledby="tab-rules" id="panel-rules" role="tabpanel" tabindex="0">
{% if agenda.rules.all %}
<ul class="objects-list single-links">
{% for rule in agenda.rules.all %}
<li><a rel="popup" href="{% url 'chrono-manager-shared-custody-agenda-edit-rule' pk=agenda.pk rule_pk=rule.pk %}">
<span class="rule-info">
{{ rule.guardian }}, {{ rule.label }}
</span>
</a>
<a rel="popup" class="delete" href="{% url 'chrono-manager-shared-custody-agenda-delete-rule' pk=agenda.pk rule_pk=rule.pk %}?next=settings">{% trans "remove" %}</a>
</li>
{% endfor %}
</ul>
{% else %}
<div class="big-msg-info">
{% blocktrans trimmed %}
This agenda doesn't have any custody rules yet.
{% endblocktrans %}
</div>
{% endif %}
</div>
{% if has_holidays %}
<div aria-labelledby="tab-holidays" hidden="" id="panel-holidays" role="tabpanel" tabindex="0">
{% if agenda.holiday_rules.all %}
<ul class="objects-list single-links">
{% for rule in agenda.holiday_rules.all %}
<li><a rel="popup" href="{% url 'chrono-manager-shared-custody-agenda-edit-holiday-rule' pk=agenda.pk rule_pk=rule.pk %}">
<span class="rule-info">
{{ rule.guardian }}, {{ rule.label }}
</span>
</a>
<a rel="popup" class="delete" href="{% url 'chrono-manager-shared-custody-agenda-delete-holiday-rule' pk=agenda.pk rule_pk=rule.pk %}?next=settings">{% trans "remove" %}</a>
</li>
{% endfor %}
</ul>
{% else %}
<div class="big-msg-info">
{% blocktrans trimmed %}
This agenda doesn't specify any custody rules during holidays. It means normal rules will be applied.
{% endblocktrans %}
</div>
{% endif %}
</div>
{% endif %}
<div aria-labelledby="tab-time-periods" hidden="" id="panel-time-periods" role="tabpanel" tabindex="0">
{% if exceptional_periods %}
<ul class="objects-list single-links">
{% for period in exceptional_periods %}
<li>
<a rel="popup" href="{% url 'chrono-manager-shared-custody-agenda-edit-period' pk=agenda.pk period_pk=period.pk %}">
{{ period }}
<a rel="popup" class="delete" href="{% url 'chrono-manager-shared-custody-agenda-delete-period' pk=agenda.pk period_pk=period.pk %}?next=settings">{% trans "remove" %}</a>
</a>
</li>
{% endfor %}
</ul>
{% else %}
<div class="big-msg-info">
{% blocktrans trimmed %}
This agenda doesn't have any custody period. They can be used to specify explicit moments when one of the guardian should have custody, regardless of global rules.
{% endblocktrans %}
</div>
{% endif %}
</div>
</div>
</div>
</div>
{% endblock %}

View File

@ -2,69 +2,69 @@
{% load i18n %}
{% block extrascripts %}
{{ block.super }}
{{ form.media }}
{{ block.super }}
{{ form.media }}
{% endblock %}
{% block breadcrumb %}
{{ block.super }}
{% if object.id %}
<a href="">{{object}}</a>
{% else %}
<a href="">{% trans "New time period exception" %}</a>
{% endif %}
{{ block.super }}
{% if object.id %}
<a href="">{{object}}</a>
{% else %}
<a href="">{% trans "New time period exception" %}</a>
{% endif %}
{% endblock %}
{% block appbar %}
{% if object.id %}
<h2>{% trans "Edit time period exception" %}</h2>
<span class="actions">
<a rel="popup" href="{% url 'chrono-manager-time-period-exception-delete' pk=object.id %}">{% trans 'Delete' %}</a>
</span>
{% else %}
<h2>{% trans "New time period exception" %}</h2>
{% endif %}
{% if object.id %}
<h2>{% trans "Edit time period exception" %}</h2>
<span class="actions">
<a rel="popup" href="{% url 'chrono-manager-time-period-exception-delete' pk=object.id %}">{% trans 'Delete' %}</a>
</span>
{% else %}
<h2>{% trans "New time period exception" %}</h2>
{% endif %}
{% endblock %}
{% block content %}
<form method="post" enctype="multipart/form-data">
{% csrf_token %}
{{ form.non_field_errors }}
{% for field in form.visible_fields %}
{{ field.errors }}
<p>{{ field.label_tag }} {{ field }}{% if field.name == 'start_datetime' %} <button type="button" id="allday">{% trans "All day" %}</button>{% endif%}</p>
{% endfor %}
{% for hidden in form.hidden_fields %}
{{ hidden }}
{% endfor %}
<div class="buttons">
<button class="submit-button">{% trans "Save" %}</button>
<a class="cancel" href="{{ view.get_success_url }}">{% trans 'Cancel' %}</a>
</div>
<form method="post" enctype="multipart/form-data">
{% csrf_token %}
{{ form.non_field_errors }}
{% for field in form.visible_fields %}
{{ field.errors }}
<p>{{ field.label_tag }} {{ field }}{% if field.name == 'start_datetime' %} <button type="button" id="allday">{% trans "All day" %}</button>{% endif%}</p>
{% endfor %}
{% for hidden in form.hidden_fields %}
{{ hidden }}
{% endfor %}
<div class="buttons">
<button class="submit-button">{% trans "Save" %}</button>
<a class="cancel" href="{{ view.get_success_url }}">{% trans 'Cancel' %}</a>
</div>
<script>
{% if not object.id %}
$('[name="start_datetime_0"]').on('change', function() {
var $end_datetime = $('[name="end_datetime_0"]');
if (! $end_datetime.val()) {
var value = $(this).val();
if (value && new Date(value).getFullYear() > 999) {
$end_datetime.val($(this).val());
}
}
});
{% endif %}
$('button#allday').on('click', function() {
var $start_datetime = $('[name="start_datetime_0"]');
if ($start_datetime.val()) {
var new_date = new Date($start_datetime.val());
new_date.setDate(new_date.getDate() + 1);
$('[name="start_datetime_1"]').val('00:00');
$('[name="end_datetime_0"]').val(new_date.toISOString().substring(0, 10));
$('[name="end_datetime_1"]').val('00:00');
}
});
</script>
</form>
<script>
{% if not object.id %}
$('[name="start_datetime_0"]').on('change', function() {
var $end_datetime = $('[name="end_datetime_0"]');
if (! $end_datetime.val()) {
var value = $(this).val();
if (value && new Date(value).getFullYear() > 999) {
$end_datetime.val($(this).val());
}
}
});
{% endif %}
$('button#allday').on('click', function() {
var $start_datetime = $('[name="start_datetime_0"]');
if ($start_datetime.val()) {
var new_date = new Date($start_datetime.val());
new_date.setDate(new_date.getDate() + 1);
$('[name="start_datetime_1"]').val('00:00');
$('[name="end_datetime_0"]').val(new_date.toISOString().substring(0, 10));
$('[name="end_datetime_1"]').val('00:00');
}
});
</script>
</form>
{% endblock %}

View File

@ -2,34 +2,34 @@
{% load i18n %}
{% block extrascripts %}
{{ block.super }}
{{ form.media }}
{{ block.super }}
{{ form.media }}
{% endblock %}
{% block breadcrumb %}
{{ block.super }}
<a href=".">{% trans "All exceptions" %}</a>
{{ block.super }}
<a href=".">{% trans "All exceptions" %}</a>
{% endblock %}
{% block appbar %}
<h2>{% trans "Exceptions" %}</h2>
<h2>{% trans "Exceptions" %}</h2>
{% endblock %}
{% block content %}
<div class="timeperiod">
<div class="timeperiod">
<ul class="objects-list single-links">
{% for exception in object_list %}
<li>
<a {% if user_can_manage and not exception.read_only %}href="{% url 'chrono-manager-time-period-exception-edit' pk=exception.id %}"{% endif %}>{{ exception }}</a>
{% if user_can_manage and not exception.from_settings and not exception.read_only %}<a rel="popup" class="delete" href="{% url 'chrono-manager-time-period-exception-delete' pk=exception.id %}{% if not page_obj %}?from_popup{% endif %}">{% trans "remove" %}</a>{% endif %}
</li>
{% endfor %}
</ul>
{% for exception in object_list %}
<li>
<a {% if user_can_manage and not exception.read_only %}href="{% url 'chrono-manager-time-period-exception-edit' pk=exception.id %}"{% endif %}>{{ exception }}</a>
{% if user_can_manage and not exception.from_settings and not exception.read_only %}<a rel="popup" class="delete" href="{% url 'chrono-manager-time-period-exception-delete' pk=exception.id %}{% if not page_obj %}?from_popup{% endif %}">{% trans "remove" %}</a>{% endif %}
</li>
{% endfor %}
</ul>
{% if not page_obj %}
<p><a href="{% url 'chrono-manager-time-period-exception-list' desk.pk %}">{% trans "Show more..." %}</a></p>
<p><a href="{% url 'chrono-manager-time-period-exception-list' desk.pk %}">{% trans "Show more..." %}</a></p>
{% endif %}
{% include "gadjo/pagination.html" %}
</div>
{% include "gadjo/pagination.html" %}
</div>
{% endblock %}

View File

@ -2,50 +2,50 @@
{% load i18n gadjo %}
{% block extrascripts %}
{{ block.super }}
{{ form.media }}
{{ block.super }}
{{ form.media }}
{% endblock %}
{% block breadcrumb %}
{{ block.super }}
{% if object.id %}
<a href="">{{object}}</a>
{% else %}
<a href="">{% trans "New Time Period" %}</a>
{% endif %}
{{ block.super }}
{% if object.id %}
<a href="">{{object}}</a>
{% else %}
<a href="">{% trans "New Time Period" %}</a>
{% endif %}
{% endblock %}
{% block appbar %}
{% if object.id %}
<h2>{% trans "Edit Time Period" %}</h2>
<span class="actions">
<a rel="popup" href="{% url 'chrono-manager-time-period-delete' pk=object.id %}">{% trans 'Delete' %}</a>
</span>
{% else %}
<h2>{% trans "New Time Period" %}</h2>
{% endif %}
{% if object.id %}
<h2>{% trans "Edit Time Period" %}</h2>
<span class="actions">
<a rel="popup" href="{% url 'chrono-manager-time-period-delete' pk=object.id %}">{% trans 'Delete' %}</a>
</span>
{% else %}
<h2>{% trans "New Time Period" %}</h2>
{% endif %}
{% endblock %}
{% block content %}
<form method="post" enctype="multipart/form-data">
{% csrf_token %}
{{ form|with_template }}
<div class="buttons">
<button class="submit-button">{% trans "Save" %}</button>
<a class="cancel" href="{% url 'chrono-manager-agenda-settings' pk=agenda.id %}">{% trans 'Cancel' %}</a>
</div>
<form method="post" enctype="multipart/form-data">
{% csrf_token %}
{{ form|with_template }}
<div class="buttons">
<button class="submit-button">{% trans "Save" %}</button>
<a class="cancel" href="{% url 'chrono-manager-agenda-settings' pk=agenda.id %}">{% trans 'Cancel' %}</a>
</div>
<script>
$('input[type=radio][name=repeat]').change(function() {
if(!this.checked)
<script>
$('input[type=radio][name=repeat]').change(function() {
if(!this.checked)
return;
if(this.value == 'every-week') {
$('div#weekday_indexes').parent().hide();
} else {
$('div#weekday_indexes').parent().show();
}
}).change();
</script>
</form>
if(this.value == 'every-week') {
$('div#weekday_indexes').parent().hide();
} else {
$('div#weekday_indexes').parent().show();
}
}).change();
</script>
</form>
{% endblock %}

View File

@ -2,50 +2,50 @@
{% load i18n %}
{% block page-title-extra-label %}
- {{ unavailability_calendar.label }}
- {{ unavailability_calendar.label }}
{% endblock %}
{% block breadcrumb %}
{{ block.super }}
<a href="{% url 'chrono-manager-unavailability-calendar-view' pk=unavailability_calendar.pk %}">{{ unavailability_calendar.label }}</a>
{{ block.super }}
<a href="{% url 'chrono-manager-unavailability-calendar-view' pk=unavailability_calendar.pk %}">{{ unavailability_calendar.label }}</a>
{% endblock %}
{% block appbar %}
{% block appbar-title %}
<h2>{{ unavailability_calendar }}</h2>
{% endblock %}
{% if user_can_manage %}
<span class="actions">
{% block appbar-extras %}
<a href="{% url 'chrono-manager-unavailability-calendar-settings' pk=unavailability_calendar.pk %}">{% trans 'Settings' %}</a>
{% endblock %}
</span>
{% endif %}
{% block appbar-title %}
<h2>{{ unavailability_calendar }}</h2>
{% endblock %}
{% if user_can_manage %}
<span class="actions">
{% block appbar-extras %}
<a href="{% url 'chrono-manager-unavailability-calendar-settings' pk=unavailability_calendar.pk %}">{% trans 'Settings' %}</a>
{% endblock %}
</span>
{% endif %}
{% endblock %}
{% block content %}
<div class="section">
<h3>{% trans 'Used in meetings agendas' %}</h3>
<div>
{% if agendas %}
<ul class="objects-list single-links">
{% for agenda in agendas %}
<li>
<a href="{% url 'chrono-manager-agenda-view' pk=agenda.pk %}">
{{ agenda.label }}
</a>
</li>
{% endfor %}
</ul>
{% else %}
<div class="big-msg-info">
{% blocktrans %}
This unavailability calendar is not used yet.
{% endblocktrans %}
</div>
{% endif %}
</div>
</div>
<div class="section">
<h3>{% trans 'Used in meetings agendas' %}</h3>
<div>
{% if agendas %}
<ul class="objects-list single-links">
{% for agenda in agendas %}
<li>
<a href="{% url 'chrono-manager-agenda-view' pk=agenda.pk %}">
{{ agenda.label }}
</a>
</li>
{% endfor %}
</ul>
{% else %}
<div class="big-msg-info">
{% blocktrans %}
This unavailability calendar is not used yet.
{% endblocktrans %}
</div>
{% endif %}
</div>
</div>
{% endblock %}

View File

@ -2,32 +2,32 @@
{% load i18n %}
{% block breadcrumb %}
{{ block.super }}
{% if object.pk %}
<a href="{% url 'chrono-manager-unavailability-calendar-view' object.pk %}">{{ object }}</a>
<a href="{% url 'chrono-manager-unavailability-calendar-settings' object.pk %}">{% trans 'Settings' %}</a>
<a href="{% url 'chrono-manager-unavailability-calendar-edit' object.pk %}">{% trans 'Edit Unavailability Calendar' %}</a>
{% else %}
<a href="{% url 'chrono-manager-unavailability-calendar-add' %}">{% trans 'New Unavailability Calendar' %}</a>
{% endif %}
{{ block.super }}
{% if object.pk %}
<a href="{% url 'chrono-manager-unavailability-calendar-view' object.pk %}">{{ object }}</a>
<a href="{% url 'chrono-manager-unavailability-calendar-settings' object.pk %}">{% trans 'Settings' %}</a>
<a href="{% url 'chrono-manager-unavailability-calendar-edit' object.pk %}">{% trans 'Edit Unavailability Calendar' %}</a>
{% else %}
<a href="{% url 'chrono-manager-unavailability-calendar-add' %}">{% trans 'New Unavailability Calendar' %}</a>
{% endif %}
{% endblock %}
{% block appbar %}
{% if object.id %}
<h2>{% trans "Edit Unavailability Calendar" %}</h2>
{% else %}
<h2>{% trans "New Unavailability Calendar" %}</h2>
{% endif %}
{% if object.id %}
<h2>{% trans "Edit Unavailability Calendar" %}</h2>
{% else %}
<h2>{% trans "New Unavailability Calendar" %}</h2>
{% endif %}
{% endblock %}
{% block content %}
<form method="post" enctype="multipart/form-data">
{% csrf_token %}
{{ form.as_p }}
<div class="buttons">
<button class="submit-button">{% trans "Save" %}</button>
<a class="cancel" href="{% url 'chrono-manager-unavailability-calendar-list' %}">{% trans 'Cancel' %}</a>
</div>
</form>
<form method="post" enctype="multipart/form-data">
{% csrf_token %}
{{ form.as_p }}
<div class="buttons">
<button class="submit-button">{% trans "Save" %}</button>
<a class="cancel" href="{% url 'chrono-manager-unavailability-calendar-list' %}">{% trans 'Cancel' %}</a>
</div>
</form>
{% endblock %}

View File

@ -2,37 +2,37 @@
{% load i18n %}
{% block breadcrumb %}
{{ block.super }}
<a href="{% url 'chrono-manager-unavailability-calendar-list' %}">{% trans "Unavailability Calendars" %}</a>
{{ block.super }}
<a href="{% url 'chrono-manager-unavailability-calendar-list' %}">{% trans "Unavailability Calendars" %}</a>
{% endblock %}
{% block appbar %}
<h2>{% trans 'Unavailability Calendars' %}</h2>
{% if user.is_staff %}
<span class="actions">
<a rel="popup" href="{% url 'chrono-manager-unavailability-calendar-add' %}">{% trans 'New' %}</a>
</span>
{% endif %}
<h2>{% trans 'Unavailability Calendars' %}</h2>
{% if user.is_staff %}
<span class="actions">
<a rel="popup" href="{% url 'chrono-manager-unavailability-calendar-add' %}">{% trans 'New' %}</a>
</span>
{% endif %}
{% endblock %}
{% block content %}
{% if object_list %}
<div>
<ul class="objects-list single-links">
{% for object in object_list %}
<li>
<a href="{% url 'chrono-manager-unavailability-calendar-view' pk=object.pk %}">{{ object.label }} ({{ object.slug }})</a>
</li>
{% endfor %}
</ul>
</div>
{% else %}
<div class="big-msg-info">
{% blocktrans %}
This site doesn't have any unavailability calendar yet. Click on the "New" button in the top
right of the page to add a first one.
{% endblocktrans %}
</div>
{% endif %}
{% if object_list %}
<div>
<ul class="objects-list single-links">
{% for object in object_list %}
<li>
<a href="{% url 'chrono-manager-unavailability-calendar-view' pk=object.pk %}">{{ object.label }} ({{ object.slug }})</a>
</li>
{% endfor %}
</ul>
</div>
{% else %}
<div class="big-msg-info">
{% blocktrans %}
This site doesn't have any unavailability calendar yet. Click on the "New" button in the top
right of the page to add a first one.
{% endblocktrans %}
</div>
{% endif %}
{% endblock %}

View File

@ -2,53 +2,53 @@
{% load i18n %}
{% block breadcrumb %}
{{ block.super }}
<a href="{% url 'chrono-manager-unavailability-calendar-settings' unavailability_calendar.pk %}">{% trans "Settings" %}</a>
{{ block.super }}
<a href="{% url 'chrono-manager-unavailability-calendar-settings' unavailability_calendar.pk %}">{% trans "Settings" %}</a>
{% endblock %}
{% block appbar %}
<h2>{% trans "Settings" %}
</h2>
<span class="actions">
<a class="extra-actions-menu-opener"></a>
{% block agenda-extra-management-actions %}
<a rel="popup" href="{% url 'chrono-manager-unavailability-calendar-import-unavailabilities' pk=unavailability_calendar.id %}">{% trans 'Manage unavailabilities from ICS' %}</a>
<a rel="popup" href="{% url 'chrono-manager-unavailability-calendar-add-unavailability' pk=unavailability_calendar.id %}">{% trans 'Add Unavailability' %}</a>
{% endblock %}
<ul class="extra-actions-menu">
<li><a rel="popup" href="{% url 'chrono-manager-unavailability-calendar-edit' pk=unavailability_calendar.id %}">{% trans 'Options' %}</a></li>
<li><a download href="{% url 'chrono-manager-unavailability-calendar-export' pk=unavailability_calendar.id %}">{% trans 'Export Configuration (JSON)' %}</a></li>
{% if user.is_staff %}
<li><a rel="popup" href="{% url 'chrono-manager-unavailability-calendar-delete' pk=unavailability_calendar.id %}">{% trans 'Delete' %}</a></li>
{% endif %}
</ul>
</span>
<h2>{% trans "Settings" %}
</h2>
<span class="actions">
<a class="extra-actions-menu-opener"></a>
{% block agenda-extra-management-actions %}
<a rel="popup" href="{% url 'chrono-manager-unavailability-calendar-import-unavailabilities' pk=unavailability_calendar.id %}">{% trans 'Manage unavailabilities from ICS' %}</a>
<a rel="popup" href="{% url 'chrono-manager-unavailability-calendar-add-unavailability' pk=unavailability_calendar.id %}">{% trans 'Add Unavailability' %}</a>
{% endblock %}
<ul class="extra-actions-menu">
<li><a rel="popup" href="{% url 'chrono-manager-unavailability-calendar-edit' pk=unavailability_calendar.id %}">{% trans 'Options' %}</a></li>
<li><a download href="{% url 'chrono-manager-unavailability-calendar-export' pk=unavailability_calendar.id %}">{% trans 'Export Configuration (JSON)' %}</a></li>
{% if user.is_staff %}
<li><a rel="popup" href="{% url 'chrono-manager-unavailability-calendar-delete' pk=unavailability_calendar.id %}">{% trans 'Delete' %}</a></li>
{% endif %}
</ul>
</span>
{% endblock %}
{% block content %}
<div class="section">
<h3>{% trans 'Unavailabilities' %}</h3>
<div>
{% block agenda-settings %}
{% if unavailability_calendar.timeperiodexception_set.count %}
<ul class="objects-list single-links">
{% for time_period_exception in unavailability_calendar.timeperiodexception_set.all %}
<li><a rel="popup" href="{% url 'chrono-manager-time-period-exception-edit' pk=time_period_exception.id %}">{{ time_period_exception }}</a>
<a rel="popup" class="delete" href="{% url 'chrono-manager-time-period-exception-delete' pk=time_period_exception.id %}">{% trans "remove" %}</a>
</li>
{% endfor %}
</ul>
{% else %}
<div class="big-msg-info">
{% blocktrans %}
There is no unavailabilities yet. Click on the "Add Unavailabilty" button in
the top right of the page to add a first one.
{% endblocktrans %}
</div>
{% endif %}
</div>
</div>
{% endblock %}
<div class="section">
<h3>{% trans 'Unavailabilities' %}</h3>
<div>
{% block agenda-settings %}
{% if unavailability_calendar.timeperiodexception_set.count %}
<ul class="objects-list single-links">
{% for time_period_exception in unavailability_calendar.timeperiodexception_set.all %}
<li><a rel="popup" href="{% url 'chrono-manager-time-period-exception-edit' pk=time_period_exception.id %}">{{ time_period_exception }}</a>
<a rel="popup" class="delete" href="{% url 'chrono-manager-time-period-exception-delete' pk=time_period_exception.id %}">{% trans "remove" %}</a>
</li>
{% endfor %}
</ul>
{% else %}
<div class="big-msg-info">
{% blocktrans %}
There is no unavailabilities yet. Click on the "Add Unavailabilty" button in
the top right of the page to add a first one.
{% endblocktrans %}
</div>
{% endif %}
</div>
</div>
{% endblock %}
{% endblock %}

View File

@ -7,80 +7,80 @@
{% endblock %}
{% block agenda-settings-extra-tab-buttons %}
<button aria-controls="panel-agendas" aria-selected="true" id="tab-agendas" role="tab" tabindex="0">{% trans "Included Agendas" %}</button>
{% if virtual_members %}
<button aria-controls="panel-agendas" aria-selected="true" id="tab-agendas" role="tab" tabindex="0">{% trans "Included Agendas" %}</button>
{% if virtual_members %}
<button aria-controls="panel-meeting-types" aria-selected="false" id="tab-meeting-types" role="tab" tabindex="-1">{% trans "Meeting Types" %}</button>
{% endif %}
<button aria-controls="panel-time-periods" aria-selected="false" id="tab-time-periods" role="tab" tabindex="-1">{% trans "Excluded Periods" %}</button>
{% endif %}
<button aria-controls="panel-time-periods" aria-selected="false" id="tab-time-periods" role="tab" tabindex="-1">{% trans "Excluded Periods" %}</button>
{% endblock %}
{% block agenda-settings-extra-tab-list %}
<div aria-labelledby="tab-agendas" id="panel-agendas" role="tabpanel" tabindex="0">
{% if virtual_members %}
<div aria-labelledby="tab-agendas" id="panel-agendas" role="tabpanel" tabindex="0">
{% if virtual_members %}
<ul class="objects-list single-links">
{% for virtual_member, can_be_managed in virtual_members %}
<li>
<a {% if can_be_managed %}href="{% url 'chrono-manager-agenda-settings' pk=virtual_member.real_agenda.id %}"{% endif %}>
{{virtual_member.real_agenda.label}}
</a>
<a rel="popup" class="delete" href="{% url 'chrono-manager-virtual-member-delete' pk=virtual_member.pk %}">{% trans "remove" %}</a>
</li>
<li>
<a {% if can_be_managed %}href="{% url 'chrono-manager-agenda-settings' pk=virtual_member.real_agenda.id %}"{% endif %}>
{{virtual_member.real_agenda.label}}
</a>
<a rel="popup" class="delete" href="{% url 'chrono-manager-virtual-member-delete' pk=virtual_member.pk %}">{% trans "remove" %}</a>
</li>
{% endfor %}
</ul>
{% else %}
{% else %}
<div class="big-msg-info">
{% blocktrans %}
This virtual agenda doesn't include any agenda yet. Click on the "Include Agenda" button in
the top right of the page to include a first one.
This virtual agenda doesn't include any agenda yet. Click on the "Include Agenda" button in
the top right of the page to include a first one.
{% endblocktrans %}
</div>
{% endif %}
</div>
{% endif %}
</div>
{% if virtual_members %}
{% if virtual_members %}
<div aria-labelledby="tab-meeting-types" hidden="" id="panel-meeting-types" role="tabpanel" tabindex="0">
{% if meeting_types %}
<ul class="objects-list single-links">
{% for meeting_type in meeting_types %}
<li>
<a rel="popup" href="">
{{meeting_type.label}}
<span class="duration">({{meeting_type.duration}} {% trans "minutes" %})</span>
<span class="identifier">[{% trans "identifier:" %} {{meeting_type.slug}}]</span>
</a>
</li>
{% endfor %}
</ul>
<ul class="objects-list single-links">
{% for meeting_type in meeting_types %}
<li>
<a rel="popup" href="">
{{meeting_type.label}}
<span class="duration">({{meeting_type.duration}} {% trans "minutes" %})</span>
<span class="identifier">[{% trans "identifier:" %} {{meeting_type.slug}}]</span>
</a>
</li>
{% endfor %}
</ul>
{% else %}
<div class="errornotice">
{% blocktrans %}
This virtual agenda doesn't have any meeting type.
It is probably because its included agendas have incompatible meeting types
and it makes this virtual agenda unusable.
{% endblocktrans %}
</div>
<div class="errornotice">
{% blocktrans %}
This virtual agenda doesn't have any meeting type.
It is probably because its included agendas have incompatible meeting types
and it makes this virtual agenda unusable.
{% endblocktrans %}
</div>
{% endif %}
</div>
{% endif %}
{% endif %}
<div aria-labelledby="tab-time-periods" hidden="" id="panel-time-periods" role="tabpanel" tabindex="0">
{% if agenda.excluded_timeperiods.count %}
<div aria-labelledby="tab-time-periods" hidden="" id="panel-time-periods" role="tabpanel" tabindex="0">
{% if agenda.excluded_timeperiods.count %}
<ul class="objects-list single-links">
{% for time_period in agenda.excluded_timeperiods.all %}
<li><a rel="popup" href="{% url 'chrono-manager-time-period-edit' pk=time_period.id %}">{{ time_period }}</a>
<a rel="popup" class="delete" href="{% url 'chrono-manager-time-period-delete' pk=time_period.id %}">{% trans "remove" %}</a>
</li>
<li><a rel="popup" href="{% url 'chrono-manager-time-period-edit' pk=time_period.id %}">{{ time_period }}</a>
<a rel="popup" class="delete" href="{% url 'chrono-manager-time-period-delete' pk=time_period.id %}">{% trans "remove" %}</a>
</li>
{% endfor %}
</ul>
{% else %}
{% else %}
<div class="big-msg-info">
{% blocktrans %}
This virtual agenda doesn't have any excluded period yet. Click on the "Add Excluded Period" button in
the top right of the page to include a first one.
This virtual agenda doesn't have any excluded period yet. Click on the "Add Excluded Period" button in
the top right of the page to include a first one.
{% endblocktrans %}
</div>
{% endif %}
</div>
{% endif %}
</div>
{% endblock %}

View File

@ -2,27 +2,27 @@
{% load i18n %}
{% block extrascripts %}
{{ block.super }}
{{ form.media }}
{{ block.super }}
{{ form.media }}
{% endblock %}
{% block breadcrumb %}
{{ block.super }}
<a href="">{% trans "Include Agenda" %}</a>
{{ block.super }}
<a href="">{% trans "Include Agenda" %}</a>
{% endblock %}
{% block appbar %}
<h2>{% trans "Include Agenda" %}</h2>
<h2>{% trans "Include Agenda" %}</h2>
{% endblock %}
{% block content %}
<form method="post" enctype="multipart/form-data">
{% csrf_token %}
{{ form.as_p }}
<div class="buttons">
<button class="submit-button">{% trans "Save" %}</button>
<a class="cancel" href="{% url 'chrono-manager-agenda-settings' pk=agenda.id %}">{% trans 'Cancel' %}</a>
</div>
</form>
<form method="post" enctype="multipart/form-data">
{% csrf_token %}
{{ form.as_p }}
<div class="buttons">
<button class="submit-button">{% trans "Save" %}</button>
<a class="cancel" href="{% url 'chrono-manager-agenda-settings' pk=agenda.id %}">{% trans 'Cancel' %}</a>
</div>
</form>
{% endblock %}

View File

@ -1,9 +1,9 @@
<span class="datetime">
{% with widget=widget.subwidgets.0 %}
<input type="date" name="{{ widget.name }}"{% if widget.value != None %} value="{{ widget.value }}"{% endif %}{% include "django/forms/widgets/attrs.html" %} />
{% endwith %}
{% with widget=widget.subwidgets.1 %}
{% with widget=widget.subwidgets.0 %}
<input type="date" name="{{ widget.name }}"{% if widget.value != None %} value="{{ widget.value }}"{% endif %}{% include "django/forms/widgets/attrs.html" %} />
{% endwith %}
{% with widget=widget.subwidgets.1 %}
<!-- {{ widget.value|pprint }} -->
<input type="time" name="{{ widget.name }}" pattern="[0-9]{2}:[0-9]{2}" step="300" {% if widget.value != None %} value="{{ widget.value }}"{% endif %}{% include "django/forms/widgets/attrs.html" %} />
{% endwith %}
{% endwith %}
</span>

View File

@ -1,10 +1,10 @@
{% spaceless %}
<span id="{{ widget.attrs.id }}" class="weekdays-buttons-group{% if widget.attrs.class %} {{ widget.attrs.class }}{% endif %}" role="group">
{% for group, options, index in widget.optgroups %}
{% for option in options %}
{% include "django/forms/widgets/input.html" with widget=option %}
<label{% if option.attrs.id %} for="{{ option.attrs.id }}"{% endif %}>{{ option.label }}</label>
{% endfor %}
{% endfor %}
</span>
<span id="{{ widget.attrs.id }}" class="weekdays-buttons-group{% if widget.attrs.class %} {{ widget.attrs.class }}{% endif %}" role="group">
{% for group, options, index in widget.optgroups %}
{% for option in options %}
{% include "django/forms/widgets/input.html" with widget=option %}
<label{% if option.attrs.id %} for="{{ option.attrs.id }}"{% endif %}>{{ option.label }}</label>
{% endfor %}
{% endfor %}
</span>
{% endspaceless %}

View File

@ -2,9 +2,9 @@
{% load i18n %}
{% block content %}
<form method="post">
{% csrf_token %}
{{ form.as_p }}
<input type="submit" value="{% trans 'Log in' %}" />
</form>
<form method="post">
{% csrf_token %}
{{ form.as_p }}
<input type="submit" value="{% trans 'Log in' %}" />
</form>
{% endblock %}