From 9c6c92f99059a767d9a8e8d6d135dc7aa2f34e91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20H=C3=A4ttasch?= <benjamin.haettasch@fachschaft.informatik.tu-darmstadt.de> Date: Wed, 13 May 2020 01:04:37 +0200 Subject: [PATCH] Improve consistency of breadcrumbs in submission, plan and dashboard apps Closes #74 --- AKDashboard/templates/AKDashboard/dashboard_event.html | 2 +- AKPlan/templates/AKPlan/plan_breadcrumbs.html | 7 +++++-- AKPlan/templates/AKPlan/plan_index.html | 3 +++ AKPlan/templates/AKPlan/plan_room.html | 8 +++++--- AKPlan/templates/AKPlan/plan_track.html | 8 +++++--- .../templates/AKSubmission/submission_breadcrumbs.html | 8 +++++++- 6 files changed, 26 insertions(+), 10 deletions(-) diff --git a/AKDashboard/templates/AKDashboard/dashboard_event.html b/AKDashboard/templates/AKDashboard/dashboard_event.html index d91c688b..0cef2cfa 100644 --- a/AKDashboard/templates/AKDashboard/dashboard_event.html +++ b/AKDashboard/templates/AKDashboard/dashboard_event.html @@ -15,7 +15,7 @@ {% block breadcrumbs %} <li class="breadcrumb-item"><a href="{% url 'dashboard:dashboard' %}">AKPlanning</a></li> - <li class="breadcrumb-item active">{{ event.slug }}</li> + <li class="breadcrumb-item active">{{ event }}</li> {% endblock %} {% block content %} diff --git a/AKPlan/templates/AKPlan/plan_breadcrumbs.html b/AKPlan/templates/AKPlan/plan_breadcrumbs.html index c5ca3c1a..653e04c2 100644 --- a/AKPlan/templates/AKPlan/plan_breadcrumbs.html +++ b/AKPlan/templates/AKPlan/plan_breadcrumbs.html @@ -8,7 +8,10 @@ AKPlanning {% endif %} </li> -<li class="breadcrumb-item">{{ event.slug }}</li> <li class="breadcrumb-item"> - <a href="{% url 'plan:plan_overview' event_slug=event.slug %}">{% trans "AK Plan" %}</a> + {% if 'AKDashboard'|check_app_installed %} + <a href="{% url 'dashboard:dashboard_event' slug=event.slug %}">{{ event }}</a> + {% else %} + {{ event }} + {% endif %} </li> diff --git a/AKPlan/templates/AKPlan/plan_index.html b/AKPlan/templates/AKPlan/plan_index.html index cd22d225..517b5067 100644 --- a/AKPlan/templates/AKPlan/plan_index.html +++ b/AKPlan/templates/AKPlan/plan_index.html @@ -70,6 +70,9 @@ {% block breadcrumbs %} {% include "AKPlan/plan_breadcrumbs.html" %} + <li class="breadcrumb-item"> + {% trans "AK Plan" %} + </li> {% endblock %} diff --git a/AKPlan/templates/AKPlan/plan_room.html b/AKPlan/templates/AKPlan/plan_room.html index 6f956563..c47ba1d0 100644 --- a/AKPlan/templates/AKPlan/plan_room.html +++ b/AKPlan/templates/AKPlan/plan_room.html @@ -5,8 +5,10 @@ {% block breadcrumbs %} {% include "AKPlan/plan_breadcrumbs.html" %} - <li class="breadcrumb-item">{% trans "Room" %}</li> - <li class="breadcrumb-item">{{ room.title }}</li> + <li class="breadcrumb-item"> + <a href="{% url 'plan:plan_overview' event_slug=event.slug %}">{% trans "AK Plan" %}</a> + </li> + <li class="breadcrumb-item">{% trans "Room" %}: {{ room.title }}</li> {% endblock %} @@ -41,7 +43,7 @@ </ul> </div> - <h1>Plan: {{ event }} -- {% trans "Room" %}: {{ room }}</h1> + <h1>Plan: {{ event }} ({% trans "Room" %}: {{ room }})</h1> {% timezone event.timezone %} <div class="row" style="margin-top:30px;clear:both;"> diff --git a/AKPlan/templates/AKPlan/plan_track.html b/AKPlan/templates/AKPlan/plan_track.html index da452573..da292778 100644 --- a/AKPlan/templates/AKPlan/plan_track.html +++ b/AKPlan/templates/AKPlan/plan_track.html @@ -5,8 +5,10 @@ {% block breadcrumbs %} {% include "AKPlan/plan_breadcrumbs.html" %} - <li class="breadcrumb-item">{% trans "Track" %}</li> - <li class="breadcrumb-item">{{ track }}</li> + <li class="breadcrumb-item"> + <a href="{% url 'plan:plan_overview' event_slug=event.slug %}">{% trans "AK Plan" %}</a> + </li> + <li class="breadcrumb-item">{% trans "Track" %}: {{ track }}</li> {% endblock %} @@ -41,7 +43,7 @@ </ul> </div> - <h1>Plan: {{ event }} -- {% trans "Track" %}: {{ track }}</h1> + <h1>Plan: {{ event }} ({% trans "Track" %}: {{ track }})</h1> {% timezone event.timezone %} <div class="row" style="margin-top:30px;clear: both;"> diff --git a/AKSubmission/templates/AKSubmission/submission_breadcrumbs.html b/AKSubmission/templates/AKSubmission/submission_breadcrumbs.html index 147d6c26..0f1365d4 100644 --- a/AKSubmission/templates/AKSubmission/submission_breadcrumbs.html +++ b/AKSubmission/templates/AKSubmission/submission_breadcrumbs.html @@ -7,4 +7,10 @@ AKPlanning {% endif %} </li> -<li class="breadcrumb-item">{{ event.slug }}</li> +<li class="breadcrumb-item"> + {% if 'AKDashboard'|check_app_installed %} + <a href="{% url 'dashboard:dashboard_event' slug=event.slug %}">{{ event }}</a> + {% else %} + {{ event }} + {% endif %} +</li> -- GitLab