{% extends "base_simple.html" %}

{% block settings %}
  {% load title %}
  {% title 'Top' %}
{% endblock %}


{% block body %}
  <div class="white-box">
    <form method=""get" action="">
      {{ form.as_p }}
      <button type="submit">Filtruj</button>
    </form>
    <hr>

    <table>
      <tr>
        <th>Książka</th>
        <th>Unikalne odsłony</th>
        <th>Odsłony</th>
      </tr>
      {% for v in visits %}
        <tr>
          <td>
            <a href="/katalog/lektura/{{ v.book__slug }}/">
              {{ v.book__slug }}
            </a>
          </td>
          <td>
            {{ v.unique_views }}
          </td>
          <td>
            {{ v.views }}
          </td>
        </tr>
      {% endfor %}
    </table>
  </div>
{% endblock %}
