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

{% block breadcrumbs %}
  {{ block.super }}
  {% for ancestor in object.get_ancestors %}
    <li class="breadcrumb-item"><a href="{% url 'tenancy:tenantgroup_list' %}?parent_id={{ ancestor.pk }}">{{ ancestor }}</a></li>
  {% endfor %}
{% endblock %}

{% block extra_controls %}
  {% if perms.tenancy.add_tenant %}
    <a href="{% url 'tenancy:tenant_add' %}?group={{ object.pk }}" class="btn btn-primary">
      <span class="mdi mdi-plus-thick" aria-hidden="true"></span> {% trans "Add Tenant" %}
    </a>
  {% endif %}
{% endblock extra_controls %}
