{% load i18n %} {% load static %} {% load rack_design %} {# ------------------------------------------------------------------------- #} {# Shared per-rack block: one rack rendered with BOTH its Front and Rear #} {# faces side by side, full-depth opposite-face hatch and the hover-card #} {# data-* attributes. Used by BOTH the interactive editor #} {# (design_editor.html, editable=True) and the read-only projected elevation #} {# (design_elevation.html, editable=False) so the two can never drift apart. #} {# #} {# Context: #} {# b the per-rack bundle from views._project_rack_bundle: #} {# {rack, front, rear, non_racked, widgets, rack_meta, hidden?} #} {# editable True -> editor affordances (drag grids, per-tile × remove, #} {# embedded widget JSON payload for editor.js). #} {# False -> static, read-only (locked tiles, no remove buttons, #} {# no JSON payload). View-only Front/Rear toggles + the #} {# hover card still work. #} {# #} {# Widget indices (editor only): the page builds `widgets` in the order #} {# (*front, *rear, *non_racked); each tile is stamped with its GLOBAL index #} {# via gs-id/data-widget-index so editor.js can pair JSON to DOM. #} {# ------------------------------------------------------------------------- #} {% with rack=b.rack front=b.front rear=b.rear non_racked=b.non_racked %} {% with front_len=front|length rear_len=rear|length %} {% with rid=rack.pk|stringformat:"s" %}
{# /.nbx-rd-rack-block #} {% endwith %}{% endwith %}{% endwith %}