{% comment %} Device-detail Active Contracts panel — Phase 20. Renders in the right_page slot of every Device detail page. Shows contracts covering this device via either direct ContractAssignment or ancestry (Tenant, Location, Rack, parent device). The "Source" column makes the difference visible — operators can tell at a glance whether a contract is direct on the device or inherited. Context variables (from template_content.py DeviceActiveContracts): - rows: list of {assignment, contract, source_label} - device: the Device being rendered Why a hand-rolled card rather than panel_table.html include: The "Source" column needs custom rendering (a label string built in Python). A hand-written card stays compact and styles the source as a secondary-color caption next to the contract name. {% endcomment %} {% if perms.nautobot_contract_models.view_contract %}