-{% with view.get_events as events %}
-{% if events %}
-
- {% for event in events %}
- {% include 'chrono/manager_agenda_event_fragment.html' with view_mode='settings_view' %}
- {% endfor %}
-
-{% else %}
-
- {% 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 %}
-
+ {% with view.get_events as events %}
+ {% if events %}
+
+ {% for event in events %}
+ {% include 'chrono/manager_agenda_event_fragment.html' with view_mode='settings_view' %}
+ {% endfor %}
+
+ {% else %}
+
+ {% 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 %}
+
+ {% endif %}
+ {% endwith %}
+
+
+ {% if has_recurring_events %}
+
+ {% if object.recurrence_exceptions_report.events.exists %}
+
+
{% trans "The following events exist despite exceptions because they have active bookings:" %}
+
+ {% for event in object.recurrence_exceptions_report.events.all %}
+
- {% blocktrans %}
- This agenda doesn't have any meeting type yet. Click on the "New Meeting Type" button in
- the top right of the page to add a first one.
- {% endblocktrans %}
-
-{% endif %}
-
-
+{% block agenda-settings-extra-tab-list %}
-{% if object.desk_simple_management %}
-
+ {% blocktrans %}
+ This agenda doesn't have any meeting type yet. Click on the "New Meeting Type" button in
+ the top right of the page to add a first one.
+ {% endblocktrans %}
+
+ {% blocktrans %}
+ This agenda doesn't have any desk yet. Click on the "New Desk" button in
+ the top right of the page to add a first one.
+ {% endblocktrans %}
+
+ {% endif %}
- {% else %}
-
- {% blocktrans %}
- This agenda doesn't have any desk yet. Click on the "New Desk" button in
- the top right of the page to add a first one.
- {% endblocktrans %}
-
- {% endif %}
-
-
-{% with object.resources.all as agenda_resources %}
-{% if has_resources %}
-
- {% blocktrans %}
- This agenda doesn't have any resource yet. Click on the "Add resource" button in
- the top right of the page to add a first one.
- {% endblocktrans %}
-
+ {% blocktrans %}
+ This agenda doesn't have any resource yet. Click on the "Add resource" button in
+ the top right of the page to add a first one.
+ {% endblocktrans %}
+
- {% blocktrans %}
- This virtual agenda doesn't include any agenda yet. Click on the "Include Agenda" button in
- the top right of the page to include a first one.
- {% endblocktrans %}
-
- {% blocktrans %}
- This virtual agenda doesn't have any meeting type.
- It is probably because its included agendas have incompatible meeting types
- and it makes this virtual agenda unusable.
- {% endblocktrans %}
-
-{% endif %}
-
-
-{% endif %}
-
-{% if agenda.excluded_timeperiods.count %}
-
-
{% trans 'Excluded Periods' %}
-
-
- {% for time_period in agenda.excluded_timeperiods.all %}
-
+ {% blocktrans %}
+ This virtual agenda doesn't include any agenda yet. Click on the "Include Agenda" button in
+ the top right of the page to include a first one.
+ {% endblocktrans %}
+
+ {% blocktrans %}
+ This virtual agenda doesn't have any meeting type.
+ It is probably because its included agendas have incompatible meeting types
+ and it makes this virtual agenda unusable.
+ {% endblocktrans %}
+
+ {% endif %}
+
+ {% endif %}
+
+
+ {% if agenda.excluded_timeperiods.count %}
+
+ {% for time_period in agenda.excluded_timeperiods.all %}
+
+ {% blocktrans %}
+ This virtual agenda doesn't have any excluded period yet. Click on the "Add Excluded Period" button in
+ the top right of the page to include a first one.
+ {% endblocktrans %}
+
+ {% endif %}
+
+
{% endblock %}
diff --git a/tests/manager/test_all.py b/tests/manager/test_all.py
index 69f2b9c2..5d1ee271 100644
--- a/tests/manager/test_all.py
+++ b/tests/manager/test_all.py
@@ -2134,11 +2134,11 @@ def test_virtual_agenda_settings_empty(app, admin_user):
assert 'Delete' in resp.text
assert 'Included Agendas' in resp.text
assert 'Add Excluded Period' in resp.text
+ assert 'Excluded Periods' in resp.text
+ assert "This virtual agenda doesn't have any excluded period yet" in resp.text
assert "This virtual agenda doesn't include any agenda yet" in resp.text
# No meeting types yet
assert 'Meeting Types' not in resp.text
- # No absence yet
- assert 'Excluded Periods' not in resp.text
def test_virtual_agenda_settings(app, admin_user):
diff --git a/tests/manager/test_exception.py b/tests/manager/test_exception.py
index 321a3e86..639aed65 100644
--- a/tests/manager/test_exception.py
+++ b/tests/manager/test_exception.py
@@ -94,7 +94,7 @@ def test_meetings_agenda_add_time_period_exception(app, admin_user):
hour=16
).strftime(dt_format)
# add an exception beyond 2 weeks and make sure it isn't listed
- resp = resp.click('Add a time period exception', index=1)
+ resp = resp.click('Add a time period exception', index=0)
future = tomorrow + datetime.timedelta(days=15)
resp.form['label'] = 'Exception 2'
resp.form['start_datetime_0'] = future.strftime('%Y-%m-%d')