Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Add zero pages to list views
dominik-zeglen86fdf41aed82
diff --git a/saleor/static/dashboard/scss/components/_buttons.scss b/saleor/static/dashboard/scss/components/_buttons.scssindex c080263274..9e49165ddf 100644--- a/saleor/static/dashboard/scss/components/_buttons.scss+++ b/saleor/static/dashboard/scss/components/_buttons.scss@@ -46,5 +46,19 @@@extend .btn-floating;@extend .btn-large;}+ &-presentation {+ @extend .btn-fab-default;+ @extend .fixed-action-btn;+ position: relative;+ top: -.1rem;+ right: 0;+ width: 2rem;+ height: 2rem;+ line-height: 1.8rem;+ padding-top: 0;+ margin: 0 .2rem;+ pointer-events: none;+ cursor: unset;+ }}}diff --git a/saleor/static/dashboard/scss/components/_zero_page.scss b/saleor/static/dashboard/scss/components/_zero_page.scssnew file mode 100644index 0000000000..cee7da72fc--- /dev/null+++ b/saleor/static/dashboard/scss/components/_zero_page.scss@@ -0,0 +1,12 @@+.zero-page {+ padding: 3rem;+ &__title {+ font-weight: 400;+ font-size: 2rem;+ margin-bottom: 1rem;+ }+ &__content {+ font-size: 1.2rem;+ color: $grey-color;+ }+}diff --git a/saleor/static/dashboard/scss/dashboard.scss b/saleor/static/dashboard/scss/dashboard.scssindex e0763df555..b42f659552 100644--- a/saleor/static/dashboard/scss/dashboard.scss+++ b/saleor/static/dashboard/scss/dashboard.scss@@ -22,6 +22,7 @@@import "components/search";@import "components/tabs";@import "components/timeline";+@import "components/zero_page";@import "layouts/search-results";@import "layouts/style-guide";diff --git a/templates/dashboard/base_zero_page.html b/templates/dashboard/base_zero_page.htmlnew file mode 100644index 0000000000..a168d18324--- /dev/null+++ b/templates/dashboard/base_zero_page.html@@ -0,0 +1,8 @@+<div class="card zero-page">+ <div class="card-content">+ <div class="zero-page__title">+ {% block title %}{% endblock %}+ </div>+ <div class="zero-page__content">{% block content %}{% endblock %}</div>+ </div>+</div>diff --git a/templates/dashboard/category/list.html b/templates/dashboard/category/list.htmlindex 083750a062..07b6cb8a02 100644--- a/templates/dashboard/category/list.html+++ b/templates/dashboard/category/list.html@@ -45,47 +45,61 @@{% block content %}<div class="row"><div class="col s12 l9">- <div class="card">- <div class="data-table-container">- <table class="bordered highlight responsive data-table data-table-description">- <thead>- <tr>- {% get_sort_by_toggle 'name' as toggle %}- <th class="{% if toggle.is_active %}active{% endif %}">- <a href="{{ toggle.url }}">- <svg data-src="{{ toggle.sorting_icon }}" />- {% trans "Name" context "Category list table header name" %}- </a>- </th>- {% get_sort_by_toggle 'description' as toggle %}- <th class="wide {% if toggle.is_active %}active{% endif %}">- <a href="{{ toggle.url }}">- <svg data-src="{{ toggle.sorting_icon }}" />- {% trans "Description" context "Category list table header description" %}- </a>- </th>- </tr>- </thead>- <tbody>- {% for node in categories %}- <tr data-action-go="{% url 'dashboard:category-detail' pk=node.pk %}">- <td>- {{ node.name }}- </td>- <td class="nowrap">- {% if node.description %}- {{ node.description|truncatewords:10 }}- {% else %}- - {% endif %}- </td>+ {% if categories %}+ <div class="card">+ <div class="data-table-container">+ <table class="bordered highlight responsive data-table data-table-description">+ <thead>+ <tr>+ {% get_sort_by_toggle 'name' as toggle %}+ <th class="{% if toggle.is_active %}active{% endif %}">+ <a href="{{ toggle.url }}">+ <svg data-src="{{ toggle.sorting_icon }}" />+ {% trans "Name" context "Category list table header name" %}+ </a>+ </th>+ {% get_sort_by_toggle 'description' as toggle %}+ <th class="wide {% if toggle.is_active %}active{% endif %}">+ <a href="{{ toggle.url }}">+ <svg data-src="{{ toggle.sorting_icon }}" />+ {% trans "Description" context "Category list table header description" %}+ </a>+ </th></tr>- {% endfor %}- </tbody>- </table>+ </thead>+ <tbody>+ {% for node in categories %}+ <tr data-action-go="{% url 'dashboard:category-detail' pk=node.pk %}">+ <td>+ {{ node.name }}+ </td>+ <td class="nowrap">+ {% if node.description %}+ {{ node.description|truncatewords:10 }}+ {% else %}+ + {% endif %}+ </td>+ </tr>+ {% endfor %}+ </tbody>+ </table>+ </div></div>- </div>- {% paginate categories %}+ {% paginate categories %}+ {% else %}+ {% if is_empty %}+ {% include 'dashboard/category/zero_page.html' %}+ {% else %}+ <div class="col s12">+ <div class="not-found">+ <p class="grey-text">+ {% trans "No categories found." context "Empty category list message" %}+ </p>+ </div>+ </div>+ {% endif %}+ {% endif %}</div><div class="col s12 l3" id="filters">{% add_filters filter %}diff --git a/templates/dashboard/category/zero_page.html b/templates/dashboard/category/zero_page.htmlnew file mode 100644index 0000000000..d261b65cef--- /dev/null+++ b/templates/dashboard/category/zero_page.html@@ -0,0 +1,11 @@+{% extends 'dashboard/base_zero_page.html' %}+{% load i18n %}+{% load static %}++{% block title %}{% trans "You don't have any categories configured in your store" %}{% endblock %}+{% block content %}+ {% static "dashboard/images/add.svg" as img_path %}+ {% blocktrans %}+ Categories let you organize your products. You can create your first category using circular <span class="btn-fab-presentation"><svg data-src="{{ img_path }}" /></span> button.+ {% endblocktrans %}+{% endblock %}diff --git a/templates/dashboard/discount/sale/list.html b/templates/dashboard/discount/sale/list.htmlindex a3e0bf46d6..be964cec82 100644--- a/templates/dashboard/discount/sale/list.html+++ b/templates/dashboard/discount/sale/list.html@@ -37,29 +37,29 @@{% block content %}<div class="row"><div class="col s12 l9">- <div class="card">- <div class="data-table-container">- <table class="bordered highlight responsive data-table last-right-align">- <thead>- <tr>- {% get_sort_by_toggle 'name' as toggle %}- <th class="wide {% if toggle.is_active %}active{% endif %}">- <a href="{{ toggle.url }}">- <svg data-src="{{ toggle.sorting_icon }}" />- {% trans "Name" context "Sale (discount) table header" %}- </a>- </th>- {% get_sort_by_toggle 'value' as toggle %}- <th class="wide {% if toggle.is_active %}active{% endif %}">- <a href="{{ toggle.url }}">- <svg data-src="{{ toggle.sorting_icon }}" />- {% trans "Discount" context "Sale (discount) table header" %}- </a>- </th>- </tr>- </thead>- <tbody>- {% if sales %}+ {% if sales %}+ <div class="card">+ <div class="data-table-container">+ <table class="bordered highlight responsive data-table last-right-align">+ <thead>+ <tr>+ {% get_sort_by_toggle 'name' as toggle %}+ <th class="wide {% if toggle.is_active %}active{% endif %}">+ <a href="{{ toggle.url }}">+ <svg data-src="{{ toggle.sorting_icon }}" />+ {% trans "Name" context "Sale (discount) table header" %}+ </a>+ </th>+ {% get_sort_by_toggle 'value' as toggle %}+ <th class="wide {% if toggle.is_active %}active{% endif %}">+ <a href="{{ toggle.url }}">+ <svg data-src="{{ toggle.sorting_icon }}" />+ {% trans "Discount" context "Sale (discount) table header" %}+ </a>+ </th>+ </tr>+ </thead>+ <tbody>{% for sale in sales %}<tr data-action-go="{% if perms.sale.edit_sale %}{% url 'dashboard:sale-update' pk=sale.pk %}{% endif %}"><td>@@ -70,23 +70,27 @@</td></tr>{% endfor %}- {% else %}- <tr>- <td>- <span>- {% trans "No sales found" context "Empty sales table message" %}- </span>- </td>- </tr>- {% endif %}- </tbody>- </table>+ </tbody>+ </table>+ </div></div>- </div>- {% paginate sales %}+ {% paginate sales %}+ {% else %}+ {% if is_empty %}+ {% include 'dashboard/discount/sale/zero_page.html' %}+ {% else %}+ <div class="col s12">+ <div class="not-found">+ <p class="grey-text">+ {% trans "No sales found" context "Empty sales table 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/discount/sale/zero_page.html b/templates/dashboard/discount/sale/zero_page.htmlnew file mode 100644index 0000000000..d8d7e7d8fb--- /dev/null+++ b/templates/dashboard/discount/sale/zero_page.html@@ -0,0 +1,11 @@+{% extends 'dashboard/base_zero_page.html' %}+{% load i18n %}+{% load static %}++{% block title %}{% trans "You don't have any sales in your store" %}{% endblock %}+{% block content %}+ {% static "dashboard/images/add.svg" as img_path %}+ {% blocktrans %}+ Sales allow you to temporarily lower price on certain products. You can create your first sale using circular <span class="btn-fab-presentation"><svg data-src="{{ img_path }}" /></span> button.+ {% endblocktrans %}+{% endblock %}diff --git a/templates/dashboard/discount/voucher/list.html b/templates/dashboard/discount/voucher/list.htmlindex 74d56a37da..20bb8b5e8e 100644--- a/templates/dashboard/discount/voucher/list.html+++ b/templates/dashboard/discount/voucher/list.html@@ -38,112 +38,114 @@{% block content %}<div class="row"><div class="col s12 l9">+ {% if vouchers %}<div class="card"><div class="data-table-container"><table class="bordered highlight responsive data-table last-right-align">- {% if vouchers %}- <thead>- <tr>- {% get_sort_by_toggle 'name' as toggle %}- <th class="wide {% if toggle.is_active %}active{% endif %}">+ <thead>+ <tr>+ {% get_sort_by_toggle 'name' as toggle %}+ <th class="wide {% if toggle.is_active %}active{% endif %}">+ <a href="{{ toggle.url }}">+ <svg data-src="{{ toggle.sorting_icon }}" />+ {% trans "Name" context "Voucher table header" %}+ </a>+ </th>+ {% get_sort_by_toggle 'discount_value' as toggle %}+ <th class="wide {% if toggle.is_active %}active{% endif %}"><a href="{{ toggle.url }}"><svg data-src="{{ toggle.sorting_icon }}" />- {% trans "Name" context "Voucher table header" %}+ {% trans "Discount" context "Voucher table header" %}</a>- </th>- {% get_sort_by_toggle 'discount_value' as toggle %}- <th class="wide {% if toggle.is_active %}active{% endif %}">- <a href="{{ toggle.url }}">- <svg data-src="{{ toggle.sorting_icon }}" />- {% trans "Discount" context "Voucher table header" %}- </a>- </th>- <th>- {% trans "Apply to" context "Voucher table header" %}- </th>- {% get_sort_by_toggle 'start_date' as toggle %}- <th class="wide {% if toggle.is_active %}active{% endif %}">- <a href="{{ toggle.url }}">- <svg data-src="{{ toggle.sorting_icon }}" />- {% trans "Start date" context "Voucher table header" %}- </a>- </th>- {% get_sort_by_toggle 'end_date' as toggle %}- <th class="wide {% if toggle.is_active %}active{% endif %}">- <a href="{{ toggle.url }}">- <svg data-src="{{ toggle.sorting_icon }}" />- {% trans "End date" context "Voucher table header" %}- </a>- </th>- {% get_sort_by_toggle 'used' as toggle %}- <th class="wide {% if toggle.is_active %}active{% endif %}">- <a href="{{ toggle.url }}">- <svg data-src="{{ toggle.sorting_icon }}" />- {% trans "Used" context "Voucher table header" %}- </a>- </th>- {% get_sort_by_toggle 'limit' as toggle %}- <th class="wide {% if toggle.is_active %}active{% endif %}">- <a href="{{ toggle.url }}">- <svg data-src="{{ toggle.sorting_icon }}" />- {% trans "Limit" context "Voucher table header" %}- </a>- </th>- </tr>- </thead>- {% for voucher in vouchers %}- <tbody>- <tr data-action-go="{% if perms.voucher.edit_voucher %}{% url 'dashboard:voucher-update' pk=voucher.pk %}{% endif %}">- <td>- {{ voucher }}- </td>- <td class="right-align">- {{ voucher.discount_value }} <span class="currency">{{ voucher.get_discount_value_type_display }}</span>- </td>- <td>- {{ voucher.get_apply_to_display|default_if_none:"-" }}- </td>- <td>- {{ voucher.start_date }}- </td>- <td>- {{ voucher.end_date|default_if_none:"-" }}- </td>- <td class="right-align">- {% if voucher.usage_limit or voucher.usage_limit == 0 %}- {{ voucher.used }}/{{ voucher.usage_limit }}- {% else %}- {{ voucher.used }}- {% endif %}- </td>- <td class="right-align">- {% if voucher.limit %}- {% gross voucher.limit html=True %}- {% else %}- -- {% endif %}- </td>- </tr>- </tbody>- {% endfor %}- {% else %}+ </th>+ <th>+ {% trans "Apply to" context "Voucher table header" %}+ </th>+ {% get_sort_by_toggle 'start_date' as toggle %}+ <th class="wide {% if toggle.is_active %}active{% endif %}">+ <a href="{{ toggle.url }}">+ <svg data-src="{{ toggle.sorting_icon }}" />+ {% trans "Start date" context "Voucher table header" %}+ </a>+ </th>+ {% get_sort_by_toggle 'end_date' as toggle %}+ <th class="wide {% if toggle.is_active %}active{% endif %}">+ <a href="{{ toggle.url }}">+ <svg data-src="{{ toggle.sorting_icon }}" />+ {% trans "End date" context "Voucher table header" %}+ </a>+ </th>+ {% get_sort_by_toggle 'used' as toggle %}+ <th class="wide {% if toggle.is_active %}active{% endif %}">+ <a href="{{ toggle.url }}">+ <svg data-src="{{ toggle.sorting_icon }}" />+ {% trans "Used" context "Voucher table header" %}+ </a>+ </th>+ {% get_sort_by_toggle 'limit' as toggle %}+ <th class="wide {% if toggle.is_active %}active{% endif %}">+ <a href="{{ toggle.url }}">+ <svg data-src="{{ toggle.sorting_icon }}" />+ {% trans "Limit" context "Voucher table header" %}+ </a>+ </th>+ </tr>+ </thead>+ {% for voucher in vouchers %}<tbody>- <tr>+ <tr data-action-go="{% if perms.voucher.edit_voucher %}{% url 'dashboard:voucher-update' pk=voucher.pk %}{% endif %}">+ <td>+ {{ voucher }}+ </td>+ <td class="right-align">+ {{ voucher.discount_value }} <span class="currency">{{ voucher.get_discount_value_type_display }}</span>+ </td>+ <td>+ {{ voucher.get_apply_to_display|default_if_none:"-" }}+ </td><td>- <span>- {% trans "No vouchers found" context "Empty vouchers table message" %}- </span>+ {{ voucher.start_date }}+ </td>+ <td>+ {{ voucher.end_date|default_if_none:"-" }}+ </td>+ <td class="right-align">+ {% if voucher.usage_limit or voucher.usage_limit == 0 %}+ {{ voucher.used }}/{{ voucher.usage_limit }}+ {% else %}+ {{ voucher.used }}+ {% endif %}+ </td>+ <td class="right-align">+ {% if voucher.limit %}+ {% gross voucher.limit html=True %}+ {% else %}+ -+ {% endif %}</td></tr></tbody>- {% endif %}+ {% endfor %}</table></div></div>{% paginate vouchers %}+ {% else %}+ {% if is_empty %}+ {% include 'dashboard/discount/voucher/zero_page.html' %}+ {% else %}+ <div class="col s12">+ <div class="not-found">+ <p class="grey-text">+ {% trans "No vouchers found" context "Empty vouchers table 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/discount/voucher/zero_page.html b/templates/dashboard/discount/voucher/zero_page.htmlnew file mode 100644index 0000000000..8c878c22aa--- /dev/null+++ b/templates/dashboard/discount/voucher/zero_page.html@@ -0,0 +1,11 @@+{% extends 'dashboard/base_zero_page.html' %}+{% load i18n %}+{% load static %}++{% block title %}{% trans "You don't have any vouchers configured in your store" %}{% endblock %}+{% block content %}+ {% static "dashboard/images/add.svg" as img_path %}+ {% blocktrans %}+ Vouchers are codes that allow your customers to get discount. You can create your first voucher using circular <span class="btn-fab-presentation"><svg data-src="{{ img_path }}" /></span> button.+ {% endblocktrans %}+{% endblock %}diff --git a/templates/dashboard/group/list.html b/templates/dashboard/group/list.htmlindex 4376276373..58ba11892a 100644--- a/templates/dashboard/group/list.html+++ b/templates/dashboard/group/list.html@@ -74,15 +74,21 @@</div>{% paginate groups %}{% else %}- <div class="card-content card-content--no-data not-found">- <p class="grey-text">- {% trans "No groups found." context "Empty group table message" %}- </p>- </div>+ {% if is_empty %}+ {% include 'dashboard/group/zero_page.html' %}+ {% else %}+ <div class="col s12">+ <div class="not-found">+ <p class="grey-text">+ {% trans "No groups found." context "Empty group table 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/group/zero_page.html b/templates/dashboard/group/zero_page.htmlnew file mode 100644index 0000000000..6e676b0f68--- /dev/null+++ b/templates/dashboard/group/zero_page.html@@ -0,0 +1,11 @@+{% extends 'dashboard/base_zero_page.html' %}+{% load i18n %}+{% load static %}++{% block title %}{% trans "You don't have any groups configured in your store" %}{% endblock %}+{% block content %}+ {% static "dashboard/images/add.svg" as img_path %}+ {% blocktrans %}+ Groups allow you to grant permissions to dashboard users. You can create your first group using circular <span class="btn-fab-presentation"><svg data-src="{{ img_path }}" /></span> button.+ {% endblocktrans %}+{% endblock %}diff --git a/templates/dashboard/product/list.html b/templates/dashboard/product/list.htmlindex 0670ed2b28..0e2ef82bf8 100644--- a/templates/dashboard/product/list.html+++ b/templates/dashboard/product/list.html@@ -117,22 +117,21 @@</div>{% paginate products %}{% else %}- <div class="col s12">- <div class="not-found">- <p class="grey-text">- {% trans "No products found." context "Empty product list message" %}- </p>- {% if not product_classes %}+ {% if is_empty %}+ {% include 'dashboard/product/zero_page.html' %}+ {% else %}+ <div class="col s12">+ <div class="not-found"><p class="grey-text">- {% trans "Create product type first." context "Empty product list without product types message" %}+ {% trans "No products found." context "Empty product list message" %}</p>- {% endif %}+ </div></div>- </div>+ {% endif %}{% endif %}</div><div class="col s12 l3" id="filters">- {% add_filters filter %}+ {% if False %}{% add_filters filter %}{% endif %}</div></div>{% endblock %}diff --git a/templates/dashboard/product/product_attribute/list.html b/templates/dashboard/product/product_attribute/list.htmlindex de868581ea..3eb6a921b2 100644--- a/templates/dashboard/product/product_attribute/list.html+++ b/templates/dashboard/product/product_attribute/list.html@@ -71,15 +71,21 @@</div>{% paginate attributes %}{% else %}- <div class="not-found">- <p class="grey-text">- {% trans "No attributes found." context "Empty attribute list message" %}- </p>- </div>+ {% if is_empty %}+ {% include 'dashboard/product/product_attribute/zero_page.html' %}+ {% else %}+ <div class="col s12">+ <div class="not-found">+ <p class="grey-text">+ {% trans "No attributes found." context "Empty attribute 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/product/product_attribute/zero_page.html b/templates/dashboard/product/product_attribute/zero_page.htmlnew file mode 100644index 0000000000..cd71f7a883--- /dev/null+++ b/templates/dashboard/product/product_attribute/zero_page.html@@ -0,0 +1,11 @@+{% extends 'dashboard/base_zero_page.html' %}+{% load i18n %}+{% load static %}++{% block title %}{% trans "You don't have any product types" %}{% endblock %}+{% block content %}+ {% static "dashboard/images/add.svg" as img_path %}+ {% blocktrans %}+ Product attributes blahblahblah. You can add your first product attribute using circular <span class="btn-fab-presentation"><svg data-src="{{ img_path }}" /></span> button.+ {% endblocktrans %}+{% endblock %}diff --git a/templates/dashboard/product/product_class/list.html b/templates/dashboard/product/product_class/list.htmlindex 7ed5e0fdd7..c4bb3b0c63 100644--- a/templates/dashboard/product/product_class/list.html+++ b/templates/dashboard/product/product_class/list.html@@ -86,15 +86,21 @@</div>{% paginate product_classes %}{% else %}- <div class="not-found">- <p class="grey-text">- {% trans "No product types found." context "Empty product type list message" %}- </p>- </div>+ {% if is_empty %}+ {% include 'dashboard/product/product_class/zero_page.html' %}+ {% else %}+ <div class="col s12">+ <div class="not-found">+ <p class="grey-text">+ {% trans "No product types found." context "Empty product type 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><div id="modal-product-class" class="modal">diff --git a/templates/dashboard/product/product_class/zero_page.html b/templates/dashboard/product/product_class/zero_page.htmlnew file mode 100644index 0000000000..f65ec66f1e--- /dev/null+++ b/templates/dashboard/product/product_class/zero_page.html@@ -0,0 +1,11 @@+{% extends 'dashboard/base_zero_page.html' %}+{% load i18n %}+{% load static %}++{% block title %}{% trans "You don't have any product types" %}{% endblock %}+{% block content %}+ {% static "dashboard/images/add.svg" as img_path %}+ {% blocktrans %}+ Product types allow you to distinguish cups from cars. You can add your first product type using circular <span class="btn-fab-presentation"><svg data-src="{{ img_path }}" /></span> button.+ {% endblocktrans %}+{% endblock %}diff --git a/templates/dashboard/product/stock_location/list.html b/templates/dashboard/product/stock_location/list.htmlindex d5c6d4ef14..df22b096c3 100644--- a/templates/dashboard/product/stock_location/list.html+++ b/templates/dashboard/product/stock_location/list.html@@ -62,11 +62,17 @@</div>{% paginate locations %}{% else %}- <div class="not-found">- <p class="grey-text">- {% trans "No locations found." context "Empty stock location list message" %}- </p>- </div>+ {% if is_empty %}+ {% include 'dashboard/product/stock_location/zero_page.html' %}+ {% else %}+ <div class="col s12">+ <div class="not-found">+ <p class="grey-text">+ {% trans "No locations found." context "Empty stock location list message" %}+ </p>+ </div>+ </div>+ {% endif %}{% endif %}</div></div>diff --git a/templates/dashboard/product/stock_location/zero_page.html b/templates/dashboard/product/stock_location/zero_page.htmlnew file mode 100644index 0000000000..60b03bacc6--- /dev/null+++ b/templates/dashboard/product/stock_location/zero_page.html@@ -0,0 +1,11 @@+{% extends 'dashboard/base_zero_page.html' %}+{% load i18n %}+{% load static %}++{% block title %}{% trans "You don't have any stock locations configured in your store" %}{% endblock %}+{% block content %}+ {% static "dashboard/images/add.svg" as img_path %}+ {% blocktrans %}+ Stock locations are places where you store your products. You can create your first stock location using circular <span class="btn-fab-presentation"><svg data-src="{{ img_path }}" /></span> button.+ {% endblocktrans %}+{% endblock %}diff --git a/templates/dashboard/product/zero_page.html b/templates/dashboard/product/zero_page.htmlnew file mode 100644index 0000000000..4d5bced7ad--- /dev/null+++ b/templates/dashboard/product/zero_page.html@@ -0,0 +1,16 @@+{% extends 'dashboard/base_zero_page.html' %}+{% load i18n %}+{% load static %}++{% block title %}{% trans "You don't have any products in your store" %}{% endblock %}+{% block content %}+ {% static "dashboard/images/add.svg" as img_path %}+ {% blocktrans %}+ You know what products are for, do you? You can create your first product using circular <span class="btn-fab-presentation"><svg data-src="{{ img_path }}" /></span> button.+ {% endblocktrans %}+ {% if not product_classes %}+ <p>+ {% trans "Create product type first." context "Empty product list without product types message" %}+ </p>+ {% endif %}+{% endblock %}diff --git a/templates/dashboard/shipping/list.html b/templates/dashboard/shipping/list.htmlindex 930fb3e4a8..f1534e3b41 100644--- a/templates/dashboard/shipping/list.html+++ b/templates/dashboard/shipping/list.html@@ -82,19 +82,23 @@</table></div></div>+ {% paginate shipping_methods %}{% else %}- <div class="col s12">- <div class="not-found">- <p class="grey-text">- {% trans "No Shipping methods found" context "Empty Shipping methods table message" %}- </p>+ {% if is_empty %}+ {% include 'dashboard/shipping/zero_page.html' %}+ {% else %}+ <div class="col s12">+ <div class="not-found">+ <p class="grey-text">+ {% trans "No shipping methods found." context "Empty shipping list message" %}+ </p>+ </div></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>- {% paginate shipping_methods %}{% endblock %}diff --git a/templates/dashboard/shipping/zero_page.html b/templates/dashboard/shipping/zero_page.htmlnew file mode 100644index 0000000000..44a748b52f--- /dev/null+++ b/templates/dashboard/shipping/zero_page.html@@ -0,0 +1,16 @@+{% extends 'dashboard/base_zero_page.html' %}+{% load i18n %}+{% load static %}++{% block title %}{% trans "You don't have any shipping methods in your store" %}{% endblock %}+{% block content %}+ {% static "dashboard/images/add.svg" as img_path %}+ {% blocktrans %}+ You know what products are for, do you? You can create your first product using circular <span class="btn-fab-presentation"><svg data-src="{{ img_path }}" /></span> button.+ {% endblocktrans %}+ {% if not product_classes %}+ <p>+ {% trans "Create product type first." context "Empty product list without product types message" %}+ </p>+ {% endif %}+{% endblock %}diff --git a/templates/dashboard/staff/list.html b/templates/dashboard/staff/list.htmlindex ded1c7c5b6..376b5c1ed7 100644--- a/templates/dashboard/staff/list.html+++ b/templates/dashboard/staff/list.html@@ -94,17 +94,23 @@</table></div></div>+ {% paginate staff %}{% 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/staff/zero_page.html' %}+ {% else %}+ <div class="col s12">+ <div class="not-found">+ <p class="grey-text">+ {% trans "No staff members found." context "Empty staff table message" %}+ </p>+ </div>+ </div>+ {% endif %}{% endif %}- {% paginate staff %}</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/staff/zero_page.html b/templates/dashboard/staff/zero_page.htmlnew file mode 100644index 0000000000..5e9350ec5c--- /dev/null+++ b/templates/dashboard/staff/zero_page.html@@ -0,0 +1,11 @@+{% extends 'dashboard/base_zero_page.html' %}+{% load i18n %}+{% load static %}++{% block title %}{% trans "You don't have any staff members" %}{% endblock %}+{% block content %}+ {% static "dashboard/images/add.svg" as img_path %}+ {% blocktrans %}+ Staff are dashboard users. You can add your first staff member using circular <span class="btn-fab-presentation"><svg data-src="{{ img_path }}" /></span> button.+ {% endblocktrans %}+{% endblock %}