{% extends "base.html" %}
{% load i18n %}
{% load staticfiles %}

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


{% block content %}
{% if workouts %}
<table class="table">
    <thead>
    <tr>
        <th>{% trans "Description" %}</th>
        <th>{% trans "Date" %}</th>
    </tr>
    </thead>
    <tbody>
    {% for workout in workouts %}
    <tr>
        <td>
            <a href="{{ workout.get_absolute_url }}">{{ workout }}</a>

            {% if workout == current_workout %}
            <span class="label label-primary">{% trans "active" %}</span>
            {% endif %}
        </td>
        <td>
            {{ workout.creation_date }}
        </td>
    </tr>
    {% endfor %}
    </tbody>
</table>
{% else %}
    <p>
        <a href="{% url 'manager:workout:add' %}" class="btn btn-block btn-default">
        {% trans "No workouts found." %} {% trans "Add one now." %}
        </a>
    </p>
{% endif %}


{% endblock %}


{% block sidebar %}
<h4>{% trans "Options" %}</h4>
<p>
    <a href="{% url 'manager: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 %}
