{% extends "ui/panels/_base.html" %}
{% load helpers i18n %}

{% block panel_content %}
  <ul class="list-group list-group-flush" role="presentation">
    {% for qs in related_models %}
      <a class="list-group-item list-group-item-action d-flex justify-content-between">
        {{ qs.model|meta:"verbose_name_plural"|bettertitle }}
        {% with count=qs.count %}
          {% if count %}
            <span class="badge text-bg-primary rounded-pill">{{ count }}</span>
          {% else %}
            <span class="badge text-bg-light rounded-pill">&mdash;</span>
          {% endif %}
        {% endwith %}
      </a>
    {% empty %}
      <span class="list-group-item text-muted">{% trans "None" %}</span>
    {% endfor %}
  </ul>
{% endblock panel_content %}
