From cb6dbc801fec162da8150e66fb4c755a1463f461 Mon Sep 17 00:00:00 2001 From: jeremystretch Date: Fri, 14 May 2021 17:02:08 -0400 Subject: [PATCH] Simplify breadcrumbs --- netbox/templates/extras/objectchange.html | 24 ++++++++++------------- netbox/templates/extras/report.html | 12 ++++-------- netbox/templates/extras/script.html | 13 ++++-------- netbox/templates/generic/object.html | 9 --------- netbox/templates/layout.html | 16 +++++++++++++-- 5 files changed, 32 insertions(+), 42 deletions(-) diff --git a/netbox/templates/extras/objectchange.html b/netbox/templates/extras/objectchange.html index 30664db9a..1df3bf5bc 100644 --- a/netbox/templates/extras/objectchange.html +++ b/netbox/templates/extras/objectchange.html @@ -3,20 +3,16 @@ {% block title %}{{ object }}{% endblock %} -{% block breadcrumb_main %} - +{% block breadcrumbs %} + + {% if object.related_object.get_absolute_url %} + + {% elif object.changed_object.get_absolute_url %} + + {% elif object.changed_object %} + + {% endif %} + {% endblock %} {% block header %} diff --git a/netbox/templates/extras/report.html b/netbox/templates/extras/report.html index 0d7698d76..23a91b150 100644 --- a/netbox/templates/extras/report.html +++ b/netbox/templates/extras/report.html @@ -3,14 +3,10 @@ {% block title %}{{ report.name }}{% endblock %} -{% block breadcrumb_main %} - +{% block breadcrumbs %} + + + {% endblock %} {% block content %} diff --git a/netbox/templates/extras/script.html b/netbox/templates/extras/script.html index 1078ba427..683319fca 100644 --- a/netbox/templates/extras/script.html +++ b/netbox/templates/extras/script.html @@ -5,15 +5,10 @@ {% block title %}{{ script }}{% endblock %} -{% block breadcrumb_main %} - +{% block breadcrumbs %} + + + {% endblock %} {% block content %} diff --git a/netbox/templates/generic/object.html b/netbox/templates/generic/object.html index 27a324339..8384b29e7 100644 --- a/netbox/templates/generic/object.html +++ b/netbox/templates/generic/object.html @@ -8,15 +8,6 @@ {% block title %}{{ object }}{% endblock %} -{% block breadcrumb_main %} - -{% endblock %} - {% block controls %}
diff --git a/netbox/templates/layout.html b/netbox/templates/layout.html index e8754aa4d..0ddc5f2fd 100644 --- a/netbox/templates/layout.html +++ b/netbox/templates/layout.html @@ -88,14 +88,26 @@ {# Body #}
- {# Page title #} + {# Page header #} {% block title_container %}
+ + {# Title #}

{% block title %}{% endblock %}

- {% block breadcrumb_main %}{% endblock %} + + {# Breadcrumbs #} + +
+ + {# Controls #} {% block controls %}{% endblock %} +
{% endblock %}