Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Unify the dashboard's look and feel
Patryk Zawadzkif7e80a78e4d8
diff --git a/saleor/dashboard/templates/dashboard/base.html b/saleor/dashboard/templates/dashboard/base.htmlindex d093c2bf28..7299cdc89d 100644--- a/saleor/dashboard/templates/dashboard/base.html+++ b/saleor/dashboard/templates/dashboard/base.html@@ -46,9 +46,11 @@</nav><div id="page-wrapper">- <div class="row">- {% include "dashboard/includes/_messages.html" %}- </div>+ {% if messages %}+ <div class="row">+ {% include "dashboard/includes/_messages.html" %}+ </div>+ {% endif %}{% block content %}{% endblock %}diff --git a/saleor/dashboard/templates/dashboard/customer/detail.html b/saleor/dashboard/templates/dashboard/customer/detail.htmlindex 4c08bf11fc..8e591bf701 100644--- a/saleor/dashboard/templates/dashboard/customer/detail.html+++ b/saleor/dashboard/templates/dashboard/customer/detail.html@@ -21,8 +21,8 @@<table class="table"><thead><tr>- <th>{% trans "Order" %}</th>- <th>{% trans "Date" %}</th>+ <th>{% trans "Number" %}</th>+ <th>{% trans "Placed on" %}</th><th>{% trans "Payment" %}</th><th>{% trans "Order status" %}</th><th>{% trans "Total" %}</th>@@ -50,10 +50,9 @@<div class="col-lg-4"><div class="panel panel-default"><div class="panel-heading">- <span class="panel-title">{% trans "Address" %}</span>+ <span class="panel-title">{% trans "Default billing address" %}</span></div><div class="panel-body">- <small>Default billing address</small><div>{% if customer.default_billing_address %}{% with customer.default_billing_address.address as address %}@@ -63,7 +62,13 @@<span>No default billing address</span>{% endif %}</div>- <small>Default shipping address</small>+ </div>+ </div>+ <div class="panel panel-default">+ <div class="panel-heading">+ <span class="panel-title">{% trans "Default shipping address" %}</span>+ </div>+ <div class="panel-body"><div>{% if customer.default_shipping_address %}{% with customer.default_shipping_address.address as address %}@@ -74,7 +79,7 @@{% endif %}</div><div>- <i class="glyphicon glyphicon-envelope"></i> {{ customer.email }}+ <i class="glyphicon glyphicon-envelope"></i> <a href="mailto:{{ customer.email }}">{{ customer.email }}</a></div></div></div>diff --git a/saleor/dashboard/templates/dashboard/customer/list.html b/saleor/dashboard/templates/dashboard/customer/list.htmlindex ea826cdb93..aa615cfe1f 100644--- a/saleor/dashboard/templates/dashboard/customer/list.html+++ b/saleor/dashboard/templates/dashboard/customer/list.html@@ -8,80 +8,86 @@{% block title %}{% trans "Customers" %} - {{ block.super }}{% endblock %}{% block content %}- <h1 class="page-header">{% trans "Customers" %}</h1>+<div class="row">+ <div class="col-lg-12">+ <h1 class="page-header">{% trans "Customers" %}</h1>+ </div>+</div>- <div class="row">- <div class="col-lg-12">+<div class="row">+ <div class="col-lg-12">- <div class="panel panel-default">- <div class="panel-heading">{% trans "Search customers" %}</div>- <div class="panel-body">- <form method="get" class="form-inline">- <div class="form-group">- <label class="control-label"for="amount">{% trans "Email" %}</label>- {% render_widget form.email class="form-control" %}- </div>- <div class="form-group">- <label class="control-label"for="amount">{% trans "Name" %}</label>- {% render_widget form.name class="form-control" %}- </div>- <button type="submit" class="btn btn-default"><i class="glyphicon glyphicon-search"></i> Search</button>- <a href="{% url 'dashboard:customers' %}">Clear</a>- </form>- </div>+ <div class="panel panel-default">+ <div class="panel-heading">{% trans "Search customers" %}</div>+ <div class="panel-body">+ <form method="get" class="form-inline">+ <div class="form-group">+ <label class="control-label"for="amount">{% trans "Email" %}</label>+ {% render_widget form.email class="form-control" %}+ </div>+ <div class="form-group">+ <label class="control-label"for="amount">{% trans "Name" %}</label>+ {% render_widget form.name class="form-control" %}+ </div>+ <button type="submit" class="btn btn-default"><i class="glyphicon glyphicon-search"></i> Search</button>+ {% if form.is_bound %}+ <a class="btn btn-default" href="{% url 'dashboard:customers' %}"><i class="glyphicon glyphicon-remove"></i> {% trans "Clear" %}</a>+ {% endif %}+ </form></div>+ </div>- <div class="panel panel-default">- <div class="panel-heading">- <span class="panel-title">{{ title }}</span>- </div>- <div class="panel-body">- {% if customers %}- <table class="table">- <thead>- <tr>- <th>{% trans "Email" %}</th>- <th>{% trans "Name" %}</th>- <th>{% trans "Location" %}</th>- <th>{% trans "Number of orders" %}</th>- <th>{% trans "Last order" %}</th>- </tr>- </thead>- <tbody>- {% for customer in customers %}- <tr>- {% with customer.default_billing_address.address as default_address %}- <td>- <a href="{% url "dashboard:customer-details" pk=customer.pk %}">{{ customer.email }}</a>- </td>- <td>- {{ default_address.first_name }} {{ default_address.last_name }}- </td>- <td>- {{ default_address.city }}, {{ default_address.get_country_display }}- </td>- {% endwith %}- <td>- {{ customer.num_orders }}- </td>- <td>- {% if customer.last_order %}- <a href="{% url 'dashboard:order-details' pk=customer.last_order %}">{{ customer.last_order }}</a>- {% else %}- -- {% endif %}- </td>- </tr>- {% endfor %}- </tbody>- </table>- {% include "dashboard/includes/_pagination.html" with page_obj=customers %}- {% else %}- <span>No customers found</span>- {% endif %}- </div>+ <div class="panel panel-default">+ <div class="panel-heading">+ <span class="panel-title">{{ title }}</span>+ </div>+ <div class="panel-body">+ {% if customers %}+ <table class="table">+ <thead>+ <tr>+ <th class="col-sm-2">{% trans "Email" %}</th>+ <th class="col-sm-4">{% trans "Name" %}</th>+ <th class="col-sm-2">{% trans "Location" %}</th>+ <th class="col-sm-2 text-right">{% trans "Number of orders" %}</th>+ <th class="col-sm-2">{% trans "Last order" %}</th>+ </tr>+ </thead>+ <tbody>+ {% for customer in customers %}+ <tr>+ {% with customer.default_billing_address.address as default_address %}+ <td>+ <a href="{% url "dashboard:customer-details" pk=customer.pk %}">{{ customer.email }}</a>+ </td>+ <td>+ {{ default_address.first_name }} {{ default_address.last_name }}+ </td>+ <td>+ {{ default_address.city }}, {{ default_address.get_country_display }}+ </td>+ {% endwith %}+ <td class="text-right">+ {{ customer.num_orders }}+ </td>+ <td>+ {% if customer.last_order %}+ <a href="{% url 'dashboard:order-details' pk=customer.last_order %}">#{{ customer.last_order }}</a>+ {% else %}+ {% trans "N/A" %}+ {% endif %}+ </td>+ </tr>+ {% endfor %}+ </tbody>+ </table>+ {% include "dashboard/includes/_pagination.html" with page_obj=customers %}+ {% else %}+ <span>No customers found</span>+ {% endif %}</div></div></div>+</div>{% endblock %}diff --git a/saleor/dashboard/templates/dashboard/includes/_address.html b/saleor/dashboard/templates/dashboard/includes/_address.htmlindex a2a689cb90..719b30eb3b 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>{{ address.phone }}</div>+ <div><span class="glyphicon glyphicon-earphone"></span> <a href="tel:{{ address.phone }}">{{ address.phone }}</a></div>{% endif %}</div>diff --git a/saleor/dashboard/templates/dashboard/includes/_orders_table.html b/saleor/dashboard/templates/dashboard/includes/_orders_table.htmlindex 0a29a8eea8..2156a1bd57 100644--- a/saleor/dashboard/templates/dashboard/includes/_orders_table.html+++ b/saleor/dashboard/templates/dashboard/includes/_orders_table.html@@ -5,8 +5,8 @@<table class="table"><thead><tr>- <th>{% trans "Order" %}</th>- <th>{% trans "Date" %}</th>+ <th>{% trans "Number" %}</th>+ <th>{% trans "Placed on" %}</th><th>{% trans "Customer" %}</th><th>{% trans "Order status" %}</th><th>{% trans "Payment status" %}</th>@@ -27,4 +27,4 @@</tr>{% endfor %}</tbody>-</table>\ No newline at end of file+</table>diff --git a/saleor/dashboard/templates/dashboard/includes/address_short.html b/saleor/dashboard/templates/dashboard/includes/address_short.htmlindex 63cdea7383..204061e658 100644--- a/saleor/dashboard/templates/dashboard/includes/address_short.html+++ b/saleor/dashboard/templates/dashboard/includes/address_short.html@@ -1,3 +1,4 @@+{% load i18n %}<span class="address-details"data-content="{% if address.company_name %}{{ address.company_name }}<br>{% endif %}{{ address.street_address_1 }}<br>@@ -6,6 +7,5 @@{% endif %}{{ address.postal_code }} {{ address.city }}<br>{% if address.country_area %}{{ address.country_area }}, {% endif %}{{ address.get_country_display }}<br>- {{ address.phone }}- <a href='{% url "dashboard:address-shipping-edit" order_pk=order.pk group_pk=group.pk %}'>Edit</a>"- data-html="true" title="{{ address.first_name }} {{ address.last_name }}">{{ address }}</span>+ {{ address.phone }}"+ data-html="true" title="{{ address.first_name }} {{ address.last_name }}<span class='pull-right'><a href='{% url "dashboard:address-shipping-edit" order_pk=order.pk group_pk=group.pk %}'><i class='glyphicon glyphicon-pencil'></i> {% trans "Edit" %}</a></span>">{{ address }}</span>diff --git a/saleor/dashboard/templates/dashboard/index.html b/saleor/dashboard/templates/dashboard/index.htmlindex d854010ead..a7b6c0cf5f 100644--- a/saleor/dashboard/templates/dashboard/index.html+++ b/saleor/dashboard/templates/dashboard/index.html@@ -6,50 +6,52 @@{% block content %}<div class="row">- <h1 class="page-header">Dashboard</h1>+ <div class="col-lg-12">+ <h1 class="page-header">{% trans "Dashboard" %}</h1>+ </div>+</div>+<div class="row"><div class="col-lg-12"><div class="panel panel-default"><div class="panel-heading">- <span class="panel-title">Preauthorized payments</span>+ <span class="panel-title">{% trans "Preauthorized payments" %}</span></div><div class="panel-body">{% if preauthorized_payments %}<table class="table"><thead><tr>- <th>Order</th>- <th>Gateway</th>- <th>Date</th>- <th>Customer</th>- <th>Amount</th>+ <th>{% trans "Order number" %}</th>+ <th>{% trans "Date" %}</th>+ <th>{% trans "Customer" %}</th>+ <th class="text-right">{% trans "Amount" %}</th></tr></thead><tbody>{% for payment in preauthorized_payments %}<tr><td><a href="{% url "dashboard:order-details" pk=payment.order.pk %}">{{ payment.order }}</a></td>- <td>{{ payment.variant }}</td><td>{{ payment.created }}</td>- <td>{{ payment.order.user|default:"Anonymous" }}</td>- <td>{% gross payment.get_total_price %}</td>+ <td>{{ payment.order.user|default:_("Guest") }}</td>+ <td class="text-right">{% gross payment.get_total_price %}</td></tr>{% endfor %}</tbody></table>{% else %}- <span>No preauthorized payments</span>+ <small>{% trans "No preauthorized payments." %}</small>{% endif %}</div></div><div class="panel panel-default"><div class="panel-heading">- <span class="panel-title">Orders ready for shipment</span>+ <span class="panel-title">{% trans "Orders ready for shipment" %}</span></div><div class="panel-body">{% if orders_to_ship %}{% include "dashboard/includes/_orders_table.html" with orders=orders_to_ship %}{% else %}- <span>No orders</span>+ <small>{% trans "No orders are ready for shipment." %}</small>{% endif %}</div></div>@@ -74,7 +76,7 @@</tbody></table>{% else %}- <span>{% trans "No products" %}</span>+ <small>{% trans "No products are low in stock." %}</small>{% endif %}</div></div>diff --git a/saleor/dashboard/templates/dashboard/order/address-edit.html b/saleor/dashboard/templates/dashboard/order/address-edit.htmlindex c43e34f615..02ac05aae0 100644--- a/saleor/dashboard/templates/dashboard/order/address-edit.html+++ b/saleor/dashboard/templates/dashboard/order/address-edit.html@@ -8,24 +8,31 @@{% block content %}<div class="row">- <h1 class="page-header">Edit {{ address_type }} address</h1>+ <div class="col-lg-12">+ {% if address_type == "shipping" %}+ <h1 class="page-header">{% trans "Edit shipping address" %}</h1>+ {% else %}+ <h1 class="page-header">{% trans "Edit billing address" %}</h1>+ {% endif %}+ </div>+</div>- <div class="col-md-6">- <div class="panel panel-default">- <div class="panel-body">- <form method="post">- {% csrf_token %}- <fieldset>- {{ form|as_vertical_form }}- </fieldset>- <div class="form-group">- <button type="submit" class="btn btn-primary">Save</button>- <a href="{% url 'dashboard:order-details' pk=order.pk %}" class="btn btn-link">Cancel</a>- </div>- </form>- </div>+<form class="form form-vertical" method="post">+ <div class="row">+ <div class="col-md-6">+ {% csrf_token %}+ <fieldset>+ {{ form|as_vertical_form }}+ </fieldset></div></div>--</div>+ <div class="row">+ <div class="col-lg-12">+ <p>+ <button type="submit" class="btn btn-primary"><i class="glyphicon glyphicon-refresh"></i> {% trans "Update" %}</button>+ <a href="{% url 'dashboard:order-details' pk=order.pk %}" class="btn btn-default"><i class="glyphicon glyphicon-remove"></i> {% trans "Cancel" %}</a>+ </p>+ </div>+ </div>+</form>{% endblock content %}diff --git a/saleor/dashboard/templates/dashboard/order/detail.html b/saleor/dashboard/templates/dashboard/order/detail.htmlindex d0b2eeb055..7351509ea9 100644--- a/saleor/dashboard/templates/dashboard/order/detail.html+++ b/saleor/dashboard/templates/dashboard/order/detail.html@@ -4,7 +4,7 @@{% load bootstrap %}{% load status %}-{% block title %}{% trans "Order" %} #{{ order.id }} - {% trans "Orders" %} - {{ block.super }}{% endblock %}+{% block title %}{{ order }} - {% trans "Orders" %} - {{ block.super }}{% endblock %}{% block content %}<div class="row">@@ -16,7 +16,7 @@</div><div class="panel-body">{% for group in groups %}- <table class="table table-condensed">+ <table class="table"><thead><tr><th colspan=6>@@ -24,38 +24,46 @@</th></tr><tr>- <th class="col-sm-3">{% trans "Name" %}</th>- <th class="col-sm-2">{% trans "Variant" %}</th>- <th class="col-sm-2">{% trans "SKU" %}</th>- <th class="col-sm-2">{% trans "Price" %}</th>- <th class="col-sm-2">{% trans "Quantity" %}</th>- <th class="col-sm-1">{% trans "Actions" %}</th>+ <th class="col-sm-5">{% trans "Item" %}</th>+ <th class="col-sm-2 text-right">{% trans "Price" %}</th>+ <th class="col-sm-2 text-right">{% trans "Quantity" %}</th>+ <th class="col-sm-2 text-right">{% trans "Total" %}</th>+ <th class="col-sm-1"></th></tr></thead><tfoot><tr>- <td>- <p>{% trans "Delivery cost: " %}{% gross group.price %}</p>- <p><strong>{% trans "Total: " %}{% gross group.get_total %}</strong></p>+ <td colspan="3">+ <strong>{{ group.get_method }}</strong><br>+ {% trans "Shipping address" %}: {% include "dashboard/includes/address_short.html" with address=group.address order_pk=order.pk group_pk=group.pk %}</td>- <td colspan=4>- <p>{% trans "Shipping address" %}: {% include "dashboard/includes/address_short.html" with address=group.address order_pk=order.pk group_pk=group.pk %}</p>+ <td class="text-right">+ {% gross group.price %}</td>- <td>- <a class="btn btn-default btn-sm" data-target="#base-modal" href="{% url 'dashboard:ship-delivery-group' pk=group.pk %}" data-toggle="modal" {% if not group.can_ship %}disabled{% endif %}>Ship</a>+ <td class="text-right">+ <a class="btn btn-default btn-sm" 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="glyphicon glyphicon-plane"></i> {% trans "Ship" %}</a></td></tr>+ <tr>+ <th colspan="3">{% trans "Total" %}</th>+ <td class="text-right">+ <strong>{% gross group.get_total %}</strong>+ </td>+ <td></td>+ </tr></tfoot><tbody>{% for item in group.items.all %}<tr>- <td>{% if item.product %}<a href="{% url "dashboard:product-update" pk=item.product.id %}">{{ item.product }}</a>{% else %}{{ item.product_name }}{% endif %}</td>- <td>{{ item.product_name }}</td>- <td>{{ item.product_sku }}</td>- <td>{% gross item.get_price_per_item %}</td>- <td>{{ item.quantity }}</td><td>- <a class="btn btn-link" data-target="#base-modal" href="{% url 'dashboard:order-line-edit' pk=item.pk %}" data-toggle="modal" {% if group.status != 'new' %}disabled{% endif %}>Edit</a>+ {% 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="text-right">{% gross item.get_price_per_item %}</td>+ <td class="text-right">{{ item.quantity }}</td>+ <td class="text-right">{% gross item.get_total %}</td>+ <td class="text-right">+ <a class="btn btn-primary btn-sm" 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="glyphicon glyphicon-pencil"></i></a></td></tr>{% endfor %}@@ -68,9 +76,9 @@<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 %}-{% endif %}</p>+ <p>{% trans "Preauthorized amount:" %} {% if preauthorized %}{% gross preauthorized %}{% else %}{% trans "N/A" %}{% endif %}</p>{% if captured %}- <p>Captured amount: {% gross captured %}</p>+ <p>{% trans "Captured amount" %}: {% gross captured %}</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>@@ -81,7 +89,7 @@<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 %}- <span>{% trans "No payment for this order" %}</span>+ <small>{% trans "There are no payments assigned with this order." %}</small>{% endif %}</div></div>@@ -91,18 +99,18 @@</div><div class="panel-body"><ul class="nav nav-tabs" role="tablist">- <li class="active"><a href="#order-history" role="tab" data-toggle="tab">Order history</a></li>- <li><a href="#payment-history" role="tab" data-toggle="tab">Payment history</a></li>+ <li class="active"><a href="#order-history" role="tab" data-toggle="tab">{% trans "Order history" %}</a></li>+ <li><a href="#payment-history" role="tab" data-toggle="tab">{% trans "Payment history" %}</a></li></ul><div class="tab-content"><div class="tab-pane active" id="order-history"><table class="table"><thead><tr>- <th>Date</th>- <th>Order status</th>- <th>User</th>- <th>Comment</th>+ <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></tr></thead><tbody>@@ -121,17 +129,17 @@<table class="table"><thead><tr>- <th>Date</th>- <th>Payment status</th>- <th>Details</th>+ <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></tr></thead><tbody>{% for payment in order.payments.all %}<tr>+ <td><a href="{% url "dashboard:payment-details" pk=payment.pk %}">#{{ payment.id }}</a></td><td>{{ payment.created }}</td><td>{% render_status payment.status payment.get_status_display %}</td>- <td><a href="{% url "dashboard:payment-details" pk=payment.pk %}">Details</a></td></tr>{% endfor %}</tbody>@@ -156,14 +164,14 @@{% endfor %}</ul>{% else %}- <span>-</span>+ <small>{% trans "There are no notes associated with this order." %}</small>{% endif %}<div id="add-order-note" class="collapse"><form class="form-horizontal" role="form" method="post">{% csrf_token %}{{ note_form|as_vertical_form }}<div class="form-group">- <button name='note_form' type="submit" class="btn btn-default">Save</button>+ <button name='note_form' type="submit" class="btn btn-success"><i class="glyphicon glyphicon-plus"></i> {% trans "Save note" %}</button></div></form></div>@@ -190,31 +198,29 @@</div><div class="panel panel-default"><div class="panel-heading">- <span class="panel-title">Customer details <i class="glyphicon glyphicon-user pull-right"></i></span>+ <span class="panel-title">{% trans "Customer" %}</span></div><div class="panel-body"><div class="address">{% if order.user %}- <div>Account: <a href="{% url "dashboard:customer-details" pk=order.user.pk %}">{{ order.user }}</a></div>+ <div>{% trans "Account" %}: <a href="{% url "dashboard:customer-details" pk=order.user.pk %}">{{ order.user }}</a></div>{% else %}- <div>Account: Anonymous</div>+ <div>{% trans "Account" %}: {% trans "Guest" %}</div>{% endif %}- <div>- <span class="glyphicon glyphicon-envelope"></span>- {{ order.get_user_email }}- </div>- <div>IP Address: {{ request.META.REMOTE_ADDR }}</div></div></div></div><div class="panel panel-default">{% with order.billing_address as address %}<div class="panel-heading">- <span class="panel-title">Billing address</span>- <span class="pull-right"><a href="{% url "dashboard:address-billing-edit" order_pk=order.pk %}"><i class="glyphicon glyphicon-cog"></i> Edit</a></span>+ <span class="panel-title">{% trans "Billing address" %}</span>+ <span class="pull-right"><a href="{% url "dashboard:address-billing-edit" order_pk=order.pk %}"><i class="glyphicon glyphicon-pencil"></i> Edit</a></span></div><div class="panel-body">{% include 'dashboard/includes/_address.html' with address=address only %}+ <div>+ <i class="glyphicon glyphicon-envelope"></i> <a href="mailto:{{ order.get_user_email }}">{{ order.get_user_email }}</a>+ </div></div>{% endwith %}</div>diff --git a/saleor/dashboard/templates/dashboard/payments/detail.html b/saleor/dashboard/templates/dashboard/payments/detail.htmlindex 0832e5f77c..a7d4ae32b4 100644--- a/saleor/dashboard/templates/dashboard/payments/detail.html+++ b/saleor/dashboard/templates/dashboard/payments/detail.html@@ -10,65 +10,73 @@{% block content %}<div class="row">- <h1 class="page-header">{% trans "Payment" %} #{{ payment.id }}</h1>+ <div class="col-lg-12">+ <h1 class="page-header">{% trans "Payment" %} #{{ payment.id }}</h1>+ </div>+</div>+<div class="row"><div class="col-lg-8"><div class="panel panel-default"><div class="panel-heading"><span class="panel-title">Payment details</span></div><div class="panel-body">- <p>Status: {% render_status payment.status payment.get_status_display %}</p>- <p>Fraud status: {% render_status payment.fraud_status payment.get_fraud_status_display %}</p>- <p>Amount: {% gross payment.get_total_price %}</p>- <p>Captured amount: {% gross payment.get_captured_price %}</p>- <p>Gateway: {{ payment.variant }}</p>- <p>Transaction id: {{ payment.transaction_id }}</p>- <p>Payment date: {{ payment.created }}</p>+ <p>{% trans "Payment status" %}: {% render_status payment.status payment.get_status_display %}</p>+ <p>{% trans "Fraud status" %}: {% render_status payment.fraud_status payment.get_fraud_status_display %}</p>+ <p>{% trans "Amount" %}: {% gross payment.get_total_price %}</p>+ <p>{% trans "Captured amount" %}: {% gross payment.get_captured_price %}</p>+ <p>{% trans "Gateway" %}: {{ payment.variant }}</p>+ <p>{% trans "Transaction ID" %}: {{ payment.transaction_id }}</p>+ <p>{% trans "Payment date" %}: {{ payment.created }}</p></div></div><div class="panel panel-default"><div class="panel-heading">- <span class="panel-title">Gateway communication</span>{% if payment.extra_data %}<a class="pull-right" data-toggle="collapse" href="#gateway-output">Show</a>{% endif %}+ <span class="panel-title">{% trans "Gateway communication" %}</span>{% if payment.extra_data %}<a class="pull-right" data-toggle="collapse" href="#gateway-output">{% trans "Show" %}</a>{% endif %}</div><div class="panel-body"><div id='gateway-output' class="{% if payment.extra_data %}collapse{% endif %}">{% if payment.extra_data %}<pre>{{ payment.extra_data|format_json }}</pre>{% else %}- <span>-</span>+ <small>{% trans "No communication recorded yet." %}</small>{% endif %}</div></div></div><div class="panel panel-default"><div class="panel-heading">- <span class="panel-title">Gateway message</span>+ <span class="panel-title">{% trans "Gateway response" %}</span></div><div class="panel-body">- <span>{{ payment.message|default:"-" }}</span>+ {% if payment.message %}+ {{ payment.message }}+ {% else %}+ <small>{% trans "No response available." %}</small>+ {% endif %}</div></div></div><div class="col-lg-4"><div class="panel panel-default"><div class="panel-heading">- <span class="panel-title">Customer account<i class="glyphicon glyphicon-user pull-right"></i></span>+ <span class="panel-title">{% trans "Customer" %}</span></div><div class="panel-body"><div class="address">{% if payment.order.user %}- <div>Account: <a href="{% url "dashboard:customer-details" pk=payment.order.user.pk %}">{{ payment.order.user }}</a></div>+ <div>{% trans "Account" %}: <a href="{% url "dashboard:customer-details" pk=payment.order.user.pk %}">{{ payment.order.user }}</a></div>{% else %}- <div>Account: Anonymous</div>+ <div>{% trans "Account" %}: {% trans "Guest" %}</div>{% endif %}- <div><i class="glyphicon glyphicon-envelope"></i> {{ payment.order.get_user_email }}</span></div>+ <div><i class="glyphicon glyphicon-envelope"></i> <a href="mailto:{{ payment.order.get_user_email }}">{{ payment.order.get_user_email }}</a></div><div>Customer IP: {{ payment.customer_ip_address }}</div></div></div></div><div class="panel panel-default"><div class="panel-heading">- <span class="panel-title">Billing address sent to gateway</span>+ <span class="panel-title">{% trans "Billing address" %}</span></div><div class="panel-body"><div class="address">diff --git a/saleor/dashboard/templates/dashboard/payments/list.html b/saleor/dashboard/templates/dashboard/payments/list.htmlindex 5bbaf8d81d..2bee4cbb35 100644--- a/saleor/dashboard/templates/dashboard/payments/list.html+++ b/saleor/dashboard/templates/dashboard/payments/list.html@@ -14,24 +14,22 @@<table class="table"><thead><tr>- <th>{% trans "Order" %}</th>- <th>{% trans "Gateway" %}</th>- <th>{% trans "Date" %}</th>- <th>{% trans "Status" %}</th>- <th>{% trans "Amount" %}</th>+ <th class="col-sm-3">{% trans "Date" %}</th>+ <th class="col-sm-4">{% trans "Payment" %}</th>+ <th class="col-sm-2 text-right">{% trans "Amount" %}</th>+ <th class="col-sm-3">{% trans "Status" %}</th></tr></thead><tbody>{% for payment in payments %}<tr>+ <td>{{ payment.created }}</td><td>- <a href="{% url 'dashboard:order-details' pk=payment.order.pk %}">{{ payment.order }}</a>- (<a href="{% url "dashboard:payment-details" pk=payment.pk %}">{% trans "Payment details" %}</a>)+ <a href="{% url "dashboard:payment-details" pk=payment.pk %}">#{{ payment.id }}</a><br>+ {% trans "Gateway" %}: {{ payment.variant }} · {% trans "Order number" %}: <a href="{% url 'dashboard:order-details' pk=payment.order.pk %}">{{ payment.order }}</a></td>- <td>{{ payment.variant }}</td>- <td>{{ payment.created }}</td>+ <td class="text-right">{% gross payment.get_total_price %}</td><td>{% render_status payment.status payment.get_status_display %}</td>- <td>{% gross payment.get_total_price %}</td></tr>{% endfor %}</tbody>diff --git a/saleor/dashboard/templates/dashboard/product/list.html b/saleor/dashboard/templates/dashboard/product/list.htmlindex 63e79452dd..63c66e9291 100644--- a/saleor/dashboard/templates/dashboard/product/list.html+++ b/saleor/dashboard/templates/dashboard/product/list.html@@ -16,10 +16,10 @@<form class="form-inline" method="post" action=".">{% csrf_token %}<div class="form-group">- <label class="control-label"for="amount">{% trans "Product class" %}</label>+ <label class="control-label"for="amount">{% trans "Product type" %}</label>{% render_widget form.cls_name class="form-control" %}- <button class="btn btn-primary" type="submit">- {% trans "Add product" %}+ <button class="btn btn-success" type="submit">+ <i class="glyphicon glyphicon-plus"></i> {% trans "New product" %}</button></div></form>diff --git a/saleor/dashboard/templates/dashboard/product/product_confirm_delete.html b/saleor/dashboard/templates/dashboard/product/product_confirm_delete.htmlindex f32046f230..78ec48fa56 100644--- a/saleor/dashboard/templates/dashboard/product/product_confirm_delete.html+++ b/saleor/dashboard/templates/dashboard/product/product_confirm_delete.html@@ -7,30 +7,38 @@{% block content %}-<h2>{% trans "Are you sure you want to delete the following product?" %}</h2>+<form class="form form-horizontal" action="" method="post">+ {% csrf_token %}-<div class="row">- <div class="col-md-6">- <div class="panel panel-default">- <div class="panel-heading">{{ object }}</div>- <div class="panel-body">- {% if object.images.exists %}- <img src="{{ product.images.first|at_size:"admin" }}" alt="">- {% else %}- <img src="http://placehold.it/50x50/&text=Product Image" alt="">- {% endif %}- <strong>{{ object.name }}</strong>- <span>{{ object.collection }}</span>- </div>+ <div class="row">+ <div class="col-lg-12">+ <h1 class="page-header">{% trans "Are you sure you want to delete the following product?" %}</h1></div></div>-</div>+ <div class="row">+ <div class="col-md-6">+ <div class="panel panel-default">+ <div class="panel-heading">{{ object }}</div>+ <div class="panel-body">+ {% if object.images.exists %}+ <img src="{{ product.images.first|at_size:"admin" }}" alt="">+ {% else %}+ <img src="http://placehold.it/50x50/&text=Product Image" alt="">+ {% endif %}+ <strong>{{ object.name }}</strong>+ <span>{{ object.collection }}</span>+ </div>+ </div>+ </div>+ </div>-<form class="form form-horizontal" action="" method="post">- {% csrf_token %}- <button class="btn btn-danger" type="submit">Delete</button>- <a class="btn btn-link" href="{% url 'dashboard:products' %}">{% trans "Cancel" %}</a>+ <div class="form-group">+ <div class="col-md-6">+ <button class="btn btn-danger" type="submit"><i class="glyphicon glyphicon-trash"></i> {% trans "Delete" %}</button>+ <a class="btn btn-default" href="{% url 'dashboard:product-update' pk=product.pk %}"><i class="glyphicon glyphicon-remove"></i> {% trans "Cancel" %}</a>+ </div>+ </div></form>-{% endblock %}\ No newline at end of file+{% endblock %}diff --git a/saleor/dashboard/templates/dashboard/product/product_form.html b/saleor/dashboard/templates/dashboard/product/product_form.htmlindex 1033f77139..968a0f26e4 100644--- a/saleor/dashboard/templates/dashboard/product/product_form.html+++ b/saleor/dashboard/templates/dashboard/product/product_form.html@@ -9,27 +9,31 @@{% block content %}<div class="row">- <h1 class="page-header">{{ title }}</h1>+ <div class="col-lg-12">+ <h1 class="page-header">{{ title }}</h1>+ </div>+</div>++<form class="form form-vertical" method="post" id="product-form" enctype="multipart/form-data">+ <div class="row">+ <div class="col-lg-8">+ <div class="form-message alert alert-success" hidden="hidden">+ <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>+ <span class="glyphicon glyphicon-ok-sign"></span>+ <span class="message-content">{% trans "Data saved" %}</span>+ </div>- <div class="col-lg-8">- <div class="form-message alert alert-success" hidden="hidden">- <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>- <span class="glyphicon glyphicon-ok-sign"></span>- <span class="message-content">{% trans "Data saved" %}</span>- </div>- <form class="form form-horizontal" method="post" id="product-form" enctype="multipart/form-data">- {{ variant_formset.management_form }}- {{ image_formset.management_form }}<div class="panel panel-default"><div class="panel-heading"><span class="panel-title">{% trans "Details" %}</span></div><div class="panel-body">{% csrf_token %}- {{ form|as_horizontal_form }}+ {{ form|as_vertical_form }}</div></div>+ {{ variant_formset.management_form }}<div class="panel panel-default"><div class="panel-heading"><span class="panel-title">{% trans "Variants" %}</span>@@ -39,6 +43,7 @@</div></div>+ {{ image_formset.management_form }}<div class="panel panel-default"><div class="panel-heading"><span class="panel-title">{% trans "Images" %}</span>@@ -47,31 +52,39 @@{% include "dashboard/includes/_formset_table.html" with formset=image_formset %}</div></div>+ </div>- <div class="form-group">- <button type="submit" class="btn btn-primary">{% trans "Save" %}</button>- {% if product.pk %}- <a href="{% url 'dashboard:product-delete' pk=product.pk %}" class="btn btn-danger">{% trans "Delete" %}</button>- {% endif %}- <a href="{% url 'dashboard:products' %}" class="btn btn-link">{% trans "Cancel" %}</a>+ <div class="col-lg-4">+ <div class="panel panel-default">+ <div class="panel-heading">+ <span class="panel-title">Product image</span>+ </div>+ <div class="panel-body">+ {% if product.images.exists %}+ <img class="img-responsive" src="{{ product.images.first|at_size:"small" }}" alt="">+ {% else %}+ <img class="img-responsive" src="http://placehold.it/300x300/&text=Product Image" alt="">+ {% endif %}+ </div></div>-- </form>+ </div></div>-- <div class="col-lg-4">- <div class="panel panel-default">- <div class="panel-heading">- <span class="panel-title">Product image</span>- </div>- <div class="panel-body">- {% if product.images.exists %}- <img class="img-responsive" src="{{ product.images.first|at_size:"small" }}" alt="">+ <div class="row">+ <div class="col-lg-12">+ <p>+ {% if product.pk %}+ <span class="pull-right">+ <a href="{% url 'dashboard:product-delete' pk=product.pk %}" class="btn btn-danger"><i class="glyphicon glyphicon-trash"></i> {% trans "Delete" %}</a>+ </span>+ {% endif %}+ {% if product.pk %}+ <button type="submit" class="btn btn-primary"><i class="glyphicon glyphicon-refresh"></i> {% trans "Update" %}</button>{% else %}- <img class="img-responsive" src="http://placehold.it/300x300/&text=Product Image" alt="">+ <button type="submit" class="btn btn-primary"><i class="glyphicon glyphicon-upload"></i> {% trans "Create" %}</button>{% endif %}- </div>+ <a href="{% url 'dashboard:products' %}" class="btn btn-default"><i class="glyphicon glyphicon-remove"></i> {% trans "Cancel" %}</a>+ </p></div></div>-</div>+</form>{% endblock %}