{% extends "admin/base_site.html" %}
{% load i18n palette %}

{% block content %}
{% with app=app_list|first %}
  <div class="container py-4">
  <h4> Showing all Data Tables in `{{ app.app_label|capfirst }}`. </h4>
    <div class="row dashboard-cards mx-0 gap-3 mb-4 p-0">
      {% for model in app.models %}
        <div class="col-md-4 spacing-1 mb-4 p-0">
          {% palette_ui file="palette/components/card.html" component="card" with title="{{ model.name }}" onclick="alert('Total Users')" %}
          
            {% palette_override card_body %}
              <h3> {{ model.objects.count }} </h3>
              <a href="{{ model.admin_url }}" class="btn btn-sm btn-primary w-100 btn-block mt-3">
                Manage {{ model.name }}
              </a>
            {% endpalette_override %}

          {% endpalette_ui %}
        </div>
      {% endfor %}
    </div>
  </div>
{% endwith %}

{% endblock %}
