~homeworkprod/byceps-bungalows

0d360f27e07d472cafae1e8352d45c151efd52b3 — Jochen Kupperschmidt 3 months ago b8a57bc
Do not attempt to list events if none occurred
1 files changed, 4 insertions(+), 2 deletions(-)

M byceps/blueprints/admin/bungalow/templates/admin/bungalow/offer_view.html
M byceps/blueprints/admin/bungalow/templates/admin/bungalow/offer_view.html => byceps/blueprints/admin/bungalow/templates/admin/bungalow/offer_view.html +4 -2
@@ 181,7 181,8 @@

  <h2>{{ _('Events') }} {{ render_extra_in_heading(log_entries|length) }}</h2>

  {%- call render_log_entries() %}
  {%- if log_entries %}
    {%- call render_log_entries() %}
      {%- for log_entry in log_entries|sort(attribute='occurred_at', reverse=True) %}
        {%- if log_entry.event_type == 'bungalow-occupied' %}
          {%- call render_log_entry('success', log_entry.occurred_at) %}


@@ 237,7 238,8 @@
          {%- endcall %}
        {%- endif %}
      {%- endfor %}
  {%- endcall %}
    {%- endcall %}
  {%- endif %}

{%- endblock %}