Skip to content

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

Fix attributes breadcrumbs and titles

Krzysztof Białogłowicz064052ad93d4
diff --git a/templates/dashboard/product/product_attribute/detail.html b/templates/dashboard/product/product_attribute/detail.html
index 0d9748ad35..5823ab1b2c 100644
--- a/templates/dashboard/product/product_attribute/detail.html
+++ b/templates/dashboard/product/product_attribute/detail.html
@@ -4,7 +4,7 @@
{% load staticfiles %}
{% block title %}
- {{ attribute }} - {% trans "Attributes" context "Attribute detail page title" %} - {{ block.super }}
+ {{ attribute }} - {{ block.super }}
{% endblock %}
{% block body_class %}body-attribute{% endblock %}
diff --git a/templates/dashboard/product/product_attribute/form.html b/templates/dashboard/product/product_attribute/form.html
index 0c6a6c840a..13c0b91df5 100644
--- a/templates/dashboard/product/product_attribute/form.html
+++ b/templates/dashboard/product/product_attribute/form.html
@@ -5,11 +5,11 @@
{% block title %}
{% if attribute.pk %}
- {{ attribute }}
+ {% trans "Edit" context "Dashboard attributes list" %} - {{ attribute }}
{% else %}
{% trans "Add new attribute" context "Attribute detail page title" %}
{% endif %}
- - {% trans "Attributes" context "Dashboard attributes list" %} - {{ block.super }}
+ - {{ block.super }}
{% endblock %}
{% block body_class %}body-attributes{% endblock %}
@@ -34,15 +34,24 @@
<svg data-src="{% static "dashboard/images/arrow_left.svg" %}" fill="#fff" width="20px" height="20px" />
</a>
</li>
+ {% if attribute.pk %}
+ <li>
+ <a href="{% url 'dashboard:product-attribute-detail' attribute.pk %}" class="breadcrumbs--ellipsed-item">
+ {{ attribute }}
+ </a>
+ </li>
+ <li>
+ <span class="breadcrumbs--ellipsed-item">
+ {% trans "Edit" context "Attribute detail breadcrumbs" %}
+ </span>
+ </li>
+ {% else %}
<li>
<span class="breadcrumbs--ellipsed-item">
- {% if attribute.pk %}
- {{ attribute }}
- {% else %}
- {% trans "Add new attribute" context "Attribute detail breadcrumbs" %}
- {% endif %}
+ {% trans "Add new attribute" context "Attribute detail breadcrumbs" %}
</span>
</li>
+ {% endif %}
</ul>
{% endblock %}
@@ -61,9 +70,9 @@
<div class="row">
{{ form.slug|materializecss }}
</div>
- <h5 class="card-title">
+ <span class="card-title">
{% trans "Attribute values" context "Attribute values formset title" %}
- </h5>
+ </span>
{{ formset.management_form }}
{{ formset.non_form_errors.as_ul }}
</div>
@@ -100,7 +109,7 @@
{% trans "Cancel" context "Dashboard cancel action" %}
</a>
<button type="submit" class="btn waves-effect waves-light">
- {% trans "Update" context "Dashboard update action" %}
+ {% trans "Save" context "Dashboard update action" %}
</button>
{% else %}
<a href="{% url 'dashboard:product-attributes' %}" class="btn btn-flat">
diff --git a/templates/dashboard/shipping/method_form.html b/templates/dashboard/shipping/method_form.html
index ab11f967a2..4e66ab1883 100644
--- a/templates/dashboard/shipping/method_form.html
+++ b/templates/dashboard/shipping/method_form.html
@@ -72,7 +72,7 @@
<div class="row">
{{ shipping_method_form|materializecss }}
</div>
- <h5 class="card-title">{% trans "Price per country" context "Shipping method form text" %}</h5>
+ <span class="card-title">{% trans "Price per country" context "Shipping method form text" %}</span>
</div>
<div class="formset-table-container">
<table class="formset-table">