{% extends "datebook/base.html" %} {% load i18n %} {% block datebook_content %}
{% for month_date, month_datebook in datebooks_map %}

{{ month_date|date:"F" }}

{% if month_datebook %}

{% with month_datebook.dayentry_set.count as entries_counter %} {% if entries_counter > 0 %} {% blocktrans count counter=entries_counter %}{{ counter }} day{% plural %}{{ counter }} days{% endblocktrans %} {% else %} {% trans "Empty" %} {% endif %} {% endwith %}

{% else %} {% if user == author or user.is_superuser or perms.datebook.add_datebook %}

{% trans "Create it" %}

{% else %}

{% trans "Empty" %}

{% endif %} {% endif %}
{% endfor %}
{% endblock %} {% block foot_more_js %}{{ block.super }}{% if user == author or user.is_superuser or perms.datebook.add_datebook %} {% for month_date, month_datebook in datebooks_map %}{% if not month_datebook %}

{% trans "Create a new datebook" %}

{% blocktrans with name=month_date|date:"F" year=month_date.year %}This will create a datebook for {{ name }} {{ year }}, confirm this.{% endblocktrans %}

{% trans "I confirm" %}

×
{% endif %}{% endfor %} {% endif %}{% endblock %}