Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Simplify output of day of the week in workout day renderer

Roland Geider2f2acb5b3171
diff --git a/wger/manager/templates/tags/render_day.html b/wger/manager/templates/tags/render_day.html
index 79a8ef148..3e01f84a4 100644
--- a/wger/manager/templates/tags/render_day.html
+++ b/wger/manager/templates/tags/render_day.html
@@ -1,11 +1,11 @@
-{% load i18n %}
+{% load i18n %}
{% load url from future %}
{% load staticfiles %}
{% load wger_extras %}
<script>
$(document).ready(function() {
-
+
// Call the setup function to allow the sets to be sortable again after loading this
// view via AJAX
setup_sortable();
@@ -20,13 +20,7 @@ $(document).ready(function() {
<thead>
<tr id="day-{{ day.id }}">
<th colspan="2">
- {% for day_of_week in day.day.select_related %}
- {% trans day_of_week.day_of_week %}
- {% if not forloop.last %}, {% endif %}
- {% if forloop.last %}–{% endif %}
- {% endfor %}
-
- {{ day.description }}
+ {{ day.day.select_related|join:", " }} – {{ day.description }}
<span class="editoptions" style="float: right;">
<a href="{% url 'wger.manager.views.day.delete' workout.id day.id %}"
@@ -103,12 +97,12 @@ $(document).ready(function() {
{% comment %}
get_current_settings only does a exercise.setting_set.filter(set_id=set_id)
{% endcomment %}
-
+
<span class="settings-list">
{% for setting in exercise|get_current_settings:set.id %}
<span id="setting-{{setting.id}}">
-
-
+
+
{% if setting.reps == 99 %}
∞
{%else%}
@@ -119,12 +113,12 @@ $(document).ready(function() {
{% empty %}
<a href="{% url 'set-edit' set.id %}"
class="modal-dialog btn btn-block">
- {% trans "This exercise has no repetitions." %}
+ {% trans "This exercise has no repetitions." %}
{% trans "Edit them now."%}
</a>
{% endfor %} <!--for setting in exercise-->
</span>
-
+
<div class="exercise-comments dimmed">
<ul>
{% for comment in exercise.exercisecomment_set.all %}
@@ -132,9 +126,9 @@ $(document).ready(function() {
{% endfor %}
</ul>
</div>
-
-
-
+
+
+
</div>
{% endfor %} <!--for exercise in set-->
</div>
@@ -146,7 +140,7 @@ $(document).ready(function() {
{% trans "No exercises selected for this day." %}
{% trans "Add one now." %}
</a>
-
+
{% endfor %} <!--for set in day-->
</td>
</tr>