Self hosted FLOSS fitness/workout, nutrition and weight tracker
Don't show the edit options if the user doesn't have the permissions
Roland Geider95dc79b222ea
diff --git a/exercises/templates/overview.html b/exercises/templates/overview.htmlindex 91f2facd0..82f4456e3 100644--- a/exercises/templates/overview.html+++ b/exercises/templates/overview.html@@ -95,6 +95,7 @@ $(document).ready(function() {<a href="{% url exercises.views.exercise_view exercise.id %}">{{ exercise.name }}</a></td><td style="text-align:right;">+ {% if perms.exercises %}<div class="editoptions"><a href="{% url exercises.views.exercise_edit exercise.id %}"title="{% trans 'Edit' %}">[e]</a>@@ -103,6 +104,7 @@ $(document).ready(function() {title="{% trans 'Delete' %}"class="delete-exercise">[x]</a></div>+ {% endif %}</td></tr>{% empty %}@@ -129,12 +131,14 @@ $(document).ready(function() {Side bar-->{% block sidebar %}+{% if perms.exercises %}<h3>{% trans "Options" %}</h3><p><a href="{% url exercises.views.exercise_edit None %}">{% trans "Add new exercise" %}</a> |<a href="{% url exercises.views.exercise_category_edit None %}">{% trans "Add category" %}</a></p>+{% endif %}<h3>{% trans "Search" %}</h3>