Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Cache the administration snippets in the navigation bar

Roland Geideraa60e81057c2
diff --git a/wger/manager/templates/navigation.html b/wger/manager/templates/navigation.html
index b6e816fb8..91ff6d913 100644
--- a/wger/manager/templates/navigation.html
+++ b/wger/manager/templates/navigation.html
@@ -15,7 +15,7 @@
{# User tab #}
{# #}
<li {% if active_tab == 'user' %}class="active"{% endif %}><a href="{% url 'index' %}">{% trans "Dashboard" %}</a></li>
-
+
{# #}
{# Workout tab #}
@@ -30,7 +30,7 @@
<li><a href="{% url 'schedule-overview' %}" rel="nofollow">{% trans "Workouts schedules" %}</a></li>
</ul>
</li>
-
+
{# #}
{# Exercises tab #}
@@ -46,14 +46,13 @@
<li><a href="{% url 'exercise-add' %}">{% trans "Add new exercise" %}</a><li>
{% endif %}
- {% cache cache_timeout user-admin-exercises user.id %}
+ {% cache cache_timeout user-admin-exercises user.id language.id %}
{% if perms.exercises %}
<li class="divider"></li>
<li class="nav-header">{% trans "Administration" %}</li>
<li><a href="{% url 'exercise-pending' %}">{% trans "Exercises pending review" %}</a></li>
{% endif %}
{% endcache %}
-
</ul>
</li>
@@ -72,7 +71,7 @@
<li><a href="{% url 'weight-add' %}" rel="nofollow">{% trans "Add weight entry" %}</a></li>
</ul>
</li>
-
+
{# #}
{# Nutrition tab #}
@@ -85,7 +84,7 @@
<ul class="dropdown-menu">
<li><a href="{% url 'wger.nutrition.views.plan.overview' %}" rel="nofollow">{% trans "Nutrition plans" %}</a></li>
<li><a href="{% url 'ingredient-list' %}">{% trans "Ingredient overview" %}</a></li>
- {% cache cache_timeout user-admin-ingredients user.id %}
+ {% cache cache_timeout user-admin-ingredients user.id language.id %}
{% if perms.exercises %}
<li class="divider"></li>
<li class="nav-header">{% trans "Administration" %}</li>
@@ -115,11 +114,13 @@
<li><a href="{% url 'software:changelog' %}">{% trans "Changelog" %} </a></li>
<li><a href="https://github.com/rolandgeider/wger">{% trans "Github" %} </a></li>
<li><a href="https://www.transifex.com/projects/p/wger-workout-manager/">{% trans "Translate with Transifex" %} </a></li>
+ {% cache cache_timeout user-admin-software user.id language.id %}
{% if perms.exercises %}
<li class="divider"></li>
<li class="nav-header">{% trans "Administration" %}</li>
<li><a href="{% url 'config:language-overview' %}">{% trans "Languages" %} </a></li>
{% endif %}
+ {% endcache %}
</ul>
</li>
</ul>