Self hosted FLOSS fitness/workout, nutrition and weight tracker
Add a scrollbar to div around tables, hide border
Roland Geiderfdfb8192c0e7
diff --git a/manager/models.py b/manager/models.pyindex f1f4dc4d7..95949b80c 100644--- a/manager/models.py+++ b/manager/models.py@@ -175,7 +175,7 @@ class WorkoutLog(models.Model):# Metaclass to set some other propertiesclass Meta:- ordering = ["date"]+ ordering = ["date", "reps"]def __unicode__(self):diff --git a/manager/templates/workout/log.html b/manager/templates/workout/log.htmlindex b37805ba8..75e2b47f4 100644--- a/manager/templates/workout/log.html+++ b/manager/templates/workout/log.html@@ -19,21 +19,24 @@</p>{% endif %}+{% regroup workout.workoutlog_set.all by date as workout_log %}++{% for day in workout.day_set.select_related %}<div id="div-day-{{ day.id }}"><h3>{{ day.description }}</h3>{% for set in day.set_set.select_related %}{% for exercise in set.exercises.select_related %}<h5>{{ exercise.name }}</h5>--- {% regroup workout.workoutlog_set.all by date as workout_log %}+<!-- Nested tables, ugh! -->- <table>+ <div style="overflow-x: auto;">+ <table class="noborder" style="border: 0 none;"><tr>{% for day in workout_log %}- <td>- <table class="narrow">++ <td style="padding: 0em; border-top-width: 0px;">+ <table class="narrow" style="width: 8em;"><tr><th colspan="2">{{day.grouper|date:"d.m.Y" }}</th></tr>@@ -50,6 +53,7 @@{% endfor %}</tr></table>+ </div>{% endfor %}{% endfor %}</div>