{% 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 %} {% regroup logs|get_item:date by exercise as grouped_logs %} {# #} {# Popups to edit or delete the logs #} {# #} {% for i in grouped_logs %} {% for log in i.list %} {% endfor %} {% endfor %}

{{date}}

{# 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 %} {{ first_log.workout }} {% trans "Log overview" %} {% if session %} {% trans "Edit workout session" %} {% else %} {% trans "Add workout impression" %} {% endif %} {% 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:'-/-'}}

{% else %} {% endif %} {% endwith %} {% endwith %} {% endwith %} {# #} {# Logs #} {# #}
{% 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 %}