Skip to content

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

Merge branch 'master' into better-dashboard

Marcin Gębala75d76c6fbc82
diff --cc saleor/static/scss/dashboard/dashboard.scss
index 36b2da5405,8348c738f1..e575b18506
--- a/saleor/static/scss/dashboard/dashboard.scss
+++ b/saleor/static/scss/dashboard/dashboard.scss
@@@ -184,38 -358,24 +184,46 @@@ $roboto-font-path: "~materialize-css/fo
color: $primary-color;
}
+.currency {
+ @extend .grey-text;
+ font-size: 12px;
+ font-weight: normal;
+}
+
+html {
+ background: #f5f5f5;
+ @media only screen and (min-width: 0) {
+ font-size: 14px;
+ }
+
+ @media only screen and (min-width: $large-screen) {
+ font-size: 13px;
+ }
+}
+
+h6 {
+ @extend .grey-text;
+ font-size: 13px;
+}
+
+ li#version-indicator {
+ position: absolute;
+ bottom: 0;
+ p {
+ @extend .grey-text, .text-lighten-1;
+ }
+ }
+
-
-
-@import "widget/breadcrumbs";
-@import "widget/card";
-@import "widget/data-table";
-@import "widget/dropzone";
-@import "widget/form";
-@import "widget/list";
-@import "widget/product-gallery";
-@import "widget/ppoi";
-@import "widget/select2";
-@import "widget/tabs";
-@import "widget/toast";
+@import "components/breadcrumbs";
+@import "components/card";
+@import "components/data-table";
+@import "components/dropzone";
+@import "components/form";
+@import "components/formset";
+@import "components/list";
+@import "components/nav";
+@import "components/product-gallery";
+@import "components/ppoi";
+@import "components/select2";
+@import "components/tabs";
+@import "components/toast";
diff --cc templates/checkout/details.html
index c129eb6da9,ce571b8536..ca4c05c413
--- a/templates/checkout/details.html
+++ b/templates/checkout/details.html
@@@ -66,10 -68,10 +68,10 @@@
</div>
<div class="row checkout__review__section">
<div class="col-8">
- <h3>{% trans "Total" %}</h3>
+ <h3>{% trans "Total" context "Order review section title" %}</h3>
</div>
<div class="col-4">
- <h3 class="float-right">{% gross total %}</h3>
+ <h3 class="float-right">{% gross total html=True %}</h3>
</div>
</div>
</div>
diff --cc templates/dashboard/base.html
index 9072b4ee42,34fdbfea64..61a32a7105
--- a/templates/dashboard/base.html
+++ b/templates/dashboard/base.html
@@@ -110,7 -90,35 +108,12 @@@
{% trans "Site settings" context "Dashboard side navigation link" %}</a></li>
</ul>
</li>
+ {% if request.user.is_superuser %}
+ <li class="side-nav-section" id="version-indicator">
+ <p>{% trans "Release" context "Dashboard software version" %}: {% version %}</p>
+ </li>
+ {% endif %}
</ul>
- <ul>
- <li class="menu-toggle">
- <ul class="left">
- <li><a href="#" id="open-menu" class="show-on-large"><i class="material-icons">menu</i></a></li>
- <li><a href="#" id="close-menu" class="show-on-large hide"><i class="material-icons">clear</i></a></li>
- <li><a href="{% url 'dashboard:index' %}" class="logo">
- <img src="{% static "images/dashboard-logo.svg" %}" alt="Saleor">
- </a></li>
- <li class="search">
- {% if SEARCH_IS_ENABLED %}
- <form method="get" action="{% url "dashboard:search" %}" class="hide-on-small-only">
- <div class="input-field">
- <input id="search" type="search" class="validate" placeholder="{% trans "Order, product, customer" context "Dashboard search placeholder" %}" name="q" value="{% if query %}{{ query }}{% endif %}">
- <button type="submit" class="right search-icon">
- <i class="material-icons">search</i>
- </button>
- </div>
- </form>
- {% endif %}
- </li>
- </ul>
- </li>
- </ul>
</div>
</nav>
</header>
diff --cc templates/dashboard/index.html
index 059c449925,46093e731a..5383abb0a2
--- a/templates/dashboard/index.html
+++ b/templates/dashboard/index.html
@@@ -7,44 -7,9 +7,9 @@@
{% block content %}
<div class="row">
<div class="col s12">
- <div class="card">
- <div class="data-table-header{% if not preauthorized_payments %} data-table-header--no-data{% endif %}">
- <span class="data-table-title">{% trans "Preauthorized payments" context "Dashboard homepage table title" %}</span>
- </div>
-
- {% if preauthorized_payments %}
- <div class="data-table-container">
- <table class="bordered responsive data-table">
- <thead>
- <tr>
- <th>{% trans "Order" context "Preauthorized payments table header" %}</th>
- <th>{% trans "Date" context "Preauthorized payments table header" %}</th>
- <th>{% trans "Customer" context "Preauthorized payments table header" %}</th>
- <th class="right-align">{% trans "Amount" context "Preauthorized payments table header" %}</th>
- </tr>
- </thead>
- <tbody>
- {% for payment in preauthorized_payments %}
- <tr>
- <td><a href="{% url "dashboard:order-details" order_pk=payment.order.pk %}">{{ payment.order }}</a></td>
- <td>{{ payment.created }}</td>
- <td>{{ payment.order.user|default:_("Guest") }}</td>
- <td class="right-align">{% gross payment.get_total_price html=True %}</td>
- </tr>
- {% endfor %}
- </tbody>
- </table>
- </div>
- {% else %}
- <div class="card-content card-content--no-data">
- <p>{% trans "No preauthorized payments." context "Empty Preauthorized payments table message" %}</p>
- </div>
- {% endif %}
- </div>
-
<div class="card">
<div class="data-table-header{% if not orders_to_ship %} data-table-header--no-data{% endif %}">
- <span class="card-title black-text">
+ <span class="data-table-title">
{% trans "Orders ready for shipment" context "Dashboard homepage table title" %}
</span>
</div>
@@@ -57,42 -21,23 +21,40 @@@
</div>
{% endif %}
</div>
-
<div class="card">
- <div class="card-content">
- <span class="card-title black-text">{% trans "Products with low stock" context "Dashboard homepage table title" %}</span>
- {% if low_stock %}
- <ul class="list">
- {% for product in low_stock %}
- <li class="list-item">
- <a class="list-item-name list-item-name--single" href="{% url "dashboard:product-update" pk=product.pk %}#stock">
- {{ product }} ({{ product.total_stock }})
- </a>
- </li>
- {% endfor %}
- </ul>
- {% else %}
- <p>{% trans "No products are low in stock." context "Empty low stock table message" %}</p>
- {% endif %}
+ <div class="data-table-header{% if not preauthorized_payments %} data-table-header--no-data{% endif %}">
+ <span class="data-table-title">{% trans "Products with low stock" context "Dashboard homepage table title" %}</span>
</div>
-
+ {% if low_stock %}
+ <div class="data-table-container">
+ <table class="bordered responsive data-table">
+ <thead>
+ <tr>
+ <th>{% trans "Product name" context "Low stock product list" %}</th>
+ <th class="right-align">{% trans "Stock left" context "Low stock product list" %}</th>
+ </tr>
+ </thead>
+ <tbody>
+ {% for product in low_stock %}
+ <tr>
+ <td>
+ <a class="list-item-name list-item-name--single" href="{% url "dashboard:product-update" pk=product.pk %}#stock">
+ {{ product }}
+ </a>
+ </td>
+ <td class="right-align">
+ {{ product.total_stock }}
+ </td>
+ </tr>
+ {% endfor %}
+ </tbody>
+ </table>
+ </div>
+ {% else %}
+ <div class="card-content card-content--no-data">
+ <p>{% trans "No products are low in stock." context "Empty low stock table message" %}</p>
+ </div>
+ {% endif %}
</div>
</div>
</div>
diff --cc templates/dashboard/order/detail.html
index b377a1138e,4f63751ed3..6f0100bb50
--- a/templates/dashboard/order/detail.html
+++ b/templates/dashboard/order/detail.html
@@@ -389,12 -387,14 +390,14 @@@
{% if all_payments %}
<div class="card">
<div class="data-table-container">
- <table class="bordered hoverable responsive data-table">
+ <table class="bordered highlight responsive data-table">
<thead>
<tr>
- <th></th>
+ <th>{% trans "Transaction ID" context "Payment history table header" %}</th>
<th>{% trans "Date" context "Payment history table header" %}</th>
- <th class="wide">{% trans "Payment status" context "Payment history table header" %}</th>
+ <th>{% trans "Payment status" context "Payment history table header" %}</th>
+ <th>{% trans "Fraud status" context "Payment history table header" %}</th>
+ <th>{% trans "Amount" context "Payment history table header" %}</th>
</tr>
</thead>
diff --cc templates/dashboard/product/attributes/form.html
index 47e569d31e,d6c1638fe9..b7e6067976
--- a/templates/dashboard/product/attributes/form.html
+++ b/templates/dashboard/product/attributes/form.html
@@@ -66,14 -62,14 +66,14 @@@
{% for form in formset.forms %}
{% if forloop.first %}
<thead>
- <tr>
- {% for field in form.visible_fields %}
- <th>{{ field.label|capfirst }}</th>
- {% endfor %}
- </tr>
+ <tr>
+ {% for field in form.visible_fields %}
+ <th>{{ field.label|capfirst }}</th>
+ {% endfor %}
+ </tr>
</thead>
{% endif %}
- <tr>
+ <tr {% if form.non_field_errors %}class="materialize-red-text"{% endif %}>
{% for field in form.visible_fields %}
<td{% if forloop.last %} class="center-align"{% endif %}>
{% if forloop.first %}