{% extends 'generic/object.html' %}

{% block breadcrumbs %}
  {{ block.super }}
  {% if object.group %}
    {% for group in object.group.get_ancestors %}
      <li class="breadcrumb-item"><a href="{% url 'tenancy:tenant_list' %}?group_id={{ group.pk }}">{{ group }}</a></li>
    {% endfor %}
    <li class="breadcrumb-item"><a href="{% url 'tenancy:tenant_list' %}?group_id={{ object.group.pk }}">{{ object.group }}</a></li>
  {% endif %}
{% endblock %}
