Self hosted FLOSS fitness/workout, nutrition and weight tracker
Move images to exercise description
Roland Geiderc50ee54847a0
diff --git a/wger/exercises/templates/exercise/view.html b/wger/exercises/templates/exercise/view.htmlindex 21531736c..a7fb58086 100644--- a/wger/exercises/templates/exercise/view.html+++ b/wger/exercises/templates/exercise/view.html@@ -118,60 +118,19 @@{% endcache %}-{# Comments #}-{% with comments=exercise.exercisecomment_set.all %}-{% if comments or perms.exercises.change_exercisecomment %}-<div class="row" style="margin-top:1em;">- <div class="col-xs-3">- <strong>{% trans "Comments for this exercise" %}:</strong>- </div>- <div class="col-xs-9">- <ul>- {% for comment in comments %}- <li>- {{ comment }}- {% if perms.exercises.change_exercisecomment %}- <span class="editoptions">- <a href="{% url 'exercise:comment:delete' comment.id %}"- title="{% trans 'Delete' %}">- <img src="{% static 'images/icons/trash.svg' %}"- width="16"- height="16"- alt="{% trans 'Delete' %}">- </a>- <a href="{% url 'exercise:comment:edit' comment.id %}"- title="{% trans 'Edit' %}"- class="wger-modal-dialog">- <img src="{% static 'images/icons/edit.svg' %}"- width="16"- height="16"- alt="{% trans 'Edit' %}">- </a>- </span>- {% endif %}- </li>- {% endfor %}- </ul>- </div>-</div>-{% endif %}-{% endwith %}--{% if perms.exercises.change_exercisecomment %}-<p>- <a href="{% url 'exercise:comment:add' exercise.id %}" class="btn btn-success btn-xs wger-modal-dialog">- {% trans "Add new comment" %}- </a>-</p>-{% endif %}--{# Images #}{% with images=exercise.exerciseimage_set.accepted %}{% if images or perms.exercises.change_exerciseimage %}<div class="row" style="margin-top:1em;"><div class="col-xs-3">- <strong>{% trans "Images" %}:</strong>+ {% if perms.exercises %}+ <p>+ <a href="{% url 'exercise:image:add' exercise.id %}" class="btn btn-success btn-xs">+ {% trans "Add new image" %}+ </a>+ </p>+ {% endif %}+{# <strong>{% trans "Images" %}:</strong>#}</div><div class="col-xs-9"><div class="image-gallery">@@ -212,10 +171,6 @@</div></div></div>----{% endif %}{% endwith %}@@ -250,10 +205,49 @@{% endif %} {# end check permission #}-{% if perms.exercises %}+{# Comments #}+{% with comments=exercise.exercisecomment_set.all %}+{% if comments or perms.exercises.change_exercisecomment %}+<div class="row" style="margin-top:1em;">+ <div class="col-xs-3">+ <strong>{% trans "Comments for this exercise" %}:</strong>+ </div>+ <div class="col-xs-9">+ <ul>+ {% for comment in comments %}+ <li>+ {{ comment }}+ {% if perms.exercises.change_exercisecomment %}+ <span class="editoptions">+ <a href="{% url 'exercise:comment:delete' comment.id %}"+ title="{% trans 'Delete' %}">+ <img src="{% static 'images/icons/trash.svg' %}"+ width="16"+ height="16"+ alt="{% trans 'Delete' %}">+ </a>+ <a href="{% url 'exercise:comment:edit' comment.id %}"+ title="{% trans 'Edit' %}"+ class="wger-modal-dialog">+ <img src="{% static 'images/icons/edit.svg' %}"+ width="16"+ height="16"+ alt="{% trans 'Edit' %}">+ </a>+ </span>+ {% endif %}+ </li>+ {% endfor %}+ </ul>+ </div>+</div>+{% endif %}+{% endwith %}++{% if perms.exercises.change_exercisecomment %}<p>- <a href="{% url 'exercise:image:add' exercise.id %}" class="btn btn-success btn-xs">- {% trans "Add new image" %}+ <a href="{% url 'exercise:comment:add' exercise.id %}" class="btn btn-success btn-xs wger-modal-dialog">+ {% trans "Add new comment" %}</a></p>{% endif %}@@ -320,11 +314,6 @@</div></div></div>-----{% endif %}{% endwith %}{% endwith %} {# end musclelist #}