{% 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 %}

{% trans "Options" %} - {{log.reps}} × {{log.weight}}

{% trans 'Delete' %} {% trans 'Delete' %} {% trans 'Edit' %} {% trans 'Edit' %}
{% 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 "Add log to day" %}

{% if current_workout %}

{% blocktrans %}Click to add weight logs to a training day in your current workout:{% endblocktrans %} {{current_workout}}

{% else %}

{% trans "No workouts found." %}

{% trans "Add one now." %} {% endif %}

{% 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" %}
{% endblock %}