{% assign display_info = 0 -%} {% assign display_info_next_week = 0 -%} {% assign projectTags = "" | split: ',' -%} {% for project in site.projects -%} {% assign projectTags = projectTags | push: project.tag -%} {% endfor -%} {% if tool.out_of_service -%} {% assign display_info = 1 -%} {% endif -%} {% capture nowunix %}{{'now' | date: '%s'}}{% endcapture %} {%- capture next_week %}{{'now' | date: '%s' | plus: 604800 }}{%- endcapture -%} {% for loan in site.loan -%} {% capture eventdate %}{{loan.eventdate | date: '%s'}}{% endcapture %} {% capture eventend %}{{loan.eventend | date: '%s'}}{% endcapture %} {% if loan.devices -%} {% if loan.devices contains tool.uid -%} {% if eventdate < nowunix -%} {% if nowunix < eventend -%} {%if loan.booking and loan.booking == true -%} {% for lo_pr in loan.projects -%} {% if projectTags contains lo_pr -%} {% assign display_info = 4 -%} {% endif -%} {% endfor -%} {% else -%} {% assign display_info = 2 -%} {% endif -%} {% endif -%} {% else -%} {% if eventdate < next_week -%} {%if loan.booking and loan.booking == true -%} {% for lo_pr in loan.projects -%} {% if projectTags contains lo_pr -%} {% assign display_info_next_week = 4 -%} {% endif -%} {% endfor -%} {% else -%} {% assign display_info_next_week = 2 -%} {% endif -%} {% endif -%} {% endif -%} {% endif -%} {% endif -%} {% if loan.sets -%} {% for set in tool.sets -%} {% if loan.sets contains set -%} {% if eventdate < nowunix -%} {% if nowunix < eventend -%} {%if loan.booking and loan.booking == true -%} {% for lo_pr in loan.projects -%} {% if projectTags contains lo_pr -%} {% assign display_info = 4 -%} {% endif -%} {% endfor -%} {% else -%} {% assign display_info = 2 -%} {% endif -%} {% endif -%} {% else -%} {% if eventdate < next_week -%} {%if loan.booking and loan.booking == true -%} {% for lo_pr in loan.projects -%} {% if projectTags contains lo_pr -%} {% assign display_info_next_week = 4 -%} {% endif -%} {% endfor -%} {% else -%} {% assign display_info_next_week = 2 -%} {% endif -%} {% endif -%} {% endif -%} {% endif -%} {% endfor -%} {% endif -%} {% endfor -%} {% for loan in site.events %} {% capture eventdate %}{{loan.eventdate | date: '%s'}}{% endcapture %} {% capture eventend %}{{loan.eventend | date: '%s'}}{% endcapture %} {% if loan.devices -%} {% if loan.devices contains tool.uid -%} {% if eventdate < nowunix -%} {% if nowunix < eventend -%} {%if loan.booking and loan.booking == true -%} {% for lo_pr in loan.projects -%} {% if projectTags contains lo_pr -%} {% assign display_info = 4 -%} {% endif -%} {% endfor -%} {% else -%} {% assign display_info = 3 -%} {% endif -%} {% endif -%} {% else -%} {% if eventdate < next_week -%} {%if loan.booking and loan.booking == true -%} {% for lo_pr in loan.projects -%} {% if projectTags contains lo_pr -%} {% assign display_info_next_week = 4 -%} {% endif -%} {% endfor -%} {% else -%} {% assign display_info_next_week = 3 -%} {% endif -%} {% endif -%} {% endif -%} {% endif -%} {% endif -%} {% if loan.sets -%} {% for set in tool.sets -%} {% if loan.sets contains set -%} {% if eventdate < nowunix -%} {% if nowunix < eventend -%} {%if loan.booking and loan.booking == true -%} {% for lo_pr in loan.projects -%} {% if projectTags contains lo_pr -%} {% assign display_info = 4 -%} {% endif -%} {% endfor -%} {% else -%} {% assign display_info = 3 -%} {% endif -%} {% endif -%} {% else -%} {% if eventdate < next_week -%} {%if loan.booking and loan.booking == true -%} {% for lo_pr in loan.projects -%} {% if projectTags contains lo_pr -%} {% assign display_info_next_week = 4 -%} {% endif -%} {% endfor -%} {% else -%} {% assign display_info_next_week = 3 -%} {% endif -%} {% endif -%} {% endif -%} {% endif -%} {% endfor -%} {% endif -%} {% endfor -%} {% if display_info == 1 -%}
Das Gerät ist aktuell außer Betrieb.
Das Gerät ist aktuell verliehen.
Das Gerät ist für eine derzeit laufende Veranstaltung reserviert.
Das Gerät ist derzeit für ein Projekt reserviert.
Das Gerät wird innerhalb der nächsten 7 Tage verliehen.
Das Gerät ist für eine Veranstaltung in den nächsten Tagen reserviert.
Das Gerät ist in den nächsten Tagen für ein Projekt reserviert.