58 lines
2.6 KiB
HTML
58 lines
2.6 KiB
HTML
{% extends base_template %}
|
|
{% load i18n %}
|
|
|
|
{% block extrascripts %}
|
|
{{ block.super }}
|
|
{{ form.media }}
|
|
{% endblock %}
|
|
|
|
{% block breadcrumb %}
|
|
{{ block.super }}
|
|
<a href="">{% trans "Manage exception sources" %}</a>
|
|
{% endblock %}
|
|
|
|
{% block appbar %}
|
|
<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>
|
|
<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 %}
|
|
|
|
<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 %}
|