{% extends "admin/change_list.html" %}
{% load i18n stats_tags %}

{% block content_title %}
  <h1>{% blocktrans %}Stats for: {{ module_name }}{% endblocktrans %}</h1>
{% endblock %}

{% block object-tools-items %}
  {{ block.super }}

  <li>
    <a href="{% get_stats_link back=True %}" class="button">
      <span class="changeform-navigation-button-icon left icon-arrow-left"></span>
      &nbsp;{% trans "Back to list" %}
    </a>
  </li>
{% endblock %}

{% block result_list %}

  <div class="dashboard-container columns_{{ stats_columns|length }}">
    {% for i in stats_columns %}
      <div class="dashboard-column-wrapper">
        <div class="dashboard-column{% if forloop.first %} first{% endif %}">
          {% for item in stats %}
            {% if stats_columns|length|add_to_list:i|add_to_list:forloop.counter0|is_in_column %}
              {% include "admin/includes/stats/wrapper.html" with item=item %}
            {% endif %}
          {% endfor %}
        </div>
      </div>
    {% endfor %}
  </div>

{% endblock %}

{% block pagination %}{% endblock %}
