Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Fix empty states in pages with data tables
weronka71e882ee6d06
diff --git a/saleor/static/scss/dashboard/dashboard.scss b/saleor/static/scss/dashboard/dashboard.scssindex 5a0c262bbd..95400ed258 100644--- a/saleor/static/scss/dashboard/dashboard.scss+++ b/saleor/static/scss/dashboard/dashboard.scss@@ -230,9 +230,11 @@ tr[data-action-go]>td:not(.ignore-link):hover {}.not-found {- font-size: 1.7rem;- text-transform: uppercase;text-align: center;+ p {+ font-size: 1.7rem;+ text-transform: uppercase;+ }}.search-form {diff --git a/templates/dashboard/category/list.html b/templates/dashboard/category/list.htmlindex 4598aa912d..c5847b22e8 100644--- a/templates/dashboard/category/list.html+++ b/templates/dashboard/category/list.html@@ -108,10 +108,12 @@{% endfor %}</ul>{% else %}+ <div class="not-found">{% if root %}- <p class="not-found grey-text">{% trans "No subcategories." context "Empty Category list message" %}</p>+ <p class="grey-text">{% trans "No subcategories." context "Empty Category list message" %}</p>{% else %}- <p class="not-found grey-text">{% trans "No categories." context "Empty Category list message" %}</p>+ <p class="grey-text">{% trans "No categories." context "Empty Category list message" %}</p>{% endif %}+ </div>{% endif %}{% endblock %}diff --git a/templates/dashboard/customer/list.html b/templates/dashboard/customer/list.htmlindex 847d4052d5..e6c2bae324 100644--- a/templates/dashboard/customer/list.html+++ b/templates/dashboard/customer/list.html@@ -66,8 +66,8 @@</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 class="card-content card-content--no-data not-found">+ <p class="grey-text">{% trans "No customers found." context "Empty customers table message" %}</p></div>{% endif %}{% include "dashboard/includes/_pagination.html" with page_obj=customers %}diff --git a/templates/dashboard/discount/sale_list.html b/templates/dashboard/discount/sale_list.htmlindex 5a6c5f2073..11f2560cd5 100644--- a/templates/dashboard/discount/sale_list.html+++ b/templates/dashboard/discount/sale_list.html@@ -47,6 +47,9 @@{% include "dashboard/includes/_pagination.html" %}{% else %}- <p class="not-found grey-text">{% trans "No sales found." context "Empty sale (discount) table message" %}</p>+ <div class="not-found">+ <p class="grey-text">{% trans "No sales found." context "Empty sale (discount) table message" %}</p>+ <a href="{% url 'dashboard:sale-add' %}" class="btn btn-flat primary" title="{% trans "Add sale" context "Sale (discount) list add button text" %}">{% trans "Add new sale" context "Empty sale (discount) table add button" %}</a>+ </div>{% endif %}{% endblock %}diff --git a/templates/dashboard/discount/voucher_list.html b/templates/dashboard/discount/voucher_list.htmlindex 24a24677cf..5488d23a6b 100644--- a/templates/dashboard/discount/voucher_list.html+++ b/templates/dashboard/discount/voucher_list.html@@ -71,6 +71,9 @@{% include "dashboard/includes/_pagination.html" %}{% else %}- <p class="not-found grey-text">{% trans "No vouchers found." context "Empty voucher table message" %}</p>+ <div class="not-found">+ <p class="grey-text">{% trans "No vouchers found." context "Empty voucher table message" %}</p>+ <a href="{% url 'dashboard:voucher-add' %}" class="btn btn-flat primary" title="{% trans "Add new voucher" context "Voucher list add button text" %}">{% trans "Add new voucher" context "Empty voucher table add button" %}</a>+ </div>{% endif %}{% endblock %}diff --git a/templates/dashboard/index.html b/templates/dashboard/index.htmlindex f9b17d5805..e01d49f893 100644--- a/templates/dashboard/index.html+++ b/templates/dashboard/index.html@@ -36,8 +36,8 @@</table></div>{% else %}- <div class="card-content card-content--no-data">- <p class="not-found grey-text">{% trans "No preauthorized payments." context "Empty Preauthorized payments table message" %}</p>+ <div class="card-content card-content--no-data not-found">+ <p class="grey-text">{% trans "No preauthorized payments." context "Empty Preauthorized payments table message" %}</p></div>{% endif %}</div>@@ -51,8 +51,8 @@{% if orders_to_ship %}{% include "dashboard/includes/_orders_table.html" with orders=orders_to_ship %}{% else %}- <div class="card-content card-content--no-data">- <p class="not-found grey-text">{% trans "No orders are ready for shipment." context "Empty order table message" %}</p>+ <div class="card-content card-content--no-data not-found ">+ <p class="grey-text">{% trans "No orders are ready for shipment." context "Empty order table message" %}</p></div>{% endif %}</div>@@ -82,8 +82,8 @@</table></div>{% else %}- <div class="card-content card-content--no-data">- <p class="not-found grey-text">{% trans "No products are low in stock." context "Empty low stock table message" %}</p>+ <div class="card-content card-content--no-data not-found">+ <p class="grey-text">{% trans "No products are low in stock." context "Empty low stock table message" %}</p></div>{% endif %}</div>diff --git a/templates/dashboard/order/list.html b/templates/dashboard/order/list.htmlindex 24dbc5aca0..758dcc93ee 100644--- a/templates/dashboard/order/list.html+++ b/templates/dashboard/order/list.html@@ -26,9 +26,13 @@{% include "dashboard/includes/_pagination.html" %}</div>{% else %}- <p class="not-found grey-text">{% trans "No orders found." context "Empty order list message" %}</p>+ <div class="not-found">+ <p class="grey-text">{% trans "No orders found." context "Empty order list message" %}</p>+ </div>{% endif %}{% else %}- <p class="not-found grey-text">{% trans "No orders." context "Empty order list message" %}</p>+ <div class="not-found">+ <p class="grey-text">{% trans "No orders." context "Empty order list message" %}</p>+ </div>{% endif %}{% endblock %}diff --git a/templates/dashboard/product/attributes/list.html b/templates/dashboard/product/attributes/list.htmlindex edc9eff01d..25a7384579 100644--- a/templates/dashboard/product/attributes/list.html+++ b/templates/dashboard/product/attributes/list.html@@ -41,6 +41,8 @@{% endfor %}</ul>{% else %}- <p class="not-found grey-text">{% trans "No attributes found." context "Empty attribute list message" %}</p>+ <div class="not-found">+ <p class="grey-text">{% trans "No attributes found." context "Empty attribute list message" %}</p>+ </div>{% endif %}{% endblock %}diff --git a/templates/dashboard/product/class_list.html b/templates/dashboard/product/class_list.htmlindex 0c8469bc7f..d4f027d467 100644--- a/templates/dashboard/product/class_list.html+++ b/templates/dashboard/product/class_list.html@@ -49,7 +49,9 @@</ul>{% include "dashboard/includes/_pagination.html" with page_obj=product_classes %}{% else %}- <p class="not-found grey-text">{% trans "No product types found." context "Empty product type list message" %}</p>+ <div class="not-found">+ <p class="grey-text">{% trans "No product types found." context "Empty product type list message" %}</p>+ </div>{% endif %}</div></div>diff --git a/templates/dashboard/product/list.html b/templates/dashboard/product/list.htmlindex 6f851db383..7fa99c348b 100644--- a/templates/dashboard/product/list.html+++ b/templates/dashboard/product/list.html@@ -51,10 +51,12 @@</ul>{% include "dashboard/includes/_pagination.html" with page_obj=products %}{% else %}- <p class="not-found grey-text">{% trans "No products found." context "Empty product list message" %}</p>- {% if not product_classes %}- <p class="not-found grey-text">{% trans "Create product type first." context "Empty product list without product types message" %}</p>- {% endif %}+ <div class="not-found">+ <p class="grey-text">{% trans "No products found." context "Empty product list message" %}</p>+ {% if not product_classes %}+ <p class="grey-text">{% trans "Create product type first." context "Empty product list without product types message" %}</p>+ {% endif %}+ </div>{% endif %}</div></div>diff --git a/templates/dashboard/product/stock_locations/list.html b/templates/dashboard/product/stock_locations/list.htmlindex 7dde0b7b37..568c056830 100644--- a/templates/dashboard/product/stock_locations/list.html+++ b/templates/dashboard/product/stock_locations/list.html@@ -42,7 +42,9 @@{% endfor %}</ul>{% else %}- <p class="not-found grey-text">{% trans "No locations found." context "Empty stock location list message" %}</p>+ <div class="not-found">+ <p class="grey-text">{% trans "No locations found." context "Empty stock location list message" %}</p>+ </div>{% endif %}</div></div>diff --git a/templates/dashboard/shipping/method_list.html b/templates/dashboard/shipping/method_list.htmlindex 85f04da9af..cc9c0519c0 100644--- a/templates/dashboard/shipping/method_list.html+++ b/templates/dashboard/shipping/method_list.html@@ -58,7 +58,10 @@</div>{% include "dashboard/includes/_pagination.html" %}{% else %}- <p class="not-found grey-text">{% trans "No shipping methods found." context "Empty Shipping methods table" %}</p>+ <div class="not-found">+ <p class="grey-text">{% trans "No shipping methods found." context "Empty Shipping methods table" %}</p>+ <a href="{% url 'dashboard:shipping-method-add' %}" class="btn btn-flat primary" title="{% trans "Add method" context "Shipping method list add button text" %}">{% trans "Add new shipping method" context "Empty shipping methods table add button" %}</a>+ </div>{% endif %}{% endblock %}