Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Move site administration options to user dropdown

Roland Geider444277424d15
diff --git a/wger/core/templates/mobile/navigation.html b/wger/core/templates/mobile/navigation.html
index 1e79c4fe4..f8df4239e 100644
--- a/wger/core/templates/mobile/navigation.html
+++ b/wger/core/templates/mobile/navigation.html
@@ -140,22 +140,6 @@
<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>
- {% if perms.exercises or perms.core.manage_gyms or perms.core.manage_gym or perms.core.gym_trainer %}
- <li class="divider"></li>
- <li class="nav-header">{% trans "Administration" %}</li>
- <li><a href="{% url 'config:language-overview' %}">{% trans "Languages" %} </a></li>
- <li><a href="{% url 'core:license-list' %}">{% trans "Licenses" %} </a></li>
- {% if perms.core.manage_gyms %}
- <li><a href="{% url 'core:gym-list' %}">{% trans "Gyms" %} </a></li>
- {% endif %}
-
- {# it's not possible to group expressions '(a or b) and c' #}
- {% if perms.core.gym_trainer or perms.core.manage_gym %}
- {% if user.userprofile.gym %}
- <li><a href="{% url 'core:gym-user-list' user.userprofile.gym.pk %}">{{user.userprofile.gym}}</a></li>
- {% endif %}
- {% endif %}
- {% endif %}
</ul>
</li>
@@ -215,6 +199,26 @@
{% trans "Logout" %}
</a>
</li>
+
+ {# #}
+ {# Adminstration #}
+ {# #}
+ {% if perms.exercises or perms.core.manage_gyms or perms.core.manage_gym or perms.core.gym_trainer %}
+ <li class="divider"></li>
+ <li class="nav-header">{% trans "Administration" %}</li>
+ <li><a href="{% url 'config:language-overview' %}">{% trans "Languages" %} </a></li>
+ <li><a href="{% url 'core:license-list' %}">{% trans "Licenses" %} </a></li>
+ {% if perms.core.manage_gyms %}
+ <li><a href="{% url 'core:gym-list' %}">{% trans "Gyms" %} </a></li>
+ {% endif %}
+
+ {# it's not possible to group expressions '(a or b) and c' #}
+ {% if perms.core.gym_trainer or perms.core.manage_gym %}
+ {% if user.userprofile.gym %}
+ <li><a href="{% url 'core:gym-user-list' user.userprofile.gym.pk %}">{{user.userprofile.gym}}</a></li>
+ {% endif %}
+ {% endif %}
+ {% endif %}
</ul>
</li>
{% endif %}
diff --git a/wger/core/templates/navigation.html b/wger/core/templates/navigation.html
index ffc9b70c5..cc28923d6 100644
--- a/wger/core/templates/navigation.html
+++ b/wger/core/templates/navigation.html
@@ -121,22 +121,6 @@
<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>
- {% if perms.exercises or perms.core.manage_gyms or perms.core.manage_gym or perms.core.gym_trainer %}
- <li class="divider"></li>
- <li class="nav-header">{% trans "Administration" %}</li>
- <li><a href="{% url 'config:language-overview' %}">{% trans "Languages" %} </a></li>
- <li><a href="{% url 'core:license-list' %}">{% trans "Licenses" %} </a></li>
- {% if perms.core.manage_gyms %}
- <li><a href="{% url 'core:gym-list' %}">{% trans "Gyms" %} </a></li>
- {% endif %}
-
- {# it's not possible to group expressions '(a or b) and c' #}
- {% if perms.core.gym_trainer or perms.core.manage_gym %}
- {% if user.userprofile.gym %}
- <li><a href="{% url 'core:gym-user-list' user.userprofile.gym.pk %}">{{user.userprofile.gym}}</a></li>
- {% endif %}
- {% endif %}
- {% endif %}
</ul>
</li>
</ul>
@@ -172,6 +156,7 @@
<a href="{% url 'core:preferences' %}">{% trans "My preferences" %}</a>
</li>
{% if not trainer_identity %}
+ <li class="divider"></li>
<li>
<a href="{% url 'core:logout' %}" class="browserid-logout">
<span class="glyphicon glyphicon-log-out"></span>
@@ -179,6 +164,26 @@
</a>
</li>
{% endif %}
+
+ {# #}
+ {# Adminstration #}
+ {# #}
+ {% if perms.exercises or perms.core.manage_gyms or perms.core.manage_gym or perms.core.gym_trainer %}
+ <li class="divider"></li>
+ <li class="nav-header">{% trans "Administration" %}</li>
+ <li><a href="{% url 'config:language-overview' %}">{% trans "Languages" %} </a></li>
+ <li><a href="{% url 'core:license-list' %}">{% trans "Licenses" %} </a></li>
+ {% if perms.core.manage_gyms %}
+ <li><a href="{% url 'core:gym-list' %}">{% trans "Gyms" %} </a></li>
+ {% endif %}
+
+ {# it's not possible to group expressions '(a or b) and c' #}
+ {% if perms.core.gym_trainer or perms.core.manage_gym %}
+ {% if user.userprofile.gym %}
+ <li><a href="{% url 'core:gym-user-list' user.userprofile.gym.pk %}">{{user.userprofile.gym}}</a></li>
+ {% endif %}
+ {% endif %}
+ {% endif %}
</ul>
</li>
</ul>