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

{% block panel_content %}
  <ul class="list-group list-group-flush" role="presentation">
    {% for object_type in object_types %}
      {% action_url object_type.content_type.model_class 'list' as list_url %}
      {% if list_url %}
        <a href="{{ list_url }}?tag={{ object.slug }}" class="list-group-item list-group-item-action d-flex justify-content-between">
          {{ object_type.content_type.name|bettertitle }}
          <span class="badge text-bg-primary rounded-pill">{{ object_type.item_count }}</span>
        </a>
      {% else %}
        <li class="list-group-item list-group-item-action d-flex justify-content-between">
          {{ object_type.content_type.name|bettertitle }}
          <span class="badge text-bg-primary rounded-pill">{{ object_type.item_count }}</span>
        </li>
      {% endif %}
    {% endfor %}
  </ul>
{% endblock panel_content %}
