{% assign display_info = 0 -%} {% if component.out_of_service -%} {% assign display_info = 1 -%} {% endif -%} {% capture nowunix %}{{'now' | date: '%s'}}{% endcapture %} {%- capture next_week %}{{'now' | date: '%s' | plus: 604800 }}{%- endcapture -%} {% for maintenance in site.maintenance -%} {% capture eventdate %}{{maintenance.eventdate | date: '%s'}}{% endcapture %} {% capture eventend %}{{maintenance.eventend | date: '%s'}}{% endcapture %} {% if maintenance.components -%} {% if maintenance.components contains component.uid -%} {% if eventdate < nowunix -%} {% if nowunix < eventend -%} {% assign display_info = 2 -%} {% endif -%} {% endif -%} {% if eventdate < next_week -%} {% assign display_info = 3 -%} {% endif -%} {% endif -%} {% endif -%} {% endfor -%} {% if display_info == 1 -%}

Ist aktuell außer Betrieb.

{% endif -%} {% if display_info == 2 -%}

Laufende Wartung.

{% endif -%} {% if display_info == 3 -%}

Innerhalb der nächsten 7 Tage ist eine Wartung geplant.

{% endif -%}