Self hosted FLOSS fitness/workout, nutrition and weight tracker
Migrate calender and log to bootstrap 4
Roland Geider54557459bf80
diff --git a/wger/core/templates/tags/render_weight_log.html b/wger/core/templates/tags/render_weight_log.htmlindex 1acbadda7..7ba4b6e6a 100644--- a/wger/core/templates/tags/render_weight_log.html+++ b/wger/core/templates/tags/render_weight_log.html@@ -1,17 +1,20 @@{% load i18n static wger_extras %}-<div id="svg-{{div_uuid}}" style="text-align:center;"></div>+<div id="svg-{{div_uuid}}"></div><div style="overflow-x: auto;" class="weight-chart-table">-<table class="noborder" style="border: 0 none; width: 7em;">+<table class="noborder"><tr>{% for date, entry_list in log.items %}<td style="padding: 0em; border-top-width: 0px; vertical-align: top;">- <table class="narrow" style="width: 7em;">+ <table class="table-sm">+ <thead><tr><th colspan="3">{{date|date:"d.m.Y"}}</th></tr>+ </thead>+ <tbody><tr>- <td style="text-align:right;">{% trans "Reps" %}</td>+ <td class="text-right">{% trans "Reps" %}</td><td></td><td style="padding:0px;">{% trans_weight_unit 'kg' user %}@@ -19,11 +22,12 @@</tr>{% for entry in entry_list %}<tr>- <td style="text-align:right;">{{entry.reps}}</td>- <td style="padding:0px ; text-align: center;">×</td>+ <td class="text-right">{{entry.reps}}</td>+ <td class="text-center" style="padding:0px;">×</td><td style="padding:0px;">{{entry.weight}}</td></tr>{% endfor %}+ </tbody></table></td>{% endfor %}diff --git a/wger/manager/templates/calendar/month.html b/wger/manager/templates/calendar/month.htmlindex 3be6006b6..ac96817b8 100644--- a/wger/manager/templates/calendar/month.html+++ b/wger/manager/templates/calendar/month.html@@ -59,7 +59,7 @@ $(document).ready(function() {<div class="row row-cols-1 row-cols-md-3">{% for exercise, logs in value.logs.items %}<div class="col-sm-4 mb-4">- <div class="card h-100 ">+ <div class="card h-100"><div class="card-header"><a href="{{ exercise.get_absolute_url }}">{{ exercise }}diff --git a/wger/manager/templates/workout/log.html b/wger/manager/templates/workout/log.htmlindex fdf7cb6a8..97bc12ef5 100644--- a/wger/manager/templates/workout/log.html+++ b/wger/manager/templates/workout/log.html@@ -63,30 +63,23 @@{% with day_list=workout_log|get_item:day.obj.id %}{% with exercise_list=day_list|get_item:exercise.obj.id %}-- <div class="row" style="padding-top: 1em;">- <div class="col-xs-3">- <strong><a href="{{ exercise.obj.get_absolute_url }}">{{ exercise.obj.name }}</a></strong>- </div>- <div class="col-xs-9">- {% if exercise_list.log_by_date %}- {# TODO: perhaps move the draw_weight_chart function to render_weight_log #}- {% with list=exercise_list.log_by_date %}- {% render_weight_log list exercise_list.div_uuid owner_user %}- <script>- $(document).ready(function() {- wgerDrawWeightLogChart({{exercise_list.chart_data|safe}},- "{{exercise_list.div_uuid}}");- });- </script>- {% endwith %}--- {% else %}- <p><em>{% trans "No weight entries here." %}</em></p>- {% endif %}- </div>- </div>+ <h5 class="mt-4">{{ exercise.obj.name }}</h5>+ {% if exercise_list.log_by_date %}+ {# TODO: perhaps move the draw_weight_chart function to render_weight_log #}+ {% with list=exercise_list.log_by_date %}+ {% render_weight_log list exercise_list.div_uuid owner_user %}+ <script>+ $(document).ready(function() {+ wgerDrawWeightLogChart({{exercise_list.chart_data|safe}},+ "{{exercise_list.div_uuid}}");+ });+ </script>+ {% endwith %}+++ {% else %}+ <p><em>{% trans "No weight entries here." %}</em></p>+ {% endif %}{% endwith %}{% endwith %}