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

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


{% block header %}
{% endblock %}

{% block content %}
    <div class="list-group">
        {% for schedule in schedules %}
            <a href="{% url 'manager:schedule:view' schedule.id %}" class="list-group-item">
                <span class="glyphicon glyphicon-chevron-right pull-right"></span>

                {% if schedule.is_active %}
                <span class="badge">
                    <em>{% trans "active" %}</em>
                </span>
                {% endif %}

                <h4 class="list-group-item-heading">{{ schedule }}</h4>
                <p class="list-group-item-text">{{ schedule.start_date }}</p>
            </a>
        {% empty %}
            <a href="{% url 'manager:schedule:add' %}" class="list-group-item wger-modal-dialog">
            {% trans "No schedules found." %}<br>{% trans "Add one now." %}
            </a>
        {% endfor %}
    </div>
{% endblock %}


{% block sidebar %}
<p>{% blocktrans %}Schedules are collections of workouts that you do in
succession.{% endblocktrans %}</p>

<p>{% blocktrans %}You can indicate how long you want to do each workout
before jumping to the next. It is also possible to create a loop, so you
always do the same workouts in succession, e.g. A > B > C > A > B > C and so on.{% endblocktrans %}</p>

<p>{% blocktrans %}The currently active schedule will remain active (and be
shown e.g. in your dashboard) till it reaches the last workout or till you
deactivate it, if it is a loop.{% endblocktrans %}</p>
{% endblock %}


{% block options %}
    <a href="{% url 'manager:schedule:add' %}" class="btn btn-success btn-sm wger-modal-dialog">
        {% trans "Add schedule" %}
    </a>
{% endblock %}
