Skip to content

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

Correct markup

dominik-zeglen0df2a2ade0d1
diff --git a/templates/dashboard/discount/sale/list.html b/templates/dashboard/discount/sale/list.html
index 669a597c17..a3e0bf46d6 100644
--- a/templates/dashboard/discount/sale/list.html
+++ b/templates/dashboard/discount/sale/list.html
@@ -23,15 +23,18 @@
{% block menu_discounts_class %} active{% endblock %}
-{% block content %}
+{% block header_extra %}
{% if perms.discount.edit_sale %}
- <div class="btn-fab-fixed">
- <a href="{% url 'dashboard:sale-add' %}" class="btn-fab-default waves-effect waves-light"
- title="{% trans "Add sale" context "Sale (discount) list add button text" %}">
- <svg data-src="{% static "dashboard/images/add.svg" %}" />
- </a>
- </div>
- {% endif %}
+ <div class="btn-fab-fixed">
+ <a href="{% url 'dashboard:sale-add' %}" class="btn-fab-default waves-effect waves-light"
+ title="{% trans "Add sale" context "Sale (discount) list add button text" %}">
+ <svg data-src="{% static "dashboard/images/add.svg" %}" />
+ </a>
+ </div>
+ {% endif %}
+{% endblock %}
+
+{% block content %}
<div class="row">
<div class="col s12 l9">
<div class="card">
diff --git a/templates/dashboard/discount/voucher/list.html b/templates/dashboard/discount/voucher/list.html
index c401e9dd09..74d56a37da 100644
--- a/templates/dashboard/discount/voucher/list.html
+++ b/templates/dashboard/discount/voucher/list.html
@@ -24,7 +24,7 @@
{% block menu_discounts_class %} active{% endblock %}
-{% block content %}
+{% block header_extra %}
{% if perms.discount.edit_voucher %}
<div class="btn-fab-fixed">
<a href="{% url 'dashboard:voucher-add' %}" class="btn-fab-default waves-effect waves-light"
@@ -33,6 +33,9 @@
</a>
</div>
{% endif %}
+{% endblock %}
+
+{% block content %}
<div class="row">
<div class="col s12 l9">
<div class="card">
diff --git a/templates/dashboard/product/product_image/list.html b/templates/dashboard/product/product_image/list.html
index 384034fd01..f3c0e05da6 100644
--- a/templates/dashboard/product/product_image/list.html
+++ b/templates/dashboard/product/product_image/list.html
@@ -123,9 +123,4 @@
</li>
</script>
</div>
- <div class="btn-fab-fixed">
- <a class="btn-fab-default waves-effect waves-light" id="images-btn" href="{% url 'dashboard:product-image-add' product_pk=product.pk %}" title="{% trans "Add image" context "Add image button text" %}">
- <svg data-src="{% static "dashboard/images/add.svg" %}" />
- </a>
- </div>
{% endblock %}
diff --git a/templates/dashboard/shipping/list.html b/templates/dashboard/shipping/list.html
index 662569dd6c..a5ae2f8194 100644
--- a/templates/dashboard/shipping/list.html
+++ b/templates/dashboard/shipping/list.html
@@ -22,7 +22,7 @@
</ul>
{% endblock %}
-{% block content %}
+{% block header_extra %}
{% if perms.shipping.edit_shipping %}
<div class="btn-fab-fixed">
<a href="{% url 'dashboard:shipping-method-add' %}"
@@ -32,6 +32,9 @@
</a>
</div>
{% endif %}
+{% endblock %}
+
+{% block content %}
<div class="row">
<div class="col s12 l9">
{% if shipping_methods %}