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

107 lines
3.8 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-settings %}
<div class="section">
<h3>{% trans "Events" %}</h3>
<div>
{% 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>
</div>
{% if has_absence_reasons %}
<div class="section">
<h3>{% trans "Absence reasons" %}
<a rel="popup" class="button" href="{% url 'chrono-manager-agenda-absence-reasons' pk=object.id %}">{% trans 'Configure' %}</a>
</h3>
<div>
{% if agenda.absence_reasons_group %}
<p>{% trans "Absence reasons group:" %} {{ agenda.absence_reasons_group }}</p>
<ul>
{% for reason in agenda.absence_reasons_group.absence_reasons.all %}
<li>{{ reason }}</li>
{% endfor %}
</ul>
{% else %}
<p>{% trans "No absence reasons configured for this agenda." %}</p>
{% endif %}
</div>
</div>
{% endif %}
<div class="section">
<h3>{% trans "Notifications" %}
<a rel="popup" class="button" href="{% url 'chrono-manager-agenda-notifications-settings' pk=object.id %}">{% trans 'Configure' %}</a>
</h3>
<div>
{% 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>
</div>
{% if has_recurring_events %}
<div class="section">
<h3>{% trans "Recurrence exceptions" %}
<a rel="popup" class="button" href="{% url 'chrono-manager-desk-add-import-time-period-exceptions' pk=desk.pk %}">{% trans 'Configure' %}</a>
</h3>
<div>
{% 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 }}
{% 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 %}
{% 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>
</div>
{% endif %}
{% endblock %}