Skip to content

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

Add zero-page

dominik-zeglen33bf149a8b0c
diff --git a/templates/dashboard/customer/list.html b/templates/dashboard/customer/list.html
index a0fc3df0c3..816e288647 100644
--- a/templates/dashboard/customer/list.html
+++ b/templates/dashboard/customer/list.html
@@ -81,17 +81,23 @@
</table>
</div>
</div>
+ {% paginate customers %}
{% else %}
- <div class="card-content card-content--no-data not-found">
- <p class="grey-text">
- {% trans "No customers found." context "Empty customers table message" %}
- </p>
- </div>
+ {% if is_empty %}
+ {% include 'dashboard/customer/zero_page.html' %}
+ {% else %}
+ <div class="col s12">
+ <div class="not-found">
+ <p class="grey-text">
+ {% trans "No customers found." context "Empty customers table message" %}
+ </p>
+ </div>
+ </div>
+ {% endif %}
{% endif %}
- {% paginate customers %}
</div>
<div class="col s12 l3" id="filters">
- {% add_filters filter %}
+ {% if not is_empty %}{% add_filters filter %}{% endif %}
</div>
</div>
{% endblock %}
diff --git a/templates/dashboard/customer/zero_page.html b/templates/dashboard/customer/zero_page.html
new file mode 100644
index 0000000000..5d6a4844b2
--- /dev/null
+++ b/templates/dashboard/customer/zero_page.html
@@ -0,0 +1,11 @@
+{% extends 'dashboard/base_zero_page.html' %}
+{% load i18n %}
+{% load static %}
+
+{% block title %}{% trans "No customers found." %}{% endblock %}
+{% block content %}
+ {% static "dashboard/images/add.svg" as img_path %}
+ {% blocktrans %}
+ Customer accounts will appear here once users register in the shop.
+ {% endblocktrans %}
+{% endblock %}
diff --git a/templates/dashboard/order/list.html b/templates/dashboard/order/list.html
index 4e337cb296..40cbef0f1a 100644
--- a/templates/dashboard/order/list.html
+++ b/templates/dashboard/order/list.html
@@ -20,22 +20,28 @@
<div class="row">
<div class="col s12 l9">
{% if orders %}
- <div class="card">
- {% include "dashboard/includes/_orders_table.html" with orders=orders %}
- </div>
- <div class="row">
- {% paginate orders %}
- </div>
- {% else %}
- <div class="not-found">
- <p class="grey-text">
- {% trans "No orders found." context "Empty order list message" %}
- </p>
- </div>
- {% endif %}
+ <div class="card">
+ {% include "dashboard/includes/_orders_table.html" with orders=orders %}
+ </div>
+ <div class="row">
+ {% paginate orders %}
+ </div>
+ {% else %}
+ {% if is_empty %}
+ {% include 'dashboard/order/zero_page.html' %}
+ {% else %}
+ <div class="col s12">
+ <div class="not-found">
+ <p class="grey-text">
+ {% trans "No orders found." context "Empty order list message" %}
+ </p>
+ </div>
+ </div>
+ {% endif %}
+ {% endif %}
</div>
<div class="col s12 l3" id="filters">
- {% add_filters filter %}
+ {% if not is_empty %}{% add_filters filter %}{% endif %}
</div>
</div>
{% endblock %}
diff --git a/templates/dashboard/order/zero_page.html b/templates/dashboard/order/zero_page.html
new file mode 100644
index 0000000000..59d47bfdfe
--- /dev/null
+++ b/templates/dashboard/order/zero_page.html
@@ -0,0 +1,11 @@
+{% extends 'dashboard/base_zero_page.html' %}
+{% load i18n %}
+{% load static %}
+
+{% block title %}{% trans "No orders found." %}{% endblock %}
+{% block content %}
+ {% static "dashboard/images/add.svg" as img_path %}
+ {% blocktrans %}
+ Orders will appear here after customers complete the checkout.
+ {% endblocktrans %}
+{% endblock %}