{% extends "datebook/base.html" %}
{% load i18n crispy_forms_tags %}

{% block datebook_content %}
{% if form %}
    <div class="clearfix">{% crispy form %}</div>
{% endif %}

<ul class="list-group">
    {% spaceless %}{% for year,year_datetime,months_counter in object_list %}
        <li{% if today.year == year_datetime.year %} class="current"{% endif %}>
            <a href="{% url 'datebook-author-year' author=author year=year %}">
                <p class="right text-right"><small>
                    {% blocktrans count counter=months_counter %}<strong>{{ counter }}</strong> opened month{% plural %}<strong>{{ counter }}</strong> opened months{% endblocktrans %}
                    </small></p>
                <h3>{{ year }}</h3>
            </a>
        </li>
    {% endfor %}{% endspaceless %}
</ul>{% endblock %}