Self hosted FLOSS fitness/workout, nutrition and weight tracker
Show the exercise comments in a list, not a table
Roland Geider328f23ffcc11
diff --git a/exercises/templates/view.html b/exercises/templates/view.htmlindex ca6cfadf3..c3439d18c 100644--- a/exercises/templates/view.html+++ b/exercises/templates/view.html@@ -31,48 +31,36 @@ function custom_modal_init()<p>{{ exercise.description|safe }}</p>-<table>- <thead>- <tr>- <th colspan="2">{% trans "All comments for this exercise" %}</th>- </tr>- </thead>- <tbody>+{% if exercise.exercisecomment_set.all %}+<h3>{% trans "All comments for this exercise" %}</h3>++<ul>{% for comment in exercise.exercisecomment_set.all %}- <tr>- <td>- {{ comment }}- </td>- <td class="align-right">+ <li>+ {{ comment }}{% if perms.exercises %}- <div class="editoptions">- <a href="{% url exercises.views.exercisecomment_delete comment.id %}"- title="{% trans 'Delete' %}">- <img src="{% static 'images/icons/trash.svg' %}"- width="16"- height="16"- alt="{% trans 'Delete' %}">- </a>- <a href="{% url exercisecomment-edit comment.id %}"- title="{% trans 'Edit' %}"- class="modal-dialog">- <img src="{% static 'images/icons/edit.svg' %}"- width="16"- height="16"- alt="{% trans 'Edit' %}">- </a>- </div>- {% endif %}- </td>- </tr>-{% empty %}- <tr>- <td>{% trans "No comments for this exercise" %}</td>- </tr>+ <span class="editoptions">+ <a href="{% url exercises.views.exercisecomment_delete comment.id %}"+ title="{% trans 'Delete' %}">+ <img src="{% static 'images/icons/trash.svg' %}"+ width="16"+ height="16"+ alt="{% trans 'Delete' %}">+ </a>+ <a href="{% url exercisecomment-edit comment.id %}"+ title="{% trans 'Edit' %}"+ class="modal-dialog">+ <img src="{% static 'images/icons/edit.svg' %}"+ width="16"+ height="16"+ alt="{% trans 'Edit' %}">+ </a>+ </span>+ {% endif %}+ </li>{% endfor %}- </tbody>-</table>-+</ul>+{% endif %}{% if perms.exercises %}@@ -83,6 +71,7 @@ function custom_modal_init()</p>{% endif %}+{% endblock %}diff --git a/manager/static/css/yaml401/custom-yaml.css b/manager/static/css/yaml401/custom-yaml.cssindex 390a90707..2b9c6941b 100644--- a/manager/static/css/yaml401/custom-yaml.css+++ b/manager/static/css/yaml401/custom-yaml.css@@ -23,7 +23,7 @@along with Workout Manager. If not, see <http://www.gnu.org/licenses/>.*/-tr:hover .editoptions, tbody tr:hover td .editoptions+tr:hover .editoptions, tbody tr:hover td .editoptions, ul:hover .editoptions{visibility: visible;}