Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Improve breadcrumbs

akjanik341c3aaf908e
diff --git a/templates/dashboard/page/detail.html b/templates/dashboard/page/detail.html
index 69d32fbd26..5c84a49ac6 100644
--- a/templates/dashboard/page/detail.html
+++ b/templates/dashboard/page/detail.html
@@ -1,6 +1,5 @@
{% extends "dashboard/base.html" %}
{% load i18n %}
-{% load mptt_tags %}
{% load materializecss %}
{% load staticfiles %}
{% load status %}
diff --git a/templates/dashboard/page/form.html b/templates/dashboard/page/form.html
index 78760b6417..b5cbabe5ab 100644
--- a/templates/dashboard/page/form.html
+++ b/templates/dashboard/page/form.html
@@ -3,9 +3,14 @@
{% load materializecss %}
{% load staticfiles %}
-{% block page_title %}{% if page.pk %}{{ page }}{% else %}{% trans 'Add new page' %}{% endif %}{{ block.super }}{% endblock %}
-
-{% block title %}{% if page.pk %}{{ page }}{% else %}{% trans 'Add new page' %}{% endif %} - {{ block.super }}{% endblock %}
+{% block title %}
+ {% if page.pk %}
+ {% trans "Edit" context "Page form page title" %} - {{ page }}
+ {% else %}
+ {% trans "Add new page" context "Page form page title" %}
+ {% endif %}
+ {{ block.super }}
+{% endblock %}
{% block body_class %}body-page{% endblock %}
@@ -15,32 +20,36 @@
{% endblock %}
{% block breadcrumbs %}
- <ul class="breadcrumbs breadcrumbs--history">
- <li>
- <a href="{% url 'dashboard:page-list' %}" class="breadcrumbs">{% trans "Pages" %}</a>
- </li>
- <li class="back-mobile">
- <a href="{% url 'dashboard:page-list' %}" class="breadcrumb"><i class="material-icons">arrow_back</i></a>
- </li>
- <li><span class="breadcrumbs--ellipsed-item">
- {% if page.pk %}{{ page }}{% else %}{% trans 'Add new page' %}{% endif %}</span>
- </li>
- </ul>
-{% endblock %}
-
-{% block header_extra %}
- {% if page.pk %}
- <a class="dropdown-button right" href="#" data-activates="page-delete" data-constrainwidth="false">
- <svg data-src="{% static 'dashboard/images/more-vert.svg' %}" height="24" width="24" />
- </a>
- <ul id="page-delete" class="dropdown-content">
+ <ul class="breadcrumbs breadcrumbs--history">
<li>
- <a class="modal-trigger-custom" href="#base-modal" data-href="{% url 'dashboard:page-delete' pk=page.pk %}">
- {% trans "Delete page" context "Page action" %}
+ <a href="{% url 'dashboard:page-list' %}" class="breadcrumbs">
+ {% trans "Pages" context "Dashboard pages list" %}
+ </a>
+ </li>
+ <li class="back-mobile">
+ <a href="{% url 'dashboard:page-list' %}">
+ <svg data-src="{% static 'dashboard/images/arrow-left.svg' %}" fill="#fff" width="20px" height="20px" />
</a>
</li>
+ <li>
+ {% if page.pk %}
+ <a href="{% url 'dashboard:page-detail' pk=page.pk %}" class="breadcrumbs--ellipsed-item">
+ {{ page }}
+ </a>
+ {% else %}
+ <span class="breadcrumbs--ellipsed-item">
+ {% trans "Add new page" context "Page form breadcrumbs" %}
+ </span>
+ {% endif %}
+ </li>
+ {% if page.pk %}
+ <li>
+ <span class="breadcrumbs--ellipsed-item">
+ {% trans "Edit" context "Page form breadcrumbs" %}
+ </span>
+ </li>
+ {% endif %}
</ul>
- {% endif %}
{% endblock %}
{% block menu_pages_class %}active{% endblock %}