195 lines
9.8 KiB
HTML
195 lines
9.8 KiB
HTML
{% extends "chrono/manager_agenda_settings.html" %}
|
|
{% load i18n %}
|
|
|
|
{% block extrascripts %}
|
|
{{ block.super }}
|
|
{% if 'display_exceptions' in request.GET %}
|
|
<script>
|
|
$(function () {
|
|
$('a.timeperiod-exception-all.desk-{{ request.GET.display_exceptions }}').click();
|
|
});
|
|
</script>
|
|
{% endif %}
|
|
{% endblock %}
|
|
|
|
{% block agenda-extra-menu-actions %}
|
|
{% if object.desk_simple_management %}
|
|
<li><a href="{% url 'chrono-manager-agenda-desk-management-toggle-view' pk=object.pk %}">{% trans 'Switch to invididual desk management' %}</a></li>
|
|
{% elif agenda_is_available_for_simple_management %}
|
|
<li><a href="{% url 'chrono-manager-agenda-desk-management-toggle-view' pk=object.pk %}">{% trans 'Switch to global desk management' %}</a></li>
|
|
{% endif %}
|
|
{% endblock %}
|
|
|
|
{% block agenda-settings-extra-tab-buttons %}
|
|
<button aria-controls="panel-meeting-types"
|
|
aria-selected="{{meeting_types|yesno:"false,true"}}"
|
|
id="tab-meeting-types" role="tab"
|
|
tabindex="{{meeting_types|yesno:"-1,0"}}"
|
|
>{% trans "Meeting Types" %}</button>
|
|
{% if object.desk_simple_management %}
|
|
<button aria-controls="panel-desks" aria-selected="false" id="tab-desks" role="tab" tabindex="-1">{% trans "Desks" %}</button>
|
|
{% endif %}
|
|
<button aria-controls="panel-time-periods"
|
|
aria-selected="{{meeting_types|yesno:"true,false"}}"
|
|
id="tab-time-periods" role="tab"
|
|
tabindex="{{meeting_types|yesno:"0"}}"
|
|
>{% trans "Opening hours" %}</button>
|
|
{% if has_resources %}
|
|
<button aria-controls="panel-resources" aria-selected="false" id="tab-resources" role="tab" tabindex="-1">{% trans "Resources" %}</button>
|
|
{% endif %}
|
|
<button aria-controls="panel-display-options" aria-selected="false" id="tab-display-options" role="tab" tabindex="-1">{% trans "Display options" %}</button>
|
|
{% endblock %}
|
|
|
|
{% block agenda-settings-extra-tab-list %}
|
|
|
|
<div aria-labelledby="tab-meeting-types" id="panel-meeting-types" role="tabpanel" tabindex="0"
|
|
{% if meeting_types %}hidden{% endif %}>
|
|
{% if meeting_types %}
|
|
<ul class="objects-list single-links">
|
|
{% for meeting_type in meeting_types %}
|
|
<li>
|
|
<a rel="popup" href="{% url 'chrono-manager-meeting-type-edit' pk=meeting_type.id %}">
|
|
{{meeting_type.label}}
|
|
<span class="duration">({{meeting_type.duration}} {% trans "minutes" %})</span>
|
|
<span class="identifier">[{% trans "identifier:" %} {{meeting_type.slug}}]</span>
|
|
</a>
|
|
<a rel="popup" class="delete" href="{% url 'chrono-manager-meeting-type-delete' pk=meeting_type.id %}">{% trans "remove" %}</a>
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
{% else %}
|
|
<div class="big-msg-info">
|
|
{% blocktrans trimmed %}
|
|
This agenda doesn't have any meeting type yet. Click on the "New Meeting Type" button to add a first one.
|
|
{% endblocktrans %}
|
|
</div>
|
|
{% endif %}
|
|
<div class="panel--buttons">
|
|
<a rel="popup" class="button" href="{% url 'chrono-manager-agenda-add-meeting-type' pk=object.id %}">{% trans 'New Meeting Type' %}</a>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{% if object.desk_simple_management %}
|
|
<div aria-labelledby="tab-desks" hidden="" id="panel-desks" role="tabpanel" tabindex="0">
|
|
<ul class="objects-list single-links">
|
|
{% for desk in object.prefetched_desks %}
|
|
<li>
|
|
<a rel="popup" href="{% url 'chrono-manager-desk-edit' pk=desk.pk %}">{{ desk.label }}</a>
|
|
{% if object.prefetched_desks|length > 1 %}<a rel="popup" class="delete" href="{% url 'chrono-manager-desk-delete' pk=desk.pk %}">{% trans "remove" %}</a>{% endif %}
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
<div class="panel--buttons">
|
|
<a rel="popup" class="button" href="{% url 'chrono-manager-agenda-add-desk' pk=object.id %}">{% trans 'New Desk' %}</a>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
|
|
<div aria-labelledby="tab-time-periods" {% if not meeting_types %}hidden{% endif %} id="panel-time-periods" role="tabpanel" tabindex="0">
|
|
{% if object.prefetched_desks %}
|
|
<div class="timeperiods">
|
|
{% for desk in object.prefetched_desks %}
|
|
{% if not object.desk_simple_management or object.desk_simple_management and forloop.counter == 1 %}
|
|
<div class="timeperiod">
|
|
{% url 'chrono-manager-agenda-add-time-period' agenda_pk=object.pk pk=desk.pk as add_time_period_url %}
|
|
{% url 'chrono-manager-agenda-add-date-time-period' agenda_pk=object.pk pk=desk.pk as add_date_time_period_url %}
|
|
<ul class="objects-list single-links">
|
|
{% if not object.desk_simple_management and object.prefetched_desks|length > 1 %}
|
|
<li>
|
|
<a rel="popup" href="{% url 'chrono-manager-desk-edit' pk=desk.id %}">
|
|
<strong>{{ desk.label }}</strong>
|
|
</a>
|
|
<a rel="popup" class="delete" href="{% url 'chrono-manager-desk-delete' pk=desk.id %}">{% trans "remove" %}</a>
|
|
</li>
|
|
{% endif %}
|
|
{% for time_period in desk.timeperiod_set.all %}
|
|
<li>
|
|
<a rel="popup" href="{% url 'chrono-manager-time-period-edit' pk=time_period.id %}">{{ time_period }}</a>
|
|
<a rel="popup" class="delete" href="{% url 'chrono-manager-time-period-delete' pk=time_period.id %}">{% trans "remove" %}</a>
|
|
</li>
|
|
{% endfor %}
|
|
{% if desk.has_past_date_time_periods %}
|
|
<li><a class="timeperiod-list-all desk-{{ desk.pk }}" data-selector="div.timeperiod" href="{% url 'chrono-manager-date-time-period-list' pk=desk.id %}">({% trans 'see all unique periods' %})</a></li>
|
|
{% endif %}
|
|
<li><a class="add" rel="popup" href="{{add_time_period_url}}">{% trans 'Add repeating periods' %}</a></li>
|
|
<li><a class="add" rel="popup" href="{{add_date_time_period_url}}">{% trans 'Add a unique period' %}</a></li>
|
|
{% url 'chrono-manager-agenda-add-time-period-exception' agenda_pk=object.pk pk=desk.pk as add_time_period_exception_url %}
|
|
<li>
|
|
<a><strong>{% trans 'Exceptions' %}</strong></a>
|
|
<a class="link-action-icon settings" rel="popup" href="{% url 'chrono-manager-desk-add-import-time-period-exceptions' pk=desk.pk %}" title="{% trans 'Manage exception sources' %}">{% trans 'manage exceptions' %}</a>
|
|
</li>
|
|
{% for exception in desk.get_exceptions_within_two_weeks %}
|
|
<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 not desk.are_all_exceptions_displayed %}
|
|
<li><a class="timeperiod-list-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="{{add_time_period_exception_url}}">{% trans 'Add a time period exception' %}</a></li>
|
|
</ul>
|
|
</div>
|
|
{% endif %}
|
|
{% endfor %}
|
|
</div>
|
|
{% else %}
|
|
<div class="big-msg-info">
|
|
{% blocktrans trimmed %}
|
|
This agenda doesn't have any desk yet. Click on the "New Desk" button to add a first one.
|
|
{% endblocktrans %}
|
|
</div>
|
|
{% endif %}
|
|
{% if not object.desk_simple_management %}
|
|
<div class="panel--buttons">
|
|
<a rel="popup" class="button" href="{% url 'chrono-manager-agenda-add-desk' pk=object.id %}">{% trans 'New Desk' %}</a>
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
|
|
{% if has_resources %}
|
|
<div aria-labelledby="tab-resources" hidden="" id="panel-resources" role="tabpanel" tabindex="0">
|
|
{% with object.resources.all as agenda_resources %}
|
|
{% if agenda_resources %}
|
|
<ul class="objects-list single-links">
|
|
{% for resource in agenda_resources %}
|
|
<li>
|
|
<a href="{% url 'chrono-manager-resource-view' pk=resource.pk %}">
|
|
{{ resource.label }}
|
|
<span class="identifier">[{% trans "identifier:" %} {{ resource.slug }}]</span>
|
|
</a>
|
|
<a rel="popup" class="delete" href="{% url 'chrono-manager-agenda-delete-resource' pk=object.pk resource_pk=resource.pk %}">{% trans "remove" %}</a>
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
{% else %}
|
|
<div class="big-msg-info">
|
|
{% blocktrans trimmed %}
|
|
This agenda doesn't have any resource yet. Click on the "Add resource" button to add a first one.
|
|
{% endblocktrans %}
|
|
</div>
|
|
{% endif %}
|
|
{% endwith %}
|
|
<div class="panel--buttons">
|
|
<a rel="popup" class="button" href="{% url 'chrono-manager-agenda-add-resource' pk=object.pk %}">{% trans 'Add resource' %}</a>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
|
|
<div aria-labelledby="tab-display-options" hidden="" id="panel-display-options" role="tabpanel" tabindex="0">
|
|
<ul>
|
|
<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>
|
|
|
|
{% endblock %}
|