From d90acbf760de3450d6802b3727b8fa4ca6bbcf58 Mon Sep 17 00:00:00 2001 From: Jorran de Wit <jorrandewit@outlook.com> Date: Mon, 17 Sep 2018 08:03:59 +0200 Subject: [PATCH] Add breadcrumb to improve navigation --- profiles/templates/profiles/base.html | 13 +++++++++++++ .../templates/profiles/profile_confirm_delete.html | 7 ++++++- profiles/templates/profiles/profile_form.html | 7 ++++++- profiles/templates/profiles/profile_list.html | 11 ++++++++--- 4 files changed, 33 insertions(+), 5 deletions(-) create mode 100644 profiles/templates/profiles/base.html diff --git a/profiles/templates/profiles/base.html b/profiles/templates/profiles/base.html new file mode 100644 index 000000000..362ca9f53 --- /dev/null +++ b/profiles/templates/profiles/base.html @@ -0,0 +1,13 @@ +{% extends 'scipost/base.html' %} + +{% block breadcrumb %} + <div class="container-outside header"> + <div class="container"> + <nav class="breadcrumb hidden-sm-down"> + {% block breadcrumb_items %} + <a href="{% url 'profiles:profiles' %}" class="breadcrumb-item">Profiles</a> + {% endblock %} + </nav> + </div> + </div> +{% endblock %} diff --git a/profiles/templates/profiles/profile_confirm_delete.html b/profiles/templates/profiles/profile_confirm_delete.html index c10b167cf..471ec5553 100644 --- a/profiles/templates/profiles/profile_confirm_delete.html +++ b/profiles/templates/profiles/profile_confirm_delete.html @@ -1,7 +1,12 @@ -{% extends 'scipost/base.html' %} +{% extends 'profiles/base.html' %} {% load bootstrap %} +{% block breadcrumb_items %} + {{ block.super }} + <span class="breadcrumb-item">Delete {{ profile }}</span> +{% endblock %} + {% block pagetitle %}: Delete Profile{% endblock pagetitle %} {% block content %} diff --git a/profiles/templates/profiles/profile_form.html b/profiles/templates/profiles/profile_form.html index a59010e93..e94df9dfc 100644 --- a/profiles/templates/profiles/profile_form.html +++ b/profiles/templates/profiles/profile_form.html @@ -1,7 +1,12 @@ -{% extends 'scipost/base.html' %} +{% extends 'profiles/base.html' %} {% load bootstrap %} +{% block breadcrumb_items %} + {{ block.super }} + <span class="breadcrumb-item">{% if form.instance.id %}Update {{ form.instance }}{% else %}Add new Profile{% endif %}</span> +{% endblock %} + {% block pagetitle %}: Profiles{% endblock pagetitle %} {% block content %} diff --git a/profiles/templates/profiles/profile_list.html b/profiles/templates/profiles/profile_list.html index cd7817e24..3f632260a 100644 --- a/profiles/templates/profiles/profile_list.html +++ b/profiles/templates/profiles/profile_list.html @@ -1,9 +1,14 @@ -{% extends 'scipost/base.html' %} - -{% load scipost_extras %} +{% extends 'scipost/_personal_page_base.html' %} {% load bootstrap %} +{% block breadcrumb_items %} + {{ block.super }} + <span class="breadcrumb-item">Profiles</span> +{% endblock %} + +{% load scipost_extras %} + {% block pagetitle %}: Profiles{% endblock pagetitle %} {% block content %} -- GitLab