Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Add views for empty tables in details views
Marcin Gębalad50c72df3bef
diff --git a/templates/dashboard/product/product_detail.html b/templates/dashboard/product/product_detail.htmlindex 1d0d7e5324..98040ff37e 100644--- a/templates/dashboard/product/product_detail.html+++ b/templates/dashboard/product/product_detail.html@@ -113,6 +113,10 @@<td class="right-align">{% gross variant.get_price_per_item %}</td><td><a href="{% url 'dashboard:variant-update' product_pk=product.pk variant_pk=variant.pk %}" class="btn btn-flat">{% trans "Edit" %}</a></td></tr>+ {% empty %}+ <tr>+ <td colspan="5">{% trans "No variants found" context "Dashboard product details page" %}</td>+ </tr>{% endfor %}</tbody></table>diff --git a/templates/dashboard/product/variant_details.html b/templates/dashboard/product/variant_details.htmlindex 1b1eb06071..090c7ac7cd 100644--- a/templates/dashboard/product/variant_details.html+++ b/templates/dashboard/product/variant_details.html@@ -98,6 +98,10 @@<td>{{ stock_item.quantity_allocated }}</td><td class="right-align">{% if stock_item.cost_price %}{% gross stock_item.cost_price %}{% else %}-{% endif %}</td></tr>+ {% empty %}+ <tr>+ <td colspan="4">{% trans "No stock records found" context "Dashboard variant details page" %}</td>+ </tr>{% endfor %}</tbody></table>