{% extends "base.html" %} {% load i18n %} {% load staticfiles %} {% load wger_extras %} {% block title %}{% trans "Workout log calendar" %}{% endblock %} {% block header %} {% endblock %} {% block content %} {{calendar|safe}} {% for date in logs %}

{{date}}

{% regroup logs|get_item:date by exercise as grouped_logs %} {# TODO: what if some of the entries don't belong to a workout? #} {% with tmp=grouped_logs|first %} {% with first_log=tmp.list|first %} {% with session=first_log.get_workout_session %}
{% if session %}

{% trans "Time" %}: {% if session.time_start %} {{session.time_start|time:"H:i"}} - {{session.time_end|time:"H:i"}} {% else %} -/- {% endif %}
{% trans "General impression" %}: {% trans session.get_impression_display %}
{% trans "Notes" %}: {{session.notes|default:'-/-'}}

{% endif %} {% endwith %} {% endwith %} {% endwith %}
{% endfor %} {% endblock %} {% block sidebar %}

{% trans 'Info' %}

{% blocktrans %}The coloured days in the calendar have weight logs, you can click on them to see the details.{% endblocktrans %}

{% trans 'Log' %}

{% trans 'Go to current month' %} {% trans "Go to current month" %}

{% trans 'Add new log' %} {% trans "Add new log" %}

{% for date in month_list %} {% ifchanged date.year %}

{{ date|date:"Y" }}

{% endifchanged %} {% if current_month = date.month and current_year = date.year %} {{date|date:"F"}}
{% else %} {{date|date:"F"}}
{% endif %} {% endfor %}
{% endblock %}