Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

If there are more than 1 settings, don't output the repetitions

Roland Geider408d38f219c9
diff --git a/manager/templates/tags/render_day.html b/manager/templates/tags/render_day.html
index db574dea7..23f9446ae 100644
--- a/manager/templates/tags/render_day.html
+++ b/manager/templates/tags/render_day.html
@@ -86,7 +86,14 @@ $(document).ready(function() {
<li id="exercise-{{ exercise.id }}">
<a href="{% url exercises.views.exercise_view exercise.id %}">{{ exercise }}</a>:
- {{ set.sets }} ×
+ {% comment %}
+ If there are more than 1 settings, don't output the repetitions
+ e.g. "4 x 8 8 10 10" is shown only as "8 8 10 10", after all
+ those 4 sets are not done four times!
+ {% endcomment %}
+ {% if exercise|get_current_settings:set.id|length == 1 %}
+ {{ set.sets }} ×
+ {% endif %}
{% comment %}
get_current_settings only does a exercise.setting_set.filter(set_id=set_id)
@@ -94,7 +101,8 @@ $(document).ready(function() {
<span class="settings-list">
{% for setting in exercise|get_current_settings:set.id %}
- <span id="setting-{{setting.id}}">
+ <span id="setting-{{setting.id}}">
+
{% if setting.reps == 99 %}
∞