chrono/chrono/manager/templates/chrono/manager_events_agenda_setti...

145 lines
7.0 KiB
HTML

{% extends "chrono/manager_agenda_settings.html" %}
{% load i18n %}
{% block agenda-extra-management-actions %}
<a rel="popup" href="{% url 'chrono-manager-agenda-import-events' pk=object.id %}">{% trans 'Import Events' %}</a>
<a rel="popup" href="{% url 'chrono-manager-agenda-add-event' pk=object.id %}">{% trans 'New Event' %}</a>
{% endblock %}
{% block agenda-extra-menu-actions %}
{% with lingo_url=object.get_lingo_url %}{% if lingo_url %}
<li><a href="{{ lingo_url }}">{% trans 'Pricing' context 'pricing' %}</a></li>
{% endif %}{% endwith %}
{% 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-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 "Management 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 %}
{% if events %}
<ul class="objects-list single-links events-list">
{% 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 trimmed %}
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>
{% 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>
{% 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>
<div class="panel--buttons">
<a rel="popup" class="button" href="{% url 'chrono-manager-desk-add-import-time-period-exceptions' pk=desk.pk %}">{% trans 'Configure' %}</a>
</div>
</div>
{% 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 %}
{% 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>
</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 %}
<li>{% trans "Filters:" %}
<ul>
{% for key in check_filters %}
<li>{{ key }}</li>
{% endfor %}
</ul>
</li>
{% 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>
<li>{% trans "Enable the check of bookings when event has not passed:" %} {{ agenda.enable_check_for_future_events|yesno }}</li>
<li>
{% trans "Extra user block template:" %}
<pre>{{ agenda.booking_extra_user_block_template }}</pre>
</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 %}
{% if forloop.first %}<ul>{% endif %}
<li>
{% blocktrans trimmed with display_value=notification_type.display_value label=notification_type.label %}
{{ label }}: {{ display_value }} will be notified.
{% endblocktrans %}
</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>
</div>
{% endblock %}