Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Add breadcrumbs to make navigation easier

Roland Geider97b640d5b1ab
diff --git a/wger/config/templates/language/view.html b/wger/config/templates/language/view.html
index 4b72203a7..2474848be 100644
--- a/wger/config/templates/language/view.html
+++ b/wger/config/templates/language/view.html
@@ -1,11 +1,19 @@
{% extends "base.html" %}
-{% load i18n %}
-{% load staticfiles %}
-{% load wger_extras %}
+{% load i18n staticfiles wger_extras django_bootstrap_breadcrumbs %}
{% block title %}{{ view_language }}{% endblock %}
+
+{% block breadcrumbs %}
+ {{ block.super }}
+
+ {% breadcrumb "Languages" "config:language:overview" %}
+ {% breadcrumb view_language "config:language:view" view_language.pk %}
+{% endblock %}
+
+
+
{% block content %}
<table class="table">
<thead>
diff --git a/wger/exercises/templates/exercise/view.html b/wger/exercises/templates/exercise/view.html
index e13807614..7f8e36d34 100644
--- a/wger/exercises/templates/exercise/view.html
+++ b/wger/exercises/templates/exercise/view.html
@@ -1,9 +1,6 @@
{% extends "base.html" %}
-{% load i18n %}
-{% load staticfiles %}
-{% load wger_extras %}
-{% load thumbnail %}
-{% load cache %}
+{% load i18n staticfiles wger_extras thumbnail cache django_bootstrap_breadcrumbs %}
+
{# #}
{# Opengraph #}
@@ -22,6 +19,17 @@
{% endblock %}
+{# #}
+{# Breadcrumbs #}
+{# #}
+{% block breadcrumbs %}
+ {{ block.super }}
+
+ {% breadcrumb "Exercises" "exercise:exercise:overview" %}
+ {% breadcrumb exercise exercise.get_absolute_url %}
+{% endblock %}
+
+
{# #}
{# Title #}
{# #}
@@ -317,20 +325,6 @@ $(document).ready(function() {
{# Side bar #}
{# #}
{% block sidebar %}
-
-<h3>{% trans "Back to overview" %}</h3>
-<p>
- <a href="{% url 'exercise:exercise:overview' %}" {% auto_link_css flavour %}>
- <img src="{% static 'images/icons/list.svg' %}"
- width="32"
- height="32"
- alt="{% trans 'Back to overview' %}"
- >
- {% trans "Back to exercise overview" %}
- </a>
-</p>
-<hr>
-
{% if user.is_authenticated and not user.userprofile.is_temporary and not perms.exercises %}
<h3>{% trans "Options" %}</h3>
<p>
diff --git a/wger/manager/templates/workout/log.html b/wger/manager/templates/workout/log.html
index 473de63df..4b65e95fc 100644
--- a/wger/manager/templates/workout/log.html
+++ b/wger/manager/templates/workout/log.html
@@ -1,7 +1,5 @@
{% extends "base.html" %}
-{% load i18n %}
-{% load staticfiles %}
-{% load wger_extras %}
+{% load i18n staticfiles wger_extras django_bootstrap_breadcrumbs %}
{# #}
@@ -14,6 +12,17 @@
{% endblock %}
+{# #}
+{# Breadcrumbs #}
+{# #}
+{% block breadcrumbs %}
+ {{ block.super }}
+
+ {% breadcrumb workout "manager:workout:view" workout.pk %}
+ {% breadcrumb "Weight log" "manager:log:log" workout.pk %}
+{% endblock %}
+
+
{# #}
{# Title #}
{# #}
@@ -103,17 +112,6 @@ $(document).ready(function() {
{# Side bar #}
{# #}
{% block sidebar %}
-<h3>{% trans "Options" %}</h3>
-<p>
-<a href="{{ workout.get_absolute_url }}" {% auto_link_css flavour %}>
- <img src="{% static 'images/icons/list.svg' %}"
- width="32"
- height="32"
- alt="{% trans 'Back to workout' %}">
- {% trans "Back to workout" %}
-</a>
-</p>
-
<h3>{% trans "Notes" %}</h3>
<p>{% blocktrans %}This page shows the weight logs belonging to this workout
only. Click on an exercise to see all the historical data for
diff --git a/wger/nutrition/templates/ingredient/view.html b/wger/nutrition/templates/ingredient/view.html
index 6cb77f489..e16fd7111 100644
--- a/wger/nutrition/templates/ingredient/view.html
+++ b/wger/nutrition/templates/ingredient/view.html
@@ -1,7 +1,5 @@
{% extends "base.html" %}
-{% load i18n %}
-{% load staticfiles %}
-{% load wger_extras %}
+{% load i18n staticfiles wger_extras django_bootstrap_breadcrumbs %}
{% block title %}{{ingredient.name}}{% endblock %}
@@ -15,6 +13,13 @@ $(document).ready(function() {
+{% block breadcrumbs %}
+ {{ block.super }}
+
+ {% breadcrumb "Ingredients" "nutrition:ingredient:list" %}
+ {% breadcrumb ingredient ingredient.get_absolute_url %}
+{% endblock %}
+
{% block content %}
{% if ingredient.status == ingredient.INGREDIENT_STATUS_PENDING %}
diff --git a/wger/software/templates/changelog.html b/wger/software/templates/changelog.html
index cce695f6f..dfec9a585 100644
--- a/wger/software/templates/changelog.html
+++ b/wger/software/templates/changelog.html
@@ -50,6 +50,10 @@
Allow users to copy shared workouts from others
<a href="https://github.com/rolandgeider/wger/issues/127">#127</a>
</li>
+ <li>
+ Added breadbrumbs, to make navigation easier
+ <a href="https://github.com/rolandgeider/wger/issues/101">#101</a>
+ </li>
<li>
Add option to delete workout sessions and their logs
<a href="https://github.com/rolandgeider/wger/issues/156">#156</a>