110 lines
3.8 KiB
HTML
110 lines
3.8 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">
|
|
<h3>{% trans "Custody rules" %}</h3>
|
|
<div>
|
|
{% 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>
|
|
</div>
|
|
|
|
{% if has_holidays %}
|
|
<div class="section">
|
|
<h3>{% trans "Custody rules during holidays" %}</h3>
|
|
<div>
|
|
{% 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>
|
|
</div>
|
|
{% endif %}
|
|
|
|
<div class="section">
|
|
<h3>{% trans "Exceptional custody periods" %}</h3>
|
|
<div>
|
|
{% 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>
|
|
{% endblock %}
|