118 lines
5.2 KiB
HTML
118 lines
5.2 KiB
HTML
{% extends "chrono/manager_agenda_view.html" %}
|
|
{% load i18n %}
|
|
|
|
{% block breadcrumb %}
|
|
{{ 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>
|
|
{% endblock %}
|
|
|
|
{% block content %}
|
|
|
|
{% 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>
|
|
<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 %}
|