{# The quick look: what to type at a door, on the phone you are holding in front of it. One card per door with the code in force today and nothing else -- no dates, no history, no buttons. Maintaining the codes is admin/access_codes.html.twig, which is the table this page used to be. The card is sized for reading, not for fitting: the code is the largest thing on the screen, in near-black on white and in a tabular font so 1 and 7 cannot be confused. One column on a phone, more when there is room. #} {% extends 'layout.html.twig' %} {% block title %}Zugangscodes · E&P Platz{% endblock %} {% block content %} ← Übersicht

Zugangscodes

Türen, Aufzug etc.

{% if is_granted('ROLE_ADMIN') %} Codes verwalten {% endif %}
{% if codes is empty %}

Zurzeit gilt kein Code.

{% else %}
{% for code in codes %}
{{ code.label }} {% if code.visibility.isRestricted %} {{ code.visibility.label }} {% endif %}
{% if code.description %}

{{ code.description }}

{% endif %} {# mt-auto, so the code sits at the bottom of the card and the codes of a row line up whether or not a door has a description -- grid stretches the cards of a row to the same height, and this spends the difference above the code rather than below it. Same device as the dashboard tiles. tracking-widest so a long code stays readable as digits rather than as a number, and break-all so it never overflows a narrow screen. #}

{{ code.code }}

{% endfor %}
{% endif %} {% endblock %}