{% load i18n %} {% load static %} {% load rack_design %} {# ------------------------------------------------------------------------- #} {# Shared read-only projected rack elevation grid. #} {# #} {# Consumes the projection.project_rack contract via the context variables #} {# ``rack``, ``front``, ``rear``, ``non_racked`` and ``face``. Included by #} {# both design_elevation.html (the per-rack tab) and elevation_browser.html #} {# (the standalone Elevations page) so the grid markup lives in one place. #} {# #} {# GridStack assets + rack_design.css/js and the Front/Rear toggle buttons #} {# (#nbx-rd-show-front / #nbx-rd-show-rear) are provided by the including #} {# template, not here. #} {# ------------------------------------------------------------------------- #} {# Legend — also acts as a per-state filter (see legend_filter.js). #}
{# ---- Front face ---- #}

{% trans "Front" %}

    {% for u in rack.units %}
  • {% if u|rack_whole_unit %}{{ u|floatformat:"0" }}{% endif %}
  • {% endfor %}
{% for slot in front %}
{{ slot.label }}
{% empty %} {% endfor %}
{{ rack.name }} {% if rack.tenant %}· {{ rack.tenant }}{% endif %}
{% if not front %}

{% trans "No projected slots on this face." %}

{% endif %}
{# ---- Rear face ---- #}

{% trans "Rear" %}

    {% for u in rack.units %}
  • {% if u|rack_whole_unit %}{{ u|floatformat:"0" }}{% endif %}
  • {% endfor %}
{% for slot in rear %}
{{ slot.label }}
{% empty %} {% endfor %}
{{ rack.name }} {% if rack.tenant %}· {{ rack.tenant }}{% endif %}
{% if not rear %}

{% trans "No projected slots on this face." %}

{% endif %}
{# ---- Non-racked tray ---- #}

{% trans "Non-racked placements" %}

{% if non_racked %}
{% for slot in non_racked %}
{{ slot.label }}
{% endfor %}
{% else %}

{% trans "No non-racked placements." %}

{% endif %}