Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Render workout schedule overview with list groups

Roland Geider91d73a24f714
diff --git a/wger/manager/templates/mobile/schedule/overview.html b/wger/manager/templates/mobile/schedule/overview.html
deleted file mode 100644
index 47f9448da..000000000
--- a/wger/manager/templates/mobile/schedule/overview.html
+++ /dev/null
@@ -1,58 +0,0 @@
-{% extends "base.html" %}
-{% load i18n %}
-{% load staticfiles %}
-
-{% 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 wger-list-group-item">
- <span class="glyphicon glyphicon-chevron-right pull-right"></span>
-
- {% if schedule.is_active %}
- <span class="label label-primary pull-right"><em>{% trans "active" %}</em></span>
- {% endif %}
- <h4 class="list-group-item-heading">{{ schedule.name }}</h4>
- <p class="list-group-item-text">{{ schedule.start_date }}</p>
- </a>
- {% empty %}
- <a href="{% url 'manager:schedule:add' %}" class="list-group-item">
- {% trans "No schedules found." %}<br>
- {% trans "Add one now." %}
- </a>
- {% endfor %}
-</div>
-{% endblock %}
-
-
-{% block sidebar %}
-<h4>{% trans "Your schedules" %}</h4>
-<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>
-
-<h4>{% trans "Add schedule" %}</h4>
-<p>
- <a href="{% url 'manager:schedule:add' %}"
- class="btn btn-default btn-block">
- <img src="{% static 'images/icons/new.svg' %}"
- width="32"
- height="32"
- alt="{% trans 'Add schedule' %}"
- title="{% trans 'Add schedule' %}">
- {% trans "Add schedule" %}</a>
-</p>
-{% endblock %}
diff --git a/wger/manager/templates/schedule/overview.html b/wger/manager/templates/schedule/overview.html
index cec16198d..99615a530 100644
--- a/wger/manager/templates/schedule/overview.html
+++ b/wger/manager/templates/schedule/overview.html
@@ -9,39 +9,26 @@
{% endblock %}
{% block content %}
-<table class="table">
- <thead>
- <tr>
- <th>{% trans "Description" %}</th>
- <th>{% trans "Date" %}</th>
- </tr>
- </thead>
- <tbody>
- {% for schedule in schedules %}
- <tr>
- <td>
- <a href="{% url 'manager:schedule:view' schedule.id %}">{{ schedule.name }}</a>
-
- {% if schedule.is_active %}
- &nbsp;<span class="label label-primary">{% trans "active" %}</span>
- {% endif %}
- </td>
- <td>
- {{ schedule.start_date }}
- </td>
- </tr>
- {% empty %}
- <tr>
- <td colspan="3">
- <a href="{% url 'manager:schedule:add' %}" class="wger-modal-dialog btn btn-block btn-default">
- {% trans "No schedules found." %} {% trans "Add one now." %}
+ <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>
- </td>
- </tr>
- {% endfor %}
- </tbody>
-</table>
-
+ {% 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 %}