{% if not nanofab_occupants %}

Nobody is in an access controlled
NanoFab area

{% else %} {% regroup nanofab_occupants by area as area_occupants %}

Area occupancy

Staff members are highlighted in green

{% for area in area_occupants %} {# Panel is used to make table borders rounded. #}
{% for o in area.list %} {% endfor %}
{{ area.grouper }} {% if area.list|length > 1 %}{{ area.list|length }} people{% endif %}
User Since Working on project...
{{ o.customer.first_name }} {{ o.customer.last_name }} {{ o.start|date:"l @ g:i A" }} {{ o.project }}
{% endfor %} {% endif %}
{% if usage_events %}

Tool usage

{% if usage_events|length > 1 %}{{ usage_events|length }} tools are in use{% endif %} 

{# Panel is used to make table borders rounded. #}
{% for u in usage_events %} {% endfor %}
Tool User In use since...
{{ u.tool }} {{ u.operator.first_name }} {{ u.operator.last_name }}{% if u.user != u.operator %} on behalf of {{ u.user.first_name }} {{ u.user.last_name }}{% endif %} {{ u.start|date:"l @ g:i A" }}
{% else %}

No interlocked NanoFab tools are in use

{% endif %}
{% if alerts or disabled_resources %}

Alerts and outages

{# For spacing #} 

{% for a in alerts %}
{% if a.title %}{{ a.title }}
{% endif %} {{ a.contents }}
{% endfor %} {% for r in disabled_resources %}
Resource outage: {{ r }}
{{ r.restriction_message }}
{% endfor %} {% endif %}