{% extends 'crud/change_list.html' %} {% load bootstrap3 %} {% load racks_tag %} {% block header_cells %} Switch Ports MAC Addresses Inventory Objects Location {% endblock %} {% block header_actions %}{% endblock %} {% block row_cells %} {{ object.label }} Total {{ object.ports.count}} Free {{ object.empty_ports|length }} {% if object.ports_to_servers %}Servers {{ object.ports_to_servers|length }}{% endif %} {% if object.ports_to_switches %}Switches {{ object.ports_to_switches|length }}{% endif %} {% if object.ports_to_other %}Other {{ object.ports_to_other|length }}{% endif %} {{ object.l2addresses }} {{ object.inventory_objects }} {% if object.locations|length == 0 %} N/A {% elif object.locations|length == 1 %} {{ object.locations.0|racks_tag }} {% else %} {% for location in object.locations %} {{ location|racks_tag:'error' }} {% endfor %} {% endif %} {% endblock %} {% block row_actions %}{% endblock %}