{% extends "base.html" %}
{% load url from future %}
{% load i18n %}
{% load staticfiles %}

{% block title %}{% trans "Your workouts" %}{% endblock %}


{% block content %}
{% if workouts %}
    <table id="workout-table">
    <thead>
    <tr>
        <th>{% trans "Description" %}</th>
        <th>{% trans "Date" %}</th>
    </tr>
    </thead>
    <tbody>
    {% for workout in workouts %}
    <tr>
        <td>
            <a href="{% url 'wger.manager.views.workout.view' workout.id %}">
                {{ workout }}
            </a>
        </td>
        <td>
            {{ workout.creation_date }}
        </td>
    </tr>
    {% endfor %}
    </tbody>
    </table>
{% else %}
    <p>
        <a href="{% url 'wger.manager.views.workout.add' %}" class="btn btn-block">
        {% trans "No workouts found." %} {% trans "Add one now." %}
        </a>
    </p>
{% endif %}


{% endblock %}


{% block sidebar %}
<h3>{% trans "Options" %}</h3>
<p>
    <a href="{% url 'wger.manager.views.workout.add' %}">
    <img src="{% static 'images/icons/new.svg' %}"
         width="32"
         height="32"
         alt="{% trans 'Add workout' %}"
         title="{% trans 'Add workout' %}">
    {% trans "Add workout" %}</a>
</p>
{% endblock %}
