Self hosted FLOSS fitness/workout, nutrition and weight tracker
Fix some problems with rendering of images
Roland Geider2ccca1ab682f
diff --git a/wger/manager/templates/mobile/tags/render_day.html b/wger/manager/templates/mobile/tags/render_day.htmlindex c8bcd0ad9..57dd18898 100644--- a/wger/manager/templates/mobile/tags/render_day.html+++ b/wger/manager/templates/mobile/tags/render_day.html@@ -132,31 +132,31 @@{% else %}<a href="{% url 'manager:set:edit' set.obj.id %}"id="set-{{ set.obj.id }}"- class="list-group-item wger-list-group-item">+ class="list-group-item wger-modal-dialog">{% endif %}- {% if not compact %}- <span class="glyphicon glyphicon-cog pull-right"></span>- {% endif %}+ {% if not compact %}+ <span class="glyphicon glyphicon-cog pull-right"></span>+ {% endif %}{% for exercise in set.exercise_list %}<div id="exercise-{{ exercise.obj.id }}" class="ajax-manager:set:edit-target"><div class="media">- <div style="width:60px;height:60px;" class="media-left">- <a href="{{exercise.obj.get_absolute_url}}" >+ <div class="media-left">+{% if exercise.obj.main_image %}- <img class="media-object"+ <img class="img-responsive"src="{{ exercise.obj.main_image.image|thumbnail_url:'small' }}"alt="{{exercise.obj}}"- style="max-width:100%; max-height:100%;">+ style="width:64px; max-height:64px;">{% else %}- <img class="media-object"+ <img class="img-responsive"src="{% static 'images/icons/image-placeholder.svg' %}"alt="{% trans 'Placeholder image for exercise' %}"- style="opacity: 0.4;max-width:100%; max-height:100%;">+ style="opacity: 0.4; width:60px; max-height:60px;">{% endif %}- </a>+</div><div class="media-body" style="position: relative; top: 10px; left: 100px;"><h4 class="media-heading">@@ -167,9 +167,7 @@{% if not exercise.setting_list %}<p>{% trans "This exercise has no repetitions." %}<br>- <a href="{% url 'manager:set:edit' set.obj.id %}" class="wger-modal-dialog">{% trans "Edit them now."%}- </a></p>{% endif %}diff --git a/wger/manager/templates/tags/render_day.html b/wger/manager/templates/tags/render_day.htmlindex a6d07ceb4..50f279b48 100644--- a/wger/manager/templates/tags/render_day.html+++ b/wger/manager/templates/tags/render_day.html@@ -90,27 +90,33 @@ $(document).ready(function() {{% for exercise in set.exercise_list %}<div id="exercise-{{ exercise.obj.id }}" class="ajax-set-edit-target"><div class="media">- <div style="width:60px;height:60px;" class="media-left">+++ <div class="media-left"><a href="{{exercise.obj.get_absolute_url}}" >{% if exercise.obj.main_image %}- <img class="media-object img-responsive"+ <img class="img-responsive"src="{{ exercise.obj.main_image.image|thumbnail_url:'small' }}"alt="{{exercise.obj}}"- style="max-width:100%; max-height:100%;">+ style="width:64px; max-height:64px;">{% else %}- <img class="media-object img-responsive"+ <img class="img-responsive"src="{% static 'images/icons/image-placeholder.svg' %}"alt="{% trans 'Placeholder image for exercise' %}"- style="opacity: 0.4; max-width:100%; max-height:100%;">+ style="opacity: 0.4; width:60px; max-height:60px;">{% endif %}</a></div>- <div class="media-body" style="position: relative; top: 10px; left: 100px;">++++ <div class="media-body"><h4 class="media-heading">{{ exercise.obj.name }}</h4><p>{{exercise.setting_text}}</p>+ {% if not compact %}{% if not exercise.setting_list %}<p>{% trans "This exercise has no repetitions." %}<br>@@ -120,7 +126,6 @@ $(document).ready(function() {</p>{% endif %}- {% if not compact %}{% if exercise.comment_list %}<p class="text-muted">{% for comment in exercise.comment_list %}