Self hosted FLOSS fitness/workout, nutrition and weight tracker
Add a simple toggler to show/hide the comments to the exercises
Roland Geiderf96185292db0
diff --git a/manager/templates/workout/view.html b/manager/templates/workout/view.htmlindex 67bd0c855..a4cc4ca28 100644--- a/manager/templates/workout/view.html+++ b/manager/templates/workout/view.html@@ -48,6 +48,12 @@ $(document).ready(function() {$("#ajax-info").load("/workout/api/edit-settting" + "?do=set_order&order=" + order);}});++ // Show/Hide the comments to the exercises+ $("#exercise-comments-toggle").click(function(e) {+ e.preventDefault();+ $(".exercise-comments").toggle();+ });});</script>{% endblock %}@@ -55,6 +61,13 @@ $(document).ready(function() {{% block content %}<h2> {% trans "Workout for" %} {{ workout.creation_date }}</h2>++<div>+<a id="exercise-comments-toggle" href="#">+ {% trans "Show/Hide exercise comments" %}+</a>+</div>+{% for day in workout.day_set.select_related %}<table class="bordertable workout-table"><thead>@@ -86,14 +99,6 @@ $(document).ready(function() {{% for exercise in set.exercises.select_related %}<li id="exercise-{{ exercise.id }}">{{ exercise }}: <!--(exercise-ID: {{ exercise.id }})-->--- <!-- Comments to the exercise -->- <!--- {% for comment in exercise.exercisecomment_set.all %}- {{comment}}- {% endfor %}- -->{{ set.sets }} x@@ -114,6 +119,19 @@ $(document).ready(function() {</div>{% endfor %} <!--for setting in exercise--></span>+++ <!-- Comments to the exercise -->++ <div class="exercise-comments dimmed">+ <ul>+ {% for comment in exercise.exercisecomment_set.all %}+ <li>{{comment}}</li>+ {% endfor %}+ </ul>+ </div>++<div class="editoptions"><a href="{% url manager.views.edit_setting workout.id set.id exercise.id None %}"title="{% trans "Edit" %}">[e]</a>