Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Add style to empty lists
Krzysztof Białogłowicz3b29ce3bcd88
diff --git a/saleor/static/scss/dashboard/dashboard.scss b/saleor/static/scss/dashboard/dashboard.scssindex cc59008424..7c8189eb04 100644--- a/saleor/static/scss/dashboard/dashboard.scss+++ b/saleor/static/scss/dashboard/dashboard.scss@@ -229,6 +229,12 @@ tr[data-action-go]>td:not(.ignore-link):hover {}}+.not-found {+ font-size: 1.7rem;+ text-transform: uppercase;+ text-align: center;+}+.search-form {input {border: none;diff --git a/templates/dashboard/category/list.html b/templates/dashboard/category/list.htmlindex 7afe487f13..4598aa912d 100644--- a/templates/dashboard/category/list.html+++ b/templates/dashboard/category/list.html@@ -85,8 +85,8 @@{% block menu_catalogue_class %} active{% endblock %}{% block content %}- <ul class="collection list">- {% if categories %}+ {% if categories %}+ <ul class="collection list">{% for node in categories %}<li class="collection-item list-item"><a class="list-item-name" href="{% url "dashboard:category-list" root_pk=node.pk %}">@@ -106,16 +106,12 @@{% endif %}</li>{% endfor %}+ </ul>+ {% else %}+ {% if root %}+ <p class="not-found grey-text">{% trans "No subcategories." context "Empty Category list message" %}</p>{% else %}- <li class="collection-item list-item">- <p class="list-item-name--single">- {% if root %}- {% trans "No subcategories." context "Empty Category list message" %}- {% else %}- {% trans "No categories." context "Empty Category list message" %}- {% endif %}- </p>- </li>+ <p class="not-found grey-text">{% trans "No categories." context "Empty Category list message" %}</p>{% endif %}- </ul>+ {% endif %}{% endblock %}diff --git a/templates/dashboard/customer/list.html b/templates/dashboard/customer/list.htmlindex 6860ff0ff3..09a48c1941 100644--- a/templates/dashboard/customer/list.html+++ b/templates/dashboard/customer/list.html@@ -16,8 +16,40 @@{% endblock %}{% block content %}- <div class="card">- {% if customers %}+ {% if customers %}+ <div class="card">+ <form method="get" novalidate>+ <div class="card-content">+ <div class="row">+ <div class="col s12 m3">+ <div class="row">+ {{ form.email|materializecss }}+ </div>+ </div>+ <div class="col s12 m4">+ <div class="row">+ {{ form.name|materializecss }}+ </div>+ </div>+ <div class="col s12 m3">+ <div class="row">+ {{ form.order_status|materializecss }}+ </div>+ </div>++ <div class="col s12 m2">+ <button type="submit" class="btn btn-flat btn--inline">+ {% trans "Filter" context "Customer list form primary action" %}</button>+ {% if form.is_bound %}+ <a class="btn btn--inline" href="{% url 'dashboard:customers' %}">+ {% trans "Clear" context "Customer list form secondary action" %}</a>+ {% endif %}+ </div>+ </div>+ </div>+ </form>+ </div>+ <div class="card"><div class="data-table-container"><table class="bordered highlight responsive data-table"><thead>@@ -64,11 +96,11 @@</tbody></table></div>- {% else %}- <div class="card-content card-content--no-data">- <p>{% trans "No customers found." context "Empty customers table message" %}</p>- </div>- {% endif %}- </div>+ </div>+ {% else %}+ <div class="card-content card-content--no-data">+ <p class="not-found grey-text">{% trans "No customers found." context "Empty customers table message" %}</p>+ </div>+ {% endif %}{% include "dashboard/includes/_pagination.html" with page_obj=customers %}{% endblock %}diff --git a/templates/dashboard/discount/sale_list.html b/templates/dashboard/discount/sale_list.htmlindex 58339d739f..5a6c5f2073 100644--- a/templates/dashboard/discount/sale_list.html+++ b/templates/dashboard/discount/sale_list.html@@ -47,6 +47,6 @@{% include "dashboard/includes/_pagination.html" %}{% else %}- <p>{% trans "No sales found." context "Empty sale (discount) table message" %}</p>+ <p class="not-found grey-text">{% trans "No sales found." context "Empty sale (discount) table message" %}</p>{% endif %}{% endblock %}diff --git a/templates/dashboard/discount/voucher_list.html b/templates/dashboard/discount/voucher_list.htmlindex 3cbf8de25a..24a24677cf 100644--- a/templates/dashboard/discount/voucher_list.html+++ b/templates/dashboard/discount/voucher_list.html@@ -71,6 +71,6 @@{% include "dashboard/includes/_pagination.html" %}{% else %}- <p>{% trans "No vouchers found." context "Empty voucher table message" %}</p>+ <p class="not-found grey-text">{% trans "No vouchers found." context "Empty voucher table message" %}</p>{% endif %}{% endblock %}diff --git a/templates/dashboard/order/list.html b/templates/dashboard/order/list.htmlindex 3ce857e6aa..56b80f9282 100644--- a/templates/dashboard/order/list.html+++ b/templates/dashboard/order/list.html@@ -16,8 +16,8 @@{% endblock %}{% block content %}- {% include "dashboard/includes/_status_filters.html" %}{% if object_list %}+ {% include "dashboard/includes/_status_filters.html" %}<div class="card">{% include "dashboard/includes/_orders_table.html" with orders=object_list %}</div>@@ -26,6 +26,6 @@{% include "dashboard/includes/_pagination.html" %}</div>{% else %}- <p>{% trans "No orders." context "Empty order list message" %}</p>+ <p class="not-found grey-text">{% trans "No orders." context "Empty order list message" %}</p>{% endif %}{% endblock %}diff --git a/templates/dashboard/product/attributes/list.html b/templates/dashboard/product/attributes/list.htmlindex 98e065b4ee..edc9eff01d 100644--- a/templates/dashboard/product/attributes/list.html+++ b/templates/dashboard/product/attributes/list.html@@ -41,6 +41,6 @@{% endfor %}</ul>{% else %}- <p>{% trans "No attributes found." context "Empty attribute list message" %}</p>+ <p class="not-found grey-text">{% trans "No attributes found." context "Empty attribute list message" %}</p>{% endif %}{% endblock %}diff --git a/templates/dashboard/product/class_list.html b/templates/dashboard/product/class_list.htmlindex bf20ecc33b..0c8469bc7f 100644--- a/templates/dashboard/product/class_list.html+++ b/templates/dashboard/product/class_list.html@@ -49,7 +49,7 @@</ul>{% include "dashboard/includes/_pagination.html" with page_obj=product_classes %}{% else %}- <p>{% trans "No product types found." context "Empty product type list message" %}</p>+ <p class="not-found grey-text">{% trans "No product types found." context "Empty product type list message" %}</p>{% endif %}</div></div>diff --git a/templates/dashboard/product/list.html b/templates/dashboard/product/list.htmlindex 08f93c8167..6f851db383 100644--- a/templates/dashboard/product/list.html+++ b/templates/dashboard/product/list.html@@ -51,9 +51,9 @@</ul>{% include "dashboard/includes/_pagination.html" with page_obj=products %}{% else %}- <p>{% trans "No products found." context "Empty product list message" %}</p>+ <p class="not-found grey-text">{% trans "No products found." context "Empty product list message" %}</p>{% if not product_classes %}- <p>{% trans "Create product type first." context "Empty product list without product types message" %}</p>+ <p class="not-found grey-text">{% trans "Create product type first." context "Empty product list without product types message" %}</p>{% endif %}{% endif %}</div>diff --git a/templates/dashboard/product/stock_locations/list.html b/templates/dashboard/product/stock_locations/list.htmlindex 26770dc500..7dde0b7b37 100644--- a/templates/dashboard/product/stock_locations/list.html+++ b/templates/dashboard/product/stock_locations/list.html@@ -42,7 +42,7 @@{% endfor %}</ul>{% else %}- <p>{% trans "No locations found." context "Empty stock location list message" %}</p>+ <p class="not-found grey-text">{% trans "No locations found." context "Empty stock location list message" %}</p>{% endif %}</div></div>diff --git a/templates/dashboard/shipping/method_list.html b/templates/dashboard/shipping/method_list.htmlindex 9f72b83542..85f04da9af 100644--- a/templates/dashboard/shipping/method_list.html+++ b/templates/dashboard/shipping/method_list.html@@ -58,7 +58,7 @@</div>{% include "dashboard/includes/_pagination.html" %}{% else %}- <p>{% trans "No shipping methods found." context "Empty Shipping methods table" %}</p>+ <p class="not-found grey-text">{% trans "No shipping methods found." context "Empty Shipping methods table" %}</p>{% endif %}{% endblock %}