Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Improve order details
Paweł Kowalewskie344413866cd
diff --git a/saleor/core/templates/status_label.html b/saleor/core/templates/status_label.htmlindex c602efe174..44b83998a5 100644--- a/saleor/core/templates/status_label.html+++ b/saleor/core/templates/status_label.html@@ -1 +1 @@-<span class="{{ label_cls }}-text">{{ status }}</span>+<span class="data-table-status data-table-status--{{ label_cls }}">{{ status }}</span>diff --git a/saleor/dashboard/templates/dashboard/includes/_address.html b/saleor/dashboard/templates/dashboard/includes/_address.htmlindex 719b30eb3b..0fad440ead 100644--- a/saleor/dashboard/templates/dashboard/includes/_address.html+++ b/saleor/dashboard/templates/dashboard/includes/_address.html@@ -7,6 +7,6 @@<div>{{ address.postal_code }}</div><div>{{ address.city }}, {{ address.get_country_display }}</div>{% if address.phone %}- <div><span class="glyphicon glyphicon-earphone"></span> <a href="tel:{{ address.phone }}">{{ address.phone }}</a></div>+ <div><span class="mdi-hardware-phone-android"></span> <a href="tel:{{ address.phone }}">{{ address.phone }}</a></div>{% endif %}</div>diff --git a/saleor/dashboard/templates/dashboard/order/detail.html b/saleor/dashboard/templates/dashboard/order/detail.htmlindex 34fecbe794..4e53528722 100644--- a/saleor/dashboard/templates/dashboard/order/detail.html+++ b/saleor/dashboard/templates/dashboard/order/detail.html@@ -8,204 +8,269 @@{% block body_class %}body-orders{% endblock %}-{% block page_title %}{% trans "Order" %} {{ order }}{% endblock %}+{% block header_menu %}+ {% url "dashboard:orders" as url %}+ {% include "dashboard/includes/_back-link.html" with url=url %}+{% endblock %}++{% block breadcrumbs %}+ <ul class="breadcrumbs">+ <li><a href="{% url "dashboard:orders" %}">{% trans "Orders" %}</a></li>+ <li>{{ order }}</li>+ </ul>+{% endblock %}++{% block menu_sales_class %} active{% endblock %}{% block content %}-<ul class="tabs" role="tablist">- <li role="presentation" class="tab"><a href="#order-details" role="tab" data-toggle="tab" class="active">{% trans "Contents" %}</a></li>- <li role="presentation" class="tab"><a href="#payment-history" role="tab" data-toggle="tab">{% trans "Payments" %}</a></li>- <li role="presentation" class="tab"><a href="#order-history" role="tab" data-toggle="tab">{% trans "History" %}</a></li>-</ul>-<div class="tab-content">- <div role="tabpanel" class="tab-pane active" id="order-details">- <br>{# workaround to avoid the first panel sticking to the tabs #}- <div class="row">- <div class="col l8">- {% for group in groups %}- <div class="panel panel-default">- <div class="panel-heading">- <span class="panel-title">{% blocktrans with shipment=group.id %}Shipment #{{ shipment }}{% endblocktrans %} <span class="pull-right">{% render_status group.status group.get_status_display %}</span></span>- </div>- <table class="table">- <thead>+ <div class="row">+ <div class="col s12">+ <ul class="tabs" role="tablist">+ <li role="presentation" class="tab">+ <a href="#order-details" role="tab" class="active">{% trans "Contents" %}</a>+ </li>++ <li role="presentation" class="tab">+ <a href="#payment-history" role="tab">{% trans "Payments" %}</a>+ </li>++ <li role="presentation" class="tab">+ <a href="#order-history" role="tab">{% trans "History" %}</a>+ </li>+ </ul>+ </div>+ </div>++ <div class="row tab-content" id="order-details">+ <div class="col s12 l8">+ {% for group in groups %}+ <div class="card">+ <div class="data-table-header">+ <h5 class="data-table-title">+ {% blocktrans with shipment=group.id %}Shipment #{{ shipment }}{% endblocktrans %}+ {% render_status group.status group.get_status_display %}+ </h5>+ </div>+ <table class="bordered hoverable responsive data-table">+ <thead>+ <tr>+ <th>{% trans "Item" %}</th>+ <th class="right-align">{% trans "Price" %}</th>+ <th class="right-align">{% trans "Quantity" %}</th>+ <th class="right-align">{% trans "Total" %}</th>+ <th class=""></th>+ </tr>+ </thead>++ <tfoot>+ {% if group.shipping_price.gross or group.is_shipping_required %}<tr>- <th class="col s5">{% trans "Item" %}</th>- <th class="col s2 right-align">{% trans "Price" %}</th>- <th class="col s2 right-align">{% trans "Quantity" %}</th>- <th class="col s2 right-align">{% trans "Total" %}</th>- <th class="col s1"></th>+ <td colspan="3" class="">+ {% trans "Shipping" %} ({{ order.shipping_method }})+ </td>+ <td class="right-align">+ {% gross group.shipping_price %}+ </td>+ <td class="right-align">+ {% if group.is_shipping_required %}+ <a href="#base-modal" data-href="{% url 'dashboard:ship-delivery-group' pk=group.pk %}"+ {% if not group.can_ship %} disabled{% endif %} class="modal-trigger-custom">+ <i class="mdi-maps-local-shipping"></i> {% trans "Ship" %}+ </a>+ {% endif %}+ </td></tr>- </thead>- <tfoot>- {% if group.shipping_price.gross or group.is_shipping_required %}- <tr>- <td colspan="3" class="col s9">- {% trans "Shipping" %} ({{ order.shipping_method }})- </td>- <td class="right-align col s2">- {% gross group.shipping_price %}- </td>- <td class="right-align col s1">- {% if group.is_shipping_required %}- <a data-target="#base-modal" href="{% url 'dashboard:ship-delivery-group' pk=group.pk %}" data-toggle="modal" {% if not group.can_ship %}disabled{% endif %}><i class="mdi-maps-local-shipping"></i> {% trans "Ship" %}</a>- {% endif %}- </td>- </tr>- {% endif %}+ {% endif %}+ <tr>+ <td colspan="3">{% trans "Total" %}</td>+ <td class="right-align">+ <strong>{% gross group.get_total %}</strong>+ </td>+ <td></td>+ </tr>+ </tfoot>++ <tbody>+ {% for item in group.items.all %}<tr>- <th colspan="3" class="col s9">{% trans "Total" %}</th>- <td class="right-align col s2">- <strong>{% gross group.get_total %}</strong>+ <td>+ {% if item.product %}<a href="{% url "dashboard:product-update" pk=item.product.id %}">{{ item.product_name }}</a>{% else %}{{ item.product_name }}{% endif %}<br>+ <strong>SKU:</strong> {{ item.product_sku }}+ </td>+ <td class="right-align">{% gross item.get_price_per_item %}</td>+ <td class="right-align">{{ item.quantity }}</td>+ <td class="right-align">{% gross item.get_total %}</td>+ <td class="right-align">+ <a href="#base-modal" data-href="{% url 'dashboard:order-line-edit' pk=item.pk %}" class="modal-trigger-custom"+ {% if group.status != 'new' %} disabled{% endif %} title="{% trans "Edit" %}">+ <i class="mdi-content-create"></i>+ </a></td>- <td class="col s1"></td></tr>- </tfoot>- <tbody>- {% for item in group.items.all %}- <tr>- <td class="col s5">- {% if item.product %}<a href="{% url "dashboard:product-update" pk=item.product.id %}">{{ item.product_name }}</a>{% else %}{{ item.product_name }}{% endif %}<br>- <strong>SKU:</strong> {{ item.product_sku }}- </td>- <td class="right-align col s2">{% gross item.get_price_per_item %}</td>- <td class="right-align col s2">{{ item.quantity }}</td>- <td class="right-align col s2">{% gross item.get_total %}</td>- <td class="right-align col s1">- <a data-target="#base-modal" href="{% url 'dashboard:order-line-edit' pk=item.pk %}" data-toggle="modal" {% if group.status != 'new' %}disabled{% endif %} title="{% trans "Edit" %}"><i class="mdi-content-create"></i></a>- </td>- </tr>- {% endfor %}- </tbody>- </table>- </div>- {% endfor %}+ {% endfor %}+ </tbody>+ </table>+ </div>+ {% endfor %}- <div class="alert alert-success">- <p>{% trans "Order total" %}: <strong>{% gross order.get_total %}</strong></p>+ <div class="card-panel green lighten-4">+ <span>{% trans "Order total" %}: <strong>{% gross order.get_total %}</strong></span>+ </div>++ <div class="card">+ <div class="card-content">+ <span class="card-title black-text">{% trans "Manage payment" %}</span>++ {% if payment %}+ <p>{% trans "Preauthorized amount:" %} {% if preauthorized %}{% gross preauthorized %}{% else %}{% trans "N/A" %}{% endif %}</p>+ {% if captured %}+ <p>{% trans "Captured amount" %}: {% gross captured %}</p>+ {% endif %}+ {% if refunded %}+ <p>{% trans "Refunded amount" %}: {% gross refunded %}</p>+ {% endif %}+ {% else %}+ <small>{% trans "There are no payments assigned with this order." %}</small>+ {% endif %}</div>- <div class="panel panel-default">- <div class="panel-heading"><span class="panel-title">{% trans "Manage payment" %}</span></div>- <div class="panel-body">- {% if payment %}- <p>{% trans "Preauthorized amount:" %} {% if preauthorized %}{% gross preauthorized %}{% else %}{% trans "N/A" %}{% endif %}</p>- {% if captured %}- <p>{% trans "Captured amount" %}: {% gross captured %}</p>- {% endif %}- {% if refunded %}- <p>{% trans "Refunded amount" %}: {% gross refunded %}</p>- {% endif %}- {% if can_capture %}- <a class="btn btn-success" data-target="#base-modal" href="{% url 'dashboard:manage-payment' pk=payment.pk action='capture' %}" data-toggle="modal">{% trans "Capture" %}</a>- {% elif can_refund %}- <a class="btn btn-danger" data-target="#base-modal" href="{% url 'dashboard:manage-payment' pk=payment.pk action='refund' %}" data-toggle="modal">{% trans "Refund" %}</a>- {% endif %}- {% if can_release %}- <a class="btn btn-danger" data-target="#base-modal" href="{% url 'dashboard:manage-payment' pk=payment.pk action='release' %}" data-toggle="modal">{% trans "Release" %}</a>- {% endif %}- {% else %}- <small>{% trans "There are no payments assigned with this order." %}</small>+ {% if payment %}+ <div class="card-action">+ {% if can_capture %}+ <a href="#base-modal" data-href="{% url 'dashboard:manage-payment' pk=payment.pk action='capture' %}"+ class="modal-trigger-custom">{% trans "Capture" %}</a>+ {% elif can_refund %}+ <a href="#base-modal" data-href="{% url 'dashboard:manage-payment' pk=payment.pk action='refund' %}"+ class="modal-trigger-custom">{% trans "Refund" %}</a>+ {% endif %}+ {% if can_release %}+ <a href="#base-modal" data-href="{% url 'dashboard:manage-payment' pk=payment.pk action='release' %}"+ class="modal-trigger-custom">{% trans "Release" %}</a>{% endif %}</div>+ {% endif %}+ </div>++ <div class="card" id="order-notes">+ <div class="card-content">+ <span class="card-title black-text">+ Order notes+ </span>++ {% if notes %}+ <ul class="list">+ {% for note in notes %}+ <li class="list-item list-item--spaced">+ <small class="list-item-author">{{ note.user }} - {{ note.date }}</small>+ <p>{{ note.content }}</p>+ </li>+ {% endfor %}+ </ul>+ {% else %}+ <small>{% trans "There are no notes associated with this order." %}</small>+ {% endif %}</div>- <div class="card grey lighten-4" id="order-notes">- <div class="card-content">- <span class="card-title black-text">- Order notes- </span>- <span class="right">- <a data-toggle="collapse" href="#add-order-note"><i class="mdi-content-add"></i> Add note</a>- </span>-- {% if notes %}- <ul class="list-unstyled">- {% for note in notes %}- <li>- <small>{{ note.user }} - {{ note.date }}</small>- <p>{{ note.content }}</p>- </li>- {% endfor %}- </ul>- {% else %}- <small>{% trans "There are no notes associated with this order." %}</small>- {% endif %}- <div id="add-order-note" class="collapse">- <form class="row" role="form" method="post">- {% csrf_token %}++ <div class="card-action">+ <a class="modal-trigger" href="#add-order-note">Add note</a>+ </div>++ <div id="add-order-note" class="modal">+ <form role="form" method="post">+ {% csrf_token %}++ <div class="modal-content">+ <h5>{% trans "Add note" %}</h5>++ <div class="row">{{ note_form|materializecss }}- <div class="col s12">- <button name='note_form' type="submit" class="btn btn-success"><i class="mdi-content-save"></i> {% trans "Save note" %}</button>- </div>- </form>+ </div></div>- </div>++ <div class="modal-footer">+ <button type="submit" class="modal-action btn-flat blue-text">{% trans "Save note" %}</button>+ <a href="#!" class="modal-action modal-close btn-flat blue-text">{% trans "Cancel" %}</a>+ </div>+ </form></div></div>- <div class="col l4">- <div class="card grey lighten-3">- <div class="card-content">- <span class="card-title black-text">Order summary</span>-- <p>Order date: {{ order.created }}</p>- <p>Order status: {% render_status order.status order.get_status_display %}</p>- <p>Payment status: {% if payment %}{% render_status payment.status payment.get_status_display %}{% else %}{% trans "N/A" %}{% endif %}</p>+ </div>++ <div class="col s12 l4">+ <div class="card grey lighten-4">+ <div class="card-content">+ <span class="card-title black-text">Order summary</span>++ <p>Order date: {{ order.created }}</p>+ <p>Order status: {% render_status order.status order.get_status_display %}</p>+ <p>Payment status: {% if payment %}{% render_status payment.status payment.get_status_display %}{% else %}{% trans "N/A" %}{% endif %}</p>+ </div>+ </div>++ <div class="card grey lighten-4">+ <div class="card-content">+ <span class="card-title black-text">{% trans "Customer" %}</span>++ <div class="address">+ {% if order.user %}+ <div>{% trans "Account" %}: <a href="{% url "dashboard:customer-details" pk=order.user.pk %}">{{ order.user }}</a></div>+ {% else %}+ <div>{% trans "Account" %}: {% trans "Guest" %}</div>+ {% endif %}</div></div>- <div class="card grey lighten-3">- <div class="card-content">- <span class="card-title black-text">{% trans "Customer" %}</span>-- <div class="address">- {% if order.user %}- <div>{% trans "Account" %}: <a href="{% url "dashboard:customer-details" pk=order.user.pk %}">{{ order.user }}</a></div>- {% else %}- <div>{% trans "Account" %}: {% trans "Guest" %}</div>- {% endif %}+ </div>++ <div class="card grey lighten-4">+ <div class="card-content">+ {% with order.billing_address as address %}+ <span class="card-title black-text">{% trans "Billing address" %}</span>++ {% include 'dashboard/includes/_address.html' with address=address only %}+ <div>+ <i class="mdi-content-mail"></i> <a href="mailto:{{ order.get_user_email }}">{{ order.get_user_email }}</a></div>- </div>+ {% endwith %}</div>- <div class="card grey lighten-3">- <div class="card-content">- {% with order.billing_address as address %}- <span class="card-title black-text">{% trans "Billing address" %}</span>- <span class="right"><a href="{% url "dashboard:address-edit" order_pk=order.pk address_type="billing" %}"><i class="mdi-content-create"></i> Edit</a></span>++ <div class="card-action">+ <a href="{% url "dashboard:address-edit" order_pk=order.pk address_type="billing" %}">Edit</a>+ </div>+ </div>++ {% with order.shipping_address as address %}+ {% if address %}+ <div class="card grey lighten-4">+ <div class="card-content">+ <span class="card-title black-text">{% trans "Shipping address" %}</span>{% include 'dashboard/includes/_address.html' with address=address only %}+<div><i class="mdi-content-mail"></i> <a href="mailto:{{ order.get_user_email }}">{{ order.get_user_email }}</a></div></div>- {% endwith %}- </div>- </div>- {% with order.shipping_address as address %}- {% if address %}- <div class="card grey lighten-3">- <div class="card-content">- <span class="panel-title">{% trans "Shipping address" %}</span>- <span class="pull-right"><a href="{% url "dashboard:address-edit" order_pk=order.pk address_type="shipping" %}"><i class="mdi-content-create"></i> Edit</a></span>- </div>- <div class="panel-body">- {% include 'dashboard/includes/_address.html' with address=address only %}- <div>- <i class="mdi-content-mail"></i> <a href="mailto:{{ order.get_user_email }}">{{ order.get_user_email }}</a>- </div>- </div>++ <div class="card-action">+ <a href="{% url "dashboard:address-edit" order_pk=order.pk address_type="shipping" %}">Edit</a></div>- {% endif %}- {% endwith %}- </div>+ </div>+ {% endif %}+ {% endwith %}</div></div>- <div role="tabpanel" class="tab-pane" id="payment-history">- <table class="table">+++ <div class="card tab-content" id="payment-history">+ <table class="bordered hoverable responsive data-table"><thead><tr>- <th class="col-sm-2">{% trans "Number" %}</th>- <th class="col-sm-3">{% trans "Date" %}</th>- <th class="col-sm-7">{% trans "Payment status" %}</th>+ <th></th>+ <th>{% trans "Date" %}</th>+ <th class="wide">{% trans "Payment status" %}</th></tr></thead>+<tbody>{% for payment in order.payments.all %}<tr>@@ -217,16 +282,18 @@</tbody></table></div>- <div role="tabpanel" class="tab-pane" id="order-history">- <table class="table">++ <div class="card tab-content" id="order-history">+ <table class="bordered hooverable responsive data-table"><thead><tr>- <th class="col-sm-3">Date</th>- <th class="col-sm-3">Order status</th>- <th class="col-sm-2">User</th>- <th class="col-sm-4">Comment</th>+ <th>Date</th>+ <th>Order status</th>+ <th>User</th>+ <th class="wide">Comment</th></tr></thead>+<tbody>{% for event in order.history.all %}<tr>@@ -243,23 +310,6 @@</tbody></table></div>-</div>-<div id="base-modal" class="modal">- <div class="modal-dialog">- <div class="modal-content"></div>- </div>-</div>--{% endblock %}-{% block custom_js %}-{{ block.super }}-<script>- $('#base-modal').on('hide.bs.modal', function(e) {- $(this).removeData();- });- $(function() {- $(".address-details").popover();- });-</script>+ <div id="base-modal" class="modal"></div>{% endblock %}diff --git a/saleor/dashboard/templates/dashboard/order/modal_capture_refund.html b/saleor/dashboard/templates/dashboard/order/modal_capture_refund.htmlindex 1ea0dbc4b7..e023d62905 100644--- a/saleor/dashboard/templates/dashboard/order/modal_capture_refund.html+++ b/saleor/dashboard/templates/dashboard/order/modal_capture_refund.html@@ -3,32 +3,25 @@{% load bootstrap %}{% load prices_i18n %}-<div class="modal-header">- <a href="#" data-dismiss="modal" aria-hidden="true" class="close">×</a>- <h3>{{ action|capfirst }} {% trans "payment" %}</h3>-</div>-<div class="modal-body">- <form id="modal-form" class="form-inline" role="form" method="post" action="{% url 'dashboard:manage-payment' pk=payment.pk action=action %}">- {% csrf_token %}- <div class="form-group">- <label class="control-label" for="amount">{% blocktrans %}Amount to {{ action }}:{% endblocktrans %}</label>- {% render_widget form.amount class="form-control" %} {{ currency }}- </div>- </form>- <p>{% trans "Before this action" %}</p>- <ul>- <li>{% trans "Order total: " %}{% gross payment.order.get_total %}</li>- <li>{% trans "Captured amount: " %}{{ captured|currencyfmt:currency }} </li>- </ul>-</div>-<div class="modal-footer">- <button id="id_btn_yes" type="submit" class="btn btn-{% if action == 'capture' %}success{% else%}danger{% endif %}">{{ action|capfirst }}</button>- <button data-dismiss="modal" aria-hidden="true" class="btn btn-default">{% trans "Cancel" %}</button>-</div>+<form role="form" method="post" action="{% url 'dashboard:manage-payment' pk=payment.pk action=action %}">+ {% csrf_token %}+ <div class="modal-content">+ <h5>{{ action|capfirst }} {% trans "payment" %}</h5>-<script>-$('#id_btn_yes').click(function() {- $('#modal-form').submit();-});-</script>\ No newline at end of file+ <label class="control-label" for="amount">{% blocktrans %}Amount to {{ action }}:{% endblocktrans %}</label>+ {% render_widget form.amount class="form-control" %} {{ currency }}++ <p>{% trans "Before this action" %}</p>++ <ul>+ <li>{% trans "Order total: " %}{% gross payment.order.get_total %}</li>+ <li>{% trans "Captured amount: " %}{{ captured|currencyfmt:currency }} </li>+ </ul>+ </div>++ <div class="modal-footer">+ <button type="submit" class="modal-action btn-flat{% if action == 'capture' %} blue-text{% else %} red-text{% endif %}">{{ action|capfirst }}</button>+ <a href="#!" aria-hidden="true" class="modal-action modal-close btn-flat blue-text">{% trans "Cancel" %}</a>+ </div>+</form>diff --git a/saleor/dashboard/templates/dashboard/order/modal_order_line_edit.html b/saleor/dashboard/templates/dashboard/order/modal_order_line_edit.htmlindex b1e1ba0f14..549e3a6439 100644--- a/saleor/dashboard/templates/dashboard/order/modal_order_line_edit.html+++ b/saleor/dashboard/templates/dashboard/order/modal_order_line_edit.html@@ -1,28 +1,24 @@{% load i18n %}{% load bootstrap %}+{% load materializecss %}- {% csrf_token %}- <div class="modal-header">- <a href="#" data-dismiss="modal" aria-hidden="true" class="close">×</a>- <h3>{% trans "Edit order line " %}{{ object.product }} ({{ object }})</h3>- </div>- <div class="modal-body">- <form class="form-inline" method="post" role="form" action="{% url 'dashboard:order-line-edit' pk=object.pk action='change_quantity' %}">- {% csrf_token %}- <div class="form-group">- <span>{% trans "Change quantity: " %}{% render_widget change_quantity_form.quantity class="form-control input-sm" %}- <button type="submit" class="btn btn-default btn-sm">OK</button></span>- </div>- </form>- <hr />- <form class="form-inline" method="post" role="form" action="{% url 'dashboard:order-line-edit' pk=object.pk action='move_items' %}">- {% csrf_token %}- <div class="form-group">- <span>Move {% render_widget move_items_form.how_many class="form-control input-sm" %} items to delivery group: {% render_widget move_items_form.groups class="form-control input-sm" %}- <button type="submit" class="btn btn-default btn-sm">OK</button></span>- </div>- </form>- </div>- <div class="modal-footer">- <button data-dismiss="modal" aria-hidden="true" class="btn btn-default">{% trans "Cancel" %}</button>- </div>\ No newline at end of file+<div class="modal-content">+ <h5>{% trans "Edit order line " %}{{ object.product }} ({{ object }})</h5>++ <form class="form-inline" method="post" role="form" action="{% url 'dashboard:order-line-edit' pk=object.pk action='change_quantity' %}">+ {% csrf_token %}+ <span>{% trans "Change quantity: " %}{% render_widget change_quantity_form.quantity class="form-control input-sm" %}+ <button type="submit" class="btn-flat teal-text">OK</button></span>+ </form>+++ <form class="form-inline" method="post" role="form" action="{% url 'dashboard:order-line-edit' pk=object.pk action='move_items' %}">+ {% csrf_token %}+ <span>Move {% render_widget move_items_form.how_many class="form-control input-sm" %} items to delivery group: {% render_widget move_items_form.groups class="form-control input-sm" %}+ <button type="submit" class="btn-flat teal-text">OK</button></span>+ </form>+</div>++<div class="modal-footer">+ <a href="#!" aria-hidden="true" class="modal-action modal-close btn-flat blue-text">{% trans "Cancel" %}</a>+</div>diff --git a/saleor/dashboard/templates/dashboard/order/modal_release.html b/saleor/dashboard/templates/dashboard/order/modal_release.htmlindex 2122e660e5..2f3c3992b1 100644--- a/saleor/dashboard/templates/dashboard/order/modal_release.html+++ b/saleor/dashboard/templates/dashboard/order/modal_release.html@@ -1,17 +1,17 @@{% load i18n %}{% load bootstrap %}-<div class="modal-header">- <a href="#" data-dismiss="modal" aria-hidden="true" class="close">×</a>- <h3>{% trans "Release payment" %}</h3>-</div>-<div class="modal-body">+<div class="modal-content">+ <h5>{% trans "Release payment" %}</h5>+<p>{% trans "Do you want to release the payment?" %}</p></div>+<div class="modal-footer">- <form id="release-form" class="form-inline" method="post" role="form" action="{% url 'dashboard:manage-payment' pk=payment.pk action=action %}">+ <form id="release-form" method="post" role="form" action="{% url 'dashboard:manage-payment' pk=payment.pk action=action %}">{% csrf_token %}- <button type="submit" class="btn btn-danger">{% trans "Release" %}</button>- <button data-dismiss="modal" aria-hidden="true" class="btn btn-default">{% trans "Cancel" %}</button>++ <button type="submit" class="modal-action btn-flat red-text">{% trans "Release" %}</button>+ <a href="#!" aria-hidden="true" class="modal-action modal-close btn-flat blue-text">{% trans "Cancel" %}</a></form>-</div>\ No newline at end of file+</div>diff --git a/saleor/dashboard/templates/dashboard/order/modal_ship_delivery_group.html b/saleor/dashboard/templates/dashboard/order/modal_ship_delivery_group.htmlindex ac05a598ea..bdd99774a4 100644--- a/saleor/dashboard/templates/dashboard/order/modal_ship_delivery_group.html+++ b/saleor/dashboard/templates/dashboard/order/modal_ship_delivery_group.html@@ -1,18 +1,16 @@{% load i18n %}-{% load bootstrap %}-<div class="modal-header">- <a href="#" data-dismiss="modal" aria-hidden="true" class="close">×</a>- <h3>{% trans "Ship delivery group " %}#{{ group.pk }}</h3>-</div>-<div class="modal-body">- <span>{% trans "Ship selected delivery group to the following address:" %}</span>+<div class="modal-content">+ <h5>{% trans "Ship delivery group " %}#{{ group.pk }}</h5>++ <p>{% trans "Ship selected delivery group to the following address:" %}</p>{% include 'dashboard/includes/_address.html' with address=group.order.shipping_address only %}</div>+<div class="modal-footer">- <form id="ship-delivery-group-form" class="form-inline" method="post" role="form" action="{% url 'dashboard:ship-delivery-group' pk=group.pk %}">+ <form id="ship-delivery-group-form" method="post" role="form" action="{% url 'dashboard:ship-delivery-group' pk=group.pk %}">{% csrf_token %}- <button type="submit" class="btn btn-success">{% trans "Ship" %}</button>- <button data-dismiss="modal" aria-hidden="true" class="btn btn-default">{% trans "Cancel" %}</button>+ <button type="submit" class="modal-action btn-flat blue-text">{% trans "Ship" %}</button>+ <a href="#!" aria-hidden="true" class="modal-action modal-close btn-flat blue-text">{% trans "Cancel" %}</a></form></div>diff --git a/saleor/dashboard/templates/dashboard/product/product_form.html b/saleor/dashboard/templates/dashboard/product/product_form.htmlindex db8835e476..6b31fd40c4 100644--- a/saleor/dashboard/templates/dashboard/product/product_form.html+++ b/saleor/dashboard/templates/dashboard/product/product_form.html@@ -43,26 +43,29 @@<div class="row"><div class="col s12"><ul class="tabs">- <li class="tab col s3">- <a href="#details" class="active">+ <li class="tab col s3" role="presentation">+ <a href="#details" class="active" role="tab"><span>{% trans "Details" %}</span><i class="mdi-content-create"></i></a></li>- <li class="tab col s3">- <a href="#variants">++ <li class="tab col s3" role="presentation">+ <a href="#variants" role="tab"><span>{% trans "Variants" %}</span><i class="mdi-image-style"></i></a></li>- <li class="tab col s3">- <a href="#stock">++ <li class="tab col s3" role="presentation">+ <a href="#stock" role="tab"><span>{% trans "Stock" %}</span><i class="mdi-action-store"></i></a></li>- <li class="tab col s3">- <a href="#images">++ <li class="tab col s3" role="presentation">+ <a href="#images" role="tab"><span>{% trans "Images" %}</span><i class="mdi-image-collections"></i></a>diff --git a/saleor/static/js_src/dashboard.js b/saleor/static/js_src/dashboard.jsindex ecdcc33397..ce7e21280d 100644--- a/saleor/static/js_src/dashboard.js+++ b/saleor/static/js_src/dashboard.js@@ -22,6 +22,21 @@ $(document).ready(function() {var breadcrumbsItemWidth = ($breadcrumbs.width() - $breadcrumbs.find('li:first').width()) / $breadcrumbsItems.length;$breadcrumbsItems.css('max-width', breadcrumbsItemWidth).dotdotdot({'height': 50});}++ var $orderModal = $('#base-modal');+ if ($orderModal) {+ $('.modal-trigger-custom').on('click', function (e) {+ $.ajax({+ url: $(this).data('href'),+ method: 'get',+ success: function (response) {+ $orderModal.html(response).openModal();+ }+ });++ e.preventDefault();+ });+ }});Dropzone.options.productImageForm = {paramName: "image",diff --git a/saleor/static/scss/widget/_card.scss b/saleor/static/scss/widget/_card.scssindex 4580a20bfe..42fd3431d7 100644--- a/saleor/static/scss/widget/_card.scss+++ b/saleor/static/scss/widget/_card.scss@@ -1,6 +1,7 @@@mixin card {& &-content {.card-title {+ display: block;line-height: 28px;margin-bottom: 10px;}diff --git a/saleor/static/scss/widget/_data-table.scss b/saleor/static/scss/widget/_data-table.scssindex b7b4ab00eb..da9473a443 100644--- a/saleor/static/scss/widget/_data-table.scss+++ b/saleor/static/scss/widget/_data-table.scss@@ -2,6 +2,34 @@&-header {padding: 21px 24px;}++ &-title {+ margin: 0;++ .data-table-status {+ float: right;+ margin-top: -4px;+ }+ }++ $statuses-map: (+ danger: map-get($red, base),+ success: map-get($green, lighten-2),+ default: map-get($grey, base)+ );++ &-status {+ @each $status in (danger, success, default) {+ &--#{$status} {+ color: white;+ background: #{map_get($statuses-map, $status)};+ border-radius: 2px;+ padding: .25em 5px;+ font-size: .8em;+ }+ }+ }+input[type=checkbox].filled-in + label {margin-top: 5px;padding: 0;@@ -37,6 +65,10 @@height: 56px;}+ tfoot {+ font-weight: bold;+ }+.bulk-checkbox {padding: 0 24px;width: 1px;diff --git a/saleor/static/scss/widget/_list.scss b/saleor/static/scss/widget/_list.scssindex 0b97b38af9..ecd6903447 100644--- a/saleor/static/scss/widget/_list.scss+++ b/saleor/static/scss/widget/_list.scss@@ -69,6 +69,14 @@&-prefix {color: initial;}++ &-author {+ color: map_get($grey, base);+ }++ &--spaced {+ margin-bottom: 5px;+ }}&--attributes {