Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Add basic styles to product page
weronkae3df417aca3a
diff --git a/saleor/core/urls.py b/saleor/core/urls.pyindex 327c9ac32e..84a7719a03 100644--- a/saleor/core/urls.py+++ b/saleor/core/urls.py@@ -4,6 +4,5 @@ from . import viewsurlpatterns = [- url(r'^$', views.home, name='home'),- url(r'^demo/', views.demo, name='demo')+ url(r'^$', views.home, name='home')]diff --git a/saleor/core/views.py b/saleor/core/views.pyindex 77f50bf0d3..b6f9aff3e8 100644--- a/saleor/core/views.py+++ b/saleor/core/views.py@@ -8,14 +8,5 @@ def home(request):products = products_with_availability(products, discounts=request.discounts, local_currency=request.currency)return TemplateResponse(- request, 'base.html',+ request, 'home.html',{'products': products, 'parent': None})---def demo(request):- products = Product.objects.get_available_products()[:12]- products = products.prefetch_related('categories', 'images',- 'variants__stock')- return TemplateResponse(- request, 'demo/home.html',- {'products': products, 'parent': None})\ No newline at end of filediff --git a/saleor/settings.py b/saleor/settings.pyindex e18073cfba..03809a46c0 100644--- a/saleor/settings.py+++ b/saleor/settings.py@@ -104,7 +104,7 @@ if not DEBUG:TEMPLATES = [{'BACKEND': 'django.template.backends.django.DjangoTemplates',- 'DIRS': [os.path.join(PROJECT_ROOT, 'templates')],+ 'DIRS': [os.path.join(PROJECT_ROOT, 'templates/demo'), os.path.join(PROJECT_ROOT, 'templates')],'OPTIONS': {'debug': DEBUG,'context_processors': context_processors,diff --git a/saleor/static/img/gallery-arrow.svg b/saleor/static/img/gallery-arrow.svgnew file mode 100644index 0000000000..3be1a489ca--- /dev/null+++ b/saleor/static/img/gallery-arrow.svg@@ -0,0 +1,18 @@+<svg width="20" height="38" viewBox="0 0 20 38" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:figma="http://www.figma.com/figma/ns">+<title>Group</title>+<desc>Created using Figma</desc>+<g id="Canvas" transform="translate(-1659 898)" figma:type="canvas">+<g id="Group" style="mix-blend-mode:normal;" figma:type="frame">+<g id="Line 5" style="mix-blend-mode:normal;" figma:type="line">+<use xlink:href="#path0_stroke" transform="matrix(0.704759 -0.709446 0.704759 0.709446 1660.03 -860.25)" fill="#BFBFBF" style="mix-blend-mode:normal;"/>+</g>+<g id="Line 6" style="mix-blend-mode:normal;" figma:type="line">+<use xlink:href="#path1_stroke" transform="matrix(-0.704759 -0.709446 0.704759 -0.709446 1678.41 -878.75)" fill="#BFBFBF" style="mix-blend-mode:normal;"/>+</g>+</g>+</g>+<defs>+<path id="path0_stroke" d="M 0 -5.55112e-17L 26.0767 -5.55112e-17L 26.0767 -1L 0 -1L 0 -5.55112e-17Z"/>+<path id="path1_stroke" d="M 0 0L 26.0767 0L 26.0767 -1L 0 -1L 0 0Z"/>+</defs>+</svg>diff --git a/saleor/static/scss/demo/components/_breadcrumbs.scss b/saleor/static/scss/demo/components/_breadcrumbs.scssnew file mode 100644index 0000000000..5a8e7b0b39--- /dev/null+++ b/saleor/static/scss/demo/components/_breadcrumbs.scss@@ -0,0 +1,14 @@+.breadcrumbs {+ margin-bottom: $global-margin * 1.5;+ li {+ display: inline;+ &:not(:last-of-type):after {+ content: '/';+ display: inline-block;+ margin-left: $global-margin / 3;+ }+ a {+ color: $body-color;+ }+ }+}\ No newline at end of filediff --git a/saleor/static/scss/demo/components/_buttons.scss b/saleor/static/scss/demo/components/_buttons.scssindex b334bd0427..8a615cdc5f 100644--- a/saleor/static/scss/demo/components/_buttons.scss+++ b/saleor/static/scss/demo/components/_buttons.scss@@ -1,15 +1,24 @@.btn {+ transition: 0.3s;&.home__button {border-radius: 0;text-transform: uppercase;color: $white;background-color: transparent;border: 1px solid $white;- transition: 0.3s;padding: $global-padding $global-padding * 2;&:hover {background-color: $white;color: $body-color;}}+ &.primary {+ background-color: $green;+ color: $white;+ padding: $global-padding $global-padding * 4;+ font-size: $font-size-h5;+ &:hover {+ background-color: $darkgreen+ }+ }}\ No newline at end of filediff --git a/saleor/static/scss/demo/components/_fonts.scss b/saleor/static/scss/demo/components/_fonts.scssindex 66d5b7ded4..8e76679f6c 100644--- a/saleor/static/scss/demo/components/_fonts.scss+++ b/saleor/static/scss/demo/components/_fonts.scss@@ -1,18 +1,21 @@@font-face {- font-family: 'Lato-Regular';+ font-family: 'Lato';src: url('../../fonts/Lato-Regular.woff2') format('woff2'),url('../../fonts/Lato-Regular.woff') format('woff'),url('../../fonts/Lato-Regular.ttf') format('truetype');+ font-weight: 400;}@font-face {- font-family: 'Lato-Bold';+ font-family: 'Lato';src: url('../../fonts/Lato-Bold.woff2') format('woff2'),url('../../fonts/Lato-Bold.woff') format('woff'),url('../../fonts/Lato-Bold.ttf') format('truetype');+ font-weight: 700;}@font-face {- font-family: 'Lato-Black';+ font-family: 'Lato';src: url('../../fonts/Lato-Black.woff2') format('woff2'),url('../../fonts/Lato-Black.woff') format('woff'),url('../../fonts/Lato-Black.ttf') format('truetype');+ font-weight: 900;}\ No newline at end of filediff --git a/saleor/static/scss/demo/components/_header.scss b/saleor/static/scss/demo/components/_header.scssindex ed5c0e2b8d..1b9ddc2be7 100644--- a/saleor/static/scss/demo/components/_header.scss+++ b/saleor/static/scss/demo/components/_header.scss@@ -10,7 +10,6 @@p {margin: $global-margin / 2 0;font-size: $small-font-size;- font-family: 'Lato-Regular';&.float-xs-left {color: $white;}@@ -63,17 +62,21 @@}&__menu {ul {- text-align: justify;+ border-bottom: 1px solid $gray;+ margin-bottom: $global-margin;+ @include media-breakpoint-down(sm), &.no-border {+ border-bottom: 0;+ margin-bottom: 0;+ }&:after {content: "";- width: 100%;+ width: 100%;display: inline-block;}.nav-item {width: 20%;- font-family: 'Lato-Bold';+ font-weight: 700;display: inline-block;- vertical-align: top;text-align: center;+ .nav-item {margin-left: 0;diff --git a/saleor/static/scss/demo/components/_home.scss b/saleor/static/scss/demo/components/_home.scssindex 299d6d8fd2..22aedb340f 100644--- a/saleor/static/scss/demo/components/_home.scss+++ b/saleor/static/scss/demo/components/_home.scss@@ -2,25 +2,26 @@text-align: center;color: $white;h1 {- font-family: "Lato-Black";+ font-weight: 900;font-size: $font-size-h1 * 1.3;}h2 {font-weight: 400;}+ .btn {+ margin-top: $global-margin;+ }&__block1 {- background-image: url('../../img/block1.jpg');- padding: $global-padding * 15 0 $global-padding * 12;- background-size: cover;- h1 {- text-transform: uppercase;+ div {+ background-image: url('../../img/block1.jpg');+ padding: $global-padding * 15 0 $global-padding * 12;+ background-size: cover;+ h1 {+ text-transform: uppercase;+ }}}&__block2 {- @include media-breakpoint-up(md) {- padding: 0 $global-padding 0 0;- }- padding: 0;margin-top: $global-margin * 2;div {background-image: url('../../img/block2.jpg');@@ -29,10 +30,6 @@}}&__block3 {- @include media-breakpoint-up(md) {- padding: 0 0 0 $global-padding;- }- padding: 0;margin-top: $global-margin * 2;div {background-image: url('../../img/block3.jpg');diff --git a/saleor/static/scss/demo/components/_product-page.scss b/saleor/static/scss/demo/components/_product-page.scssnew file mode 100644index 0000000000..db6ffe6367--- /dev/null+++ b/saleor/static/scss/demo/components/_product-page.scss@@ -0,0 +1,35 @@+.product {+ &__info {+ &__name {+ font-weight: 900;+ margin-bottom: $global-margin * 2;+ }+ }+ &__gallery {+ .carousel-control {+ &.right, &.left {+ background-image: none;+ }+ &.left {+ img {+ transform: rotate(180deg);+ }+ }+ }+ .carousel-indicators {+ top: 100%;+ width: auto;+ left: 0;+ margin-left: 0;+ li {+ display: inline;+ &.active {+ margin: 1px;+ img {+ opacity: 0.5;+ }+ }+ }+ }+ }+}\ No newline at end of filediff --git a/saleor/static/scss/demo/storefront.scss b/saleor/static/scss/demo/storefront.scssindex 1bf88e5ba2..3e9632c35c 100644--- a/saleor/static/scss/demo/storefront.scss+++ b/saleor/static/scss/demo/storefront.scss@@ -4,5 +4,7 @@@import "components/fonts";@import "components/buttons";@import "components/header";+@import "components/breadcrumbs";@import "components/footer";-@import "components/home";\ No newline at end of file+@import "components/home";+@import "components/product-page";\ No newline at end of filediff --git a/saleor/static/scss/demo/variables.scss b/saleor/static/scss/demo/variables.scssindex 8b11ee0c1d..cb81832f35 100644--- a/saleor/static/scss/demo/variables.scss+++ b/saleor/static/scss/demo/variables.scss@@ -15,10 +15,11 @@ $global-margin: 1rem;$white: #fff;$body-color: #333333;$red: #EB5757;-+ $green: #27AE60;+ $darkgreen: #1b8a4a;// TYPOGRAPHY-$font-family-sans-serif: 'Lato-Regular';+$font-family-sans-serif: 'Lato';$font-size-root: 14px;$font-size-h1: 2.6rem;diff --git a/templates/demo/base.html b/templates/demo/base.htmlindex e43ad661d6..3d9ed6de0f 100644--- a/templates/demo/base.html+++ b/templates/demo/base.html@@ -26,7 +26,7 @@<body itemscope itemtype="http://schema.org/WebPage">{% block header %}- <header class="navbar navbar-default navbar-inverse navbar-static-top" role="navigation">+ <header class="navbar" role="navigation"><div class="navbar__login hidden-sm-down"><div class="container"><p class="float-xs-left">{% trans "Test Saleor in Testeor - a sample shop!" %}</p>@@ -46,7 +46,7 @@<div class="navbar__brand"><div class="container"><img class="hidden-md-up navbar__brand__menu-toggle closed open" src="{% static "img/mobile-bar.svg" %}">- <a href="{% url "demo" %}">+ <a href="/"><img src="{% static "img/testeor-logo.svg" %}" alt="Testeor - Saleor demo store"></a><div class="float-xs-right">@@ -64,7 +64,8 @@<div class="navbar__menu"><div class="container"><nav class="navigation">- <ul class="nav navbar-nav">+ {% url 'home' as home_url %}+ <ul class="nav navbar-nav{% if request.get_full_path == home_url %} no-border{% endif %}" >{% for category in categories %}<li class="nav-item"><a class="nav-link" href="{{ category.get_absolute_url }}">@@ -89,17 +90,9 @@</div>{% endif %}<div class="container">- {% block outerbreadcrumb %}- <!-- <ul class="breadcrumb" itemprop="breadcrumb">- {% block breadcrumb %}- <li>- <a href="/">{% trans "Home" %}</a>- </li>- {% endblock breadcrumb %}- </ul> -->- {% endblock outerbreadcrumb %}+ {% block breadcrumb %}+ {% endblock breadcrumb %}{% block content %}-{% endblock content %}</div>{% block footer %}@@ -107,7 +100,7 @@<div class="container"><div class="row"><div class="col-md-3">- <a href="{% url "demo" %}">+ <a href="/"><img class="footer__logo" src="{% static "img/testeor-logo-white.svg" %}" alt="Testeor - Saleor demo store"></a></div>diff --git a/templates/demo/dashboard/base.html b/templates/demo/dashboard/base.htmlnew file mode 100644index 0000000000..6d1a9ab016--- /dev/null+++ b/templates/demo/dashboard/base.html@@ -0,0 +1,119 @@+<!DOCTYPE html>+{% load staticfiles i18n %}+{% load render_bundle from webpack_loader %}++<html class="no-js">+<head>+ <meta charset="utf-8">+ <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">++ <title>{% block title %}{% trans "Dashboard - Saleor" %}{% endblock %}</title>++ {% render_bundle 'vendor' 'css' %}+ {% render_bundle 'dashboard' 'css' %}+ <link rel="stylesheet" type="text/css" href="{% static "versatileimagefield/css/versatileimagefield.css" %}">++ {% block custom_css %}+ {% endblock %}+</head>++<body class="{% block body_class %}body-home{% endblock %}">+ <header class="header">+ <nav class="top-nav">+ <div class="container">+ <div class="nav-wrapper">+ {% block header_menu %}+ <a href="#" data-activates="side-menu" class="button-collapse header-button"><i class="material-icons">menu</i></a>+ {% endblock %}+ {% block breadcrumbs %}+ <ul class="breadcrumbs">+ <li>{% trans "Dashboard" %}</li>+ </ul>+ {% endblock %}+ {% block header_extra %}{% endblock %}+ </div>+ </div>+ <ul class="side-nav fixed" id="side-menu">+ <li class="brand-logo">+ <a href="{% url 'dashboard:index' %}">+ <img src="{% static "img/dashboard-logo.svg" %}" alt="Saleor">+ </a>+ </li>+ <li class="side-nav-user">+ <ul class="collapsible collapsible-accordion">+ <li>+ <a class="waves-effect waves-teal collapsible-header">+ <i class="material-icons">account_circle</i>{{ request.user }}+ </a>+ <div class="collapsible-body">+ <ul>+ <li><a href="/" target="_blank" class="waves-effect waves-teal">{% trans "Visit storefront" %}</a></li>+ <li><a href="{% url 'registration:logout' %}" class="waves-effect waves-teal">{% trans "Log out" %}</a></li>+ </ul>+ </div>+ </li>+ </ul>+ </li>+ <li class="nav-home"><a href="{% url 'dashboard:index' %}">{% trans "Home" %}</a></li>+ <li>+ <ul class="collapsible collapsible-accordion" data-collapsible="accordion">+ <li>+ <a class="waves-effect waves-teal collapsible-header{% block menu_catalogue_class %}{% endblock %}">{% trans "Catalogue" %}</a>+ <div class="collapsible-body">+ <ul>+ <li class="subnav-products"><a href="{% url 'dashboard:product-list' %}">{% trans "Products" %}</a></li>+ <li class="subnav-attributes"><a href="{% url 'dashboard:product-attributes' %}">{% trans "Attributes" %}</a></li>+ <li class="subnav-categories"><a href="{% url 'dashboard:category-list' %}">{% trans "Categories" %}</a></li>+ </ul>+ </div>+ </li>++ <li>+ <a class="waves-effect waves-teal collapsible-header{% block menu_discounts_class %}{% endblock %}">{% trans "Discounts" %}</a>+ <div class="collapsible-body">+ <ul>+ <li class="subnav-sales"><a href="{% url 'dashboard:sale-list' %}">{% trans "Sales" %}</a></li>+ <li class="subnav-vouchers"><a href="{% url 'dashboard:voucher-list' %}">{% trans "Vouchers" %}</a></li>+ </ul>+ </div>+ </li>++ <li>+ <a class="waves-effect waves-teal collapsible-header{% block menu_sales_class %}{% endblock %}">{% trans "Sales" %}</a>+ <div class="collapsible-body">+ <ul>+ <li class="subnav-orders"><a href="{% url 'dashboard:orders' %}">{% trans "Orders" %}</a></li>+ <li class="subnav-customers"><a href="{% url 'dashboard:customers' %}">{% trans "Customers" %}</a></li>+ <li class="subnav-payments"><a href="{% url 'dashboard:payments' %}">{% trans "Payments" %}</a></li>+ </ul>+ </div>+ </li>++ <li class="{% block menu_delivery_class %}{% endblock %}"><a href="{% url 'dashboard:shipping-methods' %}">{% trans "Shipping methods" %}</a></li>+ </ul>+ </li>+ </ul>+ </nav>+ </header>++ <main class="main">+ <div class="container">+ {% block content %}+ {% endblock %}+ </div>+ </main>++ <div class="hide-on-med-only"></div>+ <div class="hide-on-large-only"></div>+ <div id="base-modal" class="modal"></div>+ <div id="base-modal-fixed" class="modal modal-fixed-footer"></div>++ <!-- Core Scripts - Include with every page -->+ {% render_bundle 'vendor' 'js' %}+ {% render_bundle 'dashboard' 'js' %}+ <script src="{% static "versatileimagefield/js/versatileimagefield.js" %}"></script>+ {% include "dashboard/includes/_messages.html" %}++ {% block custom_js %}{% endblock %}+</body>+</html>diff --git a/templates/demo/dashboard/category/category_confirm_delete.html b/templates/demo/dashboard/category/category_confirm_delete.htmlnew file mode 100644index 0000000000..339bd32fe5--- /dev/null+++ b/templates/demo/dashboard/category/category_confirm_delete.html@@ -0,0 +1,57 @@+{% extends "dashboard/base.html" %}+{% load i18n %}+{% load mptt_tags %}++{% block title %}{% trans "Delete category" %} - {{ block.super }}{% endblock %}++{% block body_class %}body-categories{% endblock %}++{% block content %}+ <form class="form form-horizontal" action="" method="post" novalidate>+ {% csrf_token %}++ <div class="row">+ <div class="col-lg-12">+ <h1 class="page-header">+ {% blocktrans with category=category %}+ Are you sure you want to delete the category {{ category }}?+ {% endblocktrans %}+ </h1>+ </div>+ </div>++ <div class="row">+ <div class="col-lg-12">+ {% if descendants %}+ {% trans 'The following child categories will be deleted:' %}+ <ul>+ {% recursetree descendants %}+ <li>{{ node.name }}+ {% if not node.is_leaf_node %}+ <ul class="children">+ {{ children }}+ </ul>+ {% endif %}+ </li>+ {% endrecursetree %}+ </ul>+ {% endif %}++ {% if products_count %}+ {% blocktrans count counter=products_count %}+ There is one product in this category that will be deleted.+ {% plural %}+ There are {{ counter }} products in this category that will be deleted.+ {% endblocktrans %}+ {% endif %}+ </div>+ </div>++ <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:category-list' root_pk=category.pk %}"><i class="glyphicon glyphicon-remove"></i> {% trans "Cancel" %}</a>+ </div>+ </div>+ </form>+{% endblock %}diff --git a/templates/demo/dashboard/category/detail.html b/templates/demo/dashboard/category/detail.htmlnew file mode 100644index 0000000000..7409b2d122--- /dev/null+++ b/templates/demo/dashboard/category/detail.html@@ -0,0 +1,60 @@+{% extends "dashboard/base.html" %}+{% load materializecss %}+{% load i18n %}+{% load mptt_tags %}++{% block title %}{% if category.pk %}{{ category }}{% else %}{% trans 'Add new category' %}{% endif %} - {% trans 'Categories' %} - {{ block.super }}{% endblock %}++{% block body_class %}body-categories{% endblock %}++{% block page_title %}{% if category.pk %}{{ category }}{% else %}{% trans 'Add new category' %}{% endif %}{% endblock %}++{% block breadcrumbs %}+ <ul class="breadcrumbs breadcrumbs--with-menu">+ <li><a href="{% url 'dashboard:category-list' %}" class="breadcrumbs--ellipsed-item">{% trans "Categories" %}</a></li>+ {% if path %}+ {% for node in path %}+ <li><a href="{% url 'dashboard:category-list' root_pk=node.pk %}" class="breadcrumbs--ellipsed-item">{{ node.name }}</a></li>+ {% endfor %}+ {% endif %}+ <li>+ {% if category.pk %}+ <span class="breadcrumbs--ellipsed-item">{{ category }}</span>+ {% else %}+ <span class="breadcrumbs--ellipsed-item">{% trans 'Add new category' %}</span>+ {% endif %}+ </li>+ </ul>+{% endblock %}++{% block menu_catalogue_class %} active{% endblock %}++{% block content %}+ <form method="post" id="form-category" enctype="multipart/form-data" novalidate>+ {% csrf_token %}+ <div class="row">+ <div class="col l8">+ <div class="row">+ {{ form.name|materializecss:"s8 m10" }}+ {{ form.hidden|materializecss:"s4 m2" }}+ {{ form.description|materializecss }}+ </div>+ </div>+ </div>++ <div class="row">+ <div class="col s12 l8 right-align">+ {% if category.parent %}+ <a href="{% url 'dashboard:category-list' root_pk=category.parent.pk %}" class="btn-flat">{% trans "Cancel" %}</a>+ {% else %}+ <a href="{% url 'dashboard:category-list' %}" class="btn-flat">{% trans "Cancel" %}</a>+ {% endif %}+ {% if category.pk %}+ <button type="submit" class="btn">{% trans "Update" %}</button>+ {% else %}+ <button type="submit" class="btn">{% trans "Create" %}</button>+ {% endif %}+ </div>+ </div>+ </form>+{% endblock %}diff --git a/templates/demo/dashboard/category/list.html b/templates/demo/dashboard/category/list.htmlnew file mode 100644index 0000000000..d3d206d452--- /dev/null+++ b/templates/demo/dashboard/category/list.html@@ -0,0 +1,120 @@+{% extends "dashboard/base.html" %}+{% load i18n %}+{% load mptt_tags %}+{% load materializecss %}++{% block title %}{% trans "Categories" %} - {{ block.super }}{% endblock %}++{% block body_class %}body-categories{% endblock %}++{% block header_menu %}+ {% if root %}+ {% if root.parent %}+ {% url 'dashboard:category-list' root_pk=root.parent.pk as url %}+ {% else %}+ {% url 'dashboard:category-list' as url %}+ {% endif %}+ {% include "dashboard/includes/_back-link.html" with url=url %}+ {% else %}+ {{ block.super }}+ {% endif %}+{% endblock %}++{% block header_extra %}+ <div class="fixed-action-btn">+ <a class="btn-fab btn-floating btn-large waves-effect waves-light teal" title="{% trans "Add category" %}"+ href="{% if root %}{% url 'dashboard:category-add' root_pk=root.pk %}{% else %}{% url 'dashboard:category-add' %}{% endif %}">+ <i class="material-icons">add</i>+ </a>+ </div>++ {% if root %}+ <a class="dropdown-button" href="#" data-activates="category-delete" data-constrainwidth="false">+ <i class="material-icons">more_vert</i>+ </a>+ <ul id="category-delete" class="dropdown-content">+ <li>+ <a class="modal-trigger-custom" data-href="{% url 'dashboard:category-edit' root_pk=root.pk %}" href="#base-modal">+ {% trans "Edit category" %}+ </a>+ </li>++ <li>+ <a class="modal-trigger-custom" data-href="{% url 'dashboard:category-delete' pk=root.pk %}" href="#base-modal">+ {% trans "Remove category" %}+ </a>+ </li>+ </ul>+ {% endif %}+{% endblock %}++{% block breadcrumbs %}+ <ul class="breadcrumbs breadcrumbs--with-menu breadcrumbs--ellipsed">+ <li>+ {% if path %}+ <a href="{% url 'dashboard:category-list' %}" class="breadcrumbs--ellipsed-item">+ {% trans "Categories" %}+ </a>+ {% else %}+ <span class="breadcrumbs--ellipsed-item">{% trans "Categories" %}</span>+ {% endif %}+ </li>+ {% if path %}+ {% for node in path %}+ {% if forloop.last %}+ <li title="{{ node.name }}">+ <span class="breadcrumbs--ellipsed-item">+ {{ node.name }}+ </span>+ </li>+ {% else %}+ <li>+ <a title="{{ node.name }}" href="{% url 'dashboard:category-list' root_pk=node.pk %}" class="breadcrumbs--ellipsed-item">+ {{ node.name }}+ </a>+ </li>+ {% endif %}+ {% endfor %}+ {% endif %}+ </ul>+{% endblock %}++{% block menu_catalogue_class %} active{% endblock %}++{% block content %}+ <div class="row">+ <div class="col s12">+ <ul class="collection list">+ {% if categories %}+ {% for node in categories %}+ <li class="collection-item list-item list-item--two-lines">+ <a class="list-item-name" href="{% url 'dashboard:category-list' root_pk=node.pk %}">+ {{ node.name }}+ </a>++ <p class="list-item-desc"><span>+ {% if node.description %}+ {{ node.description }}+ {% else %}+ + {% endif %}+ </span></p>++ {% if node.hidden %}+ <span class="list-item-icon"><i class="material-icons">visibility_off</i></span>+ {% endif %}+ </li>+ {% endfor %}+ {% else %}+ <p>+ {% if root %}+ {% trans "No subcategories." %}+ {% else %}+ {% trans "No categories." %}+ {% endif %}+ </p>+ {% endif %}+ </ul>+ </div>+ </div>+{% endblock %}diff --git a/templates/demo/dashboard/category/modal_delete.html b/templates/demo/dashboard/category/modal_delete.htmlnew file mode 100644index 0000000000..8ad46f0cbd--- /dev/null+++ b/templates/demo/dashboard/category/modal_delete.html@@ -0,0 +1,49 @@+{% load i18n %}+{% load mptt_tags %}++<form method="post" id="form-category" class="form-async" action="{% url 'dashboard:category-delete' pk=category.pk %}" novalidate>+ {% csrf_token %}+ <div class="modal-content">+ <div class="row">+ <div class="col s12">+ <h5>+ {% blocktrans with category=category %}+ Are you sure you want to delete the category {{ category }}?+ {% endblocktrans %}+ </h5>+ </div>+ </div>++ {% if descendants %}+ <div class="row">+ <div class="col s12">+ {% trans 'The following child categories will be deleted:' %}+ <ul>+ {% recursetree descendants %}+ <li>{{ node.name }}+ {% if not node.is_leaf_node %}+ <ul class="children">+ {{ children }}+ </ul>+ {% endif %}+ </li>+ {% endrecursetree %}+ </ul>+ </div>+ </div>+ {% endif %}++ {% if products_count %}+ {% blocktrans count counter=products_count %}+ There is one product in this category that will be deleted.+ {% plural %}+ There are {{ counter }} products in this category that will be deleted.+ {% endblocktrans %}+ {% endif %}+ </div>++ <div class="modal-footer">+ <button type="submit" class="modal-action btn-flat blue-text">{% trans "Delete" %}</button>+ <a href="#!" class="modal-action modal-close btn-flat blue-text">{% trans "Cancel" %}</a>+ </div>+</form>diff --git a/templates/demo/dashboard/category/modal_edit.html b/templates/demo/dashboard/category/modal_edit.htmlnew file mode 100644index 0000000000..dde2c5c135--- /dev/null+++ b/templates/demo/dashboard/category/modal_edit.html@@ -0,0 +1,25 @@+{% load materializecss %}+{% load i18n %}+{% load mptt_tags %}++<form method="post" id="form-category" class="form-async" action="{% url 'dashboard:category-edit' root_pk=category.pk %}" novalidate>+ {% csrf_token %}+ <div class="modal-content">+ <div class="row">+ <div class="col s12">+ <h5>{% trans "Edit" %} {{ category }}</h5>+ </div>+ </div>++ <div class="row">+ {{ form.name|materializecss:"s8 m10" }}+ {{ form.hidden|materializecss:"s4 m2" }}+ {{ form.description|materializecss }}+ </div>+ </div>++ <div class="modal-footer">+ <button type="submit" class="modal-action btn-flat blue-text">{% trans "Update" %}</button>+ <a href="#!" class="modal-action modal-close btn-flat blue-text">{% trans "Cancel" %}</a>+ </div>+</form>diff --git a/templates/demo/dashboard/customer/detail.html b/templates/demo/dashboard/customer/detail.htmlnew file mode 100644index 0000000000..2946c33288--- /dev/null+++ b/templates/demo/dashboard/customer/detail.html@@ -0,0 +1,101 @@+{% extends "dashboard/base.html" %}+{% load prices_i18n %}+{% load i18n %}+{% load status %}++{% block title %}{{ customer }} - {% trans "Customers" %} - {{ block.super }}{% endblock %}++{% block body_class %}body-customers{% endblock %}++{% block header_menu %}+ {% url "dashboard:customers" as url %}+ {% include "dashboard/includes/_back-link.html" with url=url %}+{% endblock %}++{% block breadcrumbs %}+ <ul class="breadcrumbs">+ <li><a href="{% url "dashboard:customers" %}">{% trans "Customers" %}</a></li>+ <li>{{ customer }}</li>+ </ul>+{% endblock %}++{% block menu_sales_class %} active{% endblock %}++{% block content %}+<div class="row">+ <div class="col s12 l8">+ <div class="card">+ <div class="data-table-header{% if not customer_orders %} data-table-header--no-data{% endif %}">+ <span class="card-title black-text">{% trans "Order history" %}</span>+ </div>++ {% if customer_orders %}+ <div class="data-table-container">+ <table class="bordered hoverable responsive data-table">+ <thead>+ <tr>+ <th>{% trans "Number" %}</th>+ <th>{% trans "Placed on" %}</th>+ <th>{% trans "Payment" %}</th>+ <th>{% trans "Order status" %}</th>+ <th>{% trans "Total" %}</th>+ </tr>+ </thead>+ <tbody>+ {% for order in customer_orders %}+ <tr>+ <td><a href="{% url 'dashboard:order-details' order_pk=order.pk %}">{{ order }}</a></td>+ <td>{{ order.created }}</td>+ <td>{% render_status order.get_last_payment_status order.get_last_payment_status_display %}</td>+ <td>{% render_status order.status order.get_status_display %}</td>+ <td>{% gross order.get_total %}</td>+ </tr>+ {% endfor %}+ </tbody>+ </table>+ </div>+ {% else %}+ <div class="card-content card-content--no-data">+ <p>{% trans "No orders found." %}</p>+ </div>+ {% endif %}+ </div>+ </div>+ <div class="col s12 l4">+ <div class="row">+ <div class="col s12 m6 l12">+ <div class="card equal-height-on-med">+ <div class="card-content">+ <span class="card-title black-text">{% trans "Default shipping address" %}</span>++ {% if customer.default_shipping_address %}+ {% with customer.default_shipping_address as address %}+ {% include 'dashboard/includes/_address.html' with address=address only %}+ {% endwith %}+ {% else %}+ <span>{% trans "No default shipping address." %}</span>+ {% endif %}+ <i class="material-icons">email</i> <a href="mailto:{{ customer.email }}">{{ customer.email }}</a>+ </div>+ </div>+ </div>++ <div class="col s12 m6 l12">+ <div class="card equal-height-on-med">+ <div class="card-content">+ <span class="card-title black-text">{% trans "Default billing address" %}</span>++ {% if customer.default_billing_address %}+ {% with customer.default_billing_address as address %}+ {% include 'dashboard/includes/_address.html' with address=address only %}+ {% endwith %}+ {% else %}+ <span>{% trans "No default billing address." %}</span>+ {% endif %}+ </div>+ </div>+ </div>+ </div>+ </div>+</div>+{% endblock %}diff --git a/templates/demo/dashboard/customer/list.html b/templates/demo/dashboard/customer/list.htmlnew file mode 100644index 0000000000..c3c94aface--- /dev/null+++ b/templates/demo/dashboard/customer/list.html@@ -0,0 +1,90 @@+{% extends "dashboard/base.html" %}+{% load i18n %}+{% load prices_i18n %}+{% load materializecss %}++{% block title %}{% trans "Customers" %} - {{ block.super }}{% endblock %}++{% block body_class %}body-customers{% endblock %}++{% block breadcrumbs %}+ <ul class="breadcrumbs">+ <li>{% trans "Customers" %}</li>+ </ul>+{% endblock %}++{% block menu_sales_class %} active{% endblock %}++{% block content %}+ <form method="get" novalidate>+ <div class="row">+ {{ form.email|materializecss:"s12 m3 l3" }}+ {{ form.name|materializecss:"s12 m3 l3" }}+ {{ form.order_status|materializecss:"s7 m3 l2" }}++ <div class="col s5 m3 l3">+ <button type="submit" class="btn btn--inline">{% trans "Filter" %}</button>+ {% if form.is_bound %}+ <a class="btn btn--inline" href="{% url 'dashboard:customers' %}">{% trans "Clear" %}</a>+ {% endif %}+ </div>+ </div>+ </form>+++ <div class="card">+ <div class="data-table-header{% if not customers %} data-table-header--no-data{% endif %}">+ <h5 class="card-title black-text">{{ title }}</h5>+ </div>++ {% if customers %}+ <div class="data-table-container">+ <table class="bordered hoverable responsive data-table">+ <thead>+ <tr>+ <th>{% trans "Email" %}</th>+ <th class="wide">{% trans "Name" %}</th>+ <th>{% trans "Location" %}</th>+ <th class="right-align">{% trans "Number of orders" %}</th>+ <th>{% trans "Last order" %}</th>+ </tr>+ </thead>+ <tbody>+ {% for customer in customers %}+ <tr>+ {% with customer.default_billing_address as default_address %}+ <td>+ <a href="{% url "dashboard:customer-details" pk=customer.pk %}">{{ customer.email }}</a>+ </td>+ {% if default_address %}+ <td>+ {{ default_address.first_name }} {{ default_address.last_name }}+ </td>+ <td>+ {{ default_address.city }}, {{ default_address.get_country_display }}+ </td>+ {% else %}+ <td colspan="2"></td>+ {% endif %}+ {% endwith %}+ <td class="right-align">+ {{ customer.num_orders }}+ </td>+ <td>+ {% if customer.last_order %}+ <a href="{% url 'dashboard:order-details' order_pk=customer.last_order %}">#{{ customer.last_order }}</a>+ {% endif %}+ </td>+ </tr>+ {% endfor %}+ </tbody>+ </table>+ </div>+ {% else %}+ <div class="card-content card-content--no-data">+ <p>{% trans "No customers found." %}</p>+ </div>+ {% endif %}+ </div>+ {% include "dashboard/includes/_pagination.html" with page_obj=customers %}+{% endblock %}diff --git a/templates/demo/dashboard/discount/sale_confirm_delete.html b/templates/demo/dashboard/discount/sale_confirm_delete.htmlnew file mode 100644index 0000000000..962d8de6b6--- /dev/null+++ b/templates/demo/dashboard/discount/sale_confirm_delete.html@@ -0,0 +1,32 @@+{% extends "dashboard/base.html" %}+{% load i18n %}++{% block title %}{% trans "Delete sale" %} - {{ block.super }}{% endblock %}++{% block breadcrumbs %}+ <ul class="breadcrumbs breadcrumbs--with-menu">+ <li><a href="{% url 'dashboard:product-attributes' %}" class="breadcrumbs--ellipsed-item">{% trans "Discounts" %}</a></li>+ <li><span class="breadcrumbs--ellipsed-item">{% trans "Delete sale" %}</span></li>+ </ul>+{% endblock %}++{% block content %}+ <p>{% trans "Are you sure you want to delete the following sale?" %}</p>+ <form method="post" novalidate>+ {% csrf_token %}+ <div class="row">+ <ul class="collection">+ <li class="collection-item">+ {{ sale }}+ </li>+ </ul>+ </div>++ <div class="row">+ <div class="col m6 l4 offset-m3 offset-l4 right-align">+ <a href="{% url 'dashboard:sale-list' %}" class="btn-flat"><i class="material-icons">clear</i> {% trans "Cancel" %}</a>+ <button type="submit" class="btn materialize-red"><i class="material-icons">delete_forever</i> {% trans "Delete" %}</button>+ </div>+ </div>+ </form>+{% endblock %}diff --git a/templates/demo/dashboard/discount/sale_form.html b/templates/demo/dashboard/discount/sale_form.htmlnew file mode 100644index 0000000000..ff1cb716e7--- /dev/null+++ b/templates/demo/dashboard/discount/sale_form.html@@ -0,0 +1,69 @@+{% extends "dashboard/base.html" %}+{% load i18n %}+{% load materializecss %}+{% load static %}++{% block title %}{% if sale.pk %}{{ sale }}{% else %}{% trans 'Add new sale' %}+{% endif %} - {% trans "Sales" %} - {{ block.super }}{% endblock %}++{% block body_class %}body-sales{% endblock %}++{% block header_menu %}+ {% url "dashboard:sale-list" as url %}+ {% include "dashboard/includes/_back-link.html" with url=url %}+{% endblock %}++{% block header_extra %}+ {% if sale.pk %}+ <a class="dropdown-button" href="#" data-activates="sale-delete"+ data-constrainwidth="false">+ <i class="material-icons">more_vert</i>+ </a>+ <ul id="sale-delete" class="dropdown-content">+ <li>+ <a class="modal-trigger-custom" href="#base-modal"+ data-href="{% url 'dashboard:sale-delete' pk=sale.pk %}">+ {% trans "Remove sale" %}+ </a>+ </li>+ </ul>+ {% endif %}+{% endblock %}++{% block breadcrumbs %}+ <ul class="breadcrumbs breadcrumbs--with-menu">+ <li><a href="{% url 'dashboard:sale-list' %}"+ class="breadcrumbs--ellipsed-item">{% trans "Sales" %}</a></li>+ <li><span class="breadcrumbs--ellipsed-item">{% if sale.pk %}{{ sale }}{% else %}+ {% trans 'Add new sale' %}{% endif %}</span></li>+ </ul>+{% endblock %}++{% block menu_discounts_class %} active{% endblock %}++{% block content %}+ <form method="post" enctype="multipart/form-data" id="form-sales" novalidate>+ <div class="row">+ <div class="col l8">+ <div class="row">+ {% csrf_token %}+ {{ form.name|materializecss }}+ {{ form.value|materializecss:"s12 m8" }}+ {{ form.type|materializecss:"s12 m4" }}+ {{ form.products|materializecss }}+ {{ form.categories|materializecss }}+ </div>+ </div>+ </div>++ <div class="row">+ <div class="col l8 right-align">+ {% if sale.pk %}+ <button type="submit" class="btn">{% trans "Update" %}</button>+ {% else %}+ <button type="submit" class="btn">{% trans "Create" %}</button>+ {% endif %}+ </div>+ </div>+ </form>+{% endblock %}diff --git a/templates/demo/dashboard/discount/sale_list.html b/templates/demo/dashboard/discount/sale_list.htmlnew file mode 100644index 0000000000..191cf37686--- /dev/null+++ b/templates/demo/dashboard/discount/sale_list.html@@ -0,0 +1,56 @@+{% extends "dashboard/base.html" %}+{% load i18n %}+{% load prices_i18n %}+{% load materializecss %}++{% block title %}{% trans "Sales" %} - {{ block.super }}{% endblock %}++{% block body_class %}body-sales{% endblock %}++{% block header_extra %}+ <div class="fixed-action-btn">+ <a class="btn-fab btn-floating btn-large waves-effect waves-light teal"+ href="{% url 'dashboard:sale-add' %}" title="{% trans "Add sale" %}">+ <i class="material-icons">add</i>+ </a>+ </div>+{% endblock %}++{% block breadcrumbs %}+ <ul class="breadcrumbs">+ <li>{% trans "Sales" %}</li>+ </ul>+{% endblock %}++{% block menu_discounts_class %} active{% endblock %}++{% block content %}+ {% if sales %}+ <div class="card">+ <div class="data-table-container">+ <table class="bordered hoverable responsive data-table">+ <thead>+ <tr>+ <th>{% trans "Name" %}</th>+ <th>{% trans "Discount" %}</th>+ </tr>+ </thead>+ <tbody>+ {% for sale in sales %}+ <tr>+ <td>+ <a href="{% url 'dashboard:sale-update' pk=sale.pk %}">{{ sale }}</a>+ </td>+ <td>{{ sale.value }}{{ sale.get_type_display }}</td>+ </tr>+ {% endfor %}+ </tbody>+ </table>+ </div>+ </div>++ {% include "dashboard/includes/_pagination.html" %}+ {% else %}+ <p>{% trans "No sales found." %}</p>+ {% endif %}+{% endblock %}diff --git a/templates/demo/dashboard/discount/sale_modal_confirm_delete.html b/templates/demo/dashboard/discount/sale_modal_confirm_delete.htmlnew file mode 100644index 0000000000..20c6e83501--- /dev/null+++ b/templates/demo/dashboard/discount/sale_modal_confirm_delete.html@@ -0,0 +1,17 @@+{% load i18n %}++<form action="{% url "dashboard:sale-delete" pk=sale.pk %}" method="post" novalidate>+ {% csrf_token %}+ <div class="modal-content">+ <h5>{% trans "Are you sure?" %}</h5>++ <p>+ {% blocktrans %}You are about to delete <strong>{{ sale }}</strong>.{% endblocktrans %}+ </p>+ </div>++ <div class="modal-footer">+ <button type="submit" class="modal-action btn-flat blue-text">{% trans "Delete" %}</button>+ <a href="#!" class="modal-action modal-close btn-flat blue-text">{% trans "Cancel" %}</a>+ </div>+</form>diff --git a/templates/demo/dashboard/discount/voucher_form.html b/templates/demo/dashboard/discount/voucher_form.htmlnew file mode 100644index 0000000000..cb911828f5--- /dev/null+++ b/templates/demo/dashboard/discount/voucher_form.html@@ -0,0 +1,90 @@+{% extends "dashboard/base.html" %}+{% load i18n %}+{% load materializecss %}+{% load static %}++{% block title %}{% if voucher.pk %}{{ voucher }}{% else %}{% trans 'Add new voucher' %}+{% endif %} - {% trans "Vouchers" %} - {{ block.super }}{% endblock %}++{% block body_class %}body-vouchers{% endblock %}++{% block header_menu %}+ {% url "dashboard:voucher-list" as url %}+ {% include "dashboard/includes/_back-link.html" with url=url %}+{% endblock %}++{% block header_extra %}+ {% if voucher.pk %}+ <a class="dropdown-button" href="#" data-activates="voucher-delete"+ data-constrainwidth="false">+ <i class="material-icons">more_vert</i>+ </a>+ <ul id="voucher-delete" class="dropdown-content">+ <li>+ <a class="modal-trigger-custom" href="#base-modal" data-href="{% url 'dashboard:voucher-delete' pk=voucher.pk %}">+ {% trans "Remove voucher" %}+ </a>+ </li>+ </ul>+ {% endif %}+{% endblock %}++{% block breadcrumbs %}+ <ul class="breadcrumbs breadcrumbs--with-menu">+ <li><a href="{% url 'dashboard:voucher-list' %}"+ class="breadcrumbs--ellipsed-item">{% trans "Vouchers" %}</a></li>+ <li><span class="breadcrumbs--ellipsed-item">{% if voucher.pk %}+ {{ voucher }}{% else %}{% trans 'Add new voucher' %}{% endif %}</span></li>+ </ul>+{% endblock %}++{% block menu_discounts_class %} active{% endblock %}++{% block content %}+ <form method="post" enctype="multipart/form-data" id="form-vouchers" novalidate>+ {% csrf_token %}+ {% if form.non_field_errors %}+ <blockquote>+ {% for non_field_error in form.non_field_errors %}+ {{ non_field_error }}+ {% endfor %}+ </blockquote>+ {% endif %}+ <div class="row">+ <div class="col s12 l8">+ <div class="row">+ {{ form.code|materializecss }}+ {{ form.name|materializecss }}+ {{ form.discount_value|materializecss:"s12 m8" }}+ {{ form.discount_value_type|materializecss:"s12 m4" }}+ {{ form.type|materializecss }}+ </div>+ {% for form_type, form in type_base_forms.items %}+ <div class="row voucher-form" data-type="{{ form_type }}">+ {% for field in form %}+ {{ field|materializecss:"s12 m6" }}+ {% endfor %}+ </div>+ {% endfor %}+ </div>++ <div class="col s12 l4">+ <div class="row">+ {{ form.start_date|materializecss:"input-field s12" }}+ {{ form.end_date|materializecss:"input-field s12" }}+ {{ form.usage_limit|materializecss }}+ </div>+ </div>+ </div>++ <div class="row">+ <div class="col l8 right-align">+ {% if voucher.pk %}+ <button type="submit" class="btn">{% trans "Update" %}</button>+ {% else %}+ <button type="submit" class="btn">{% trans "Create" %}</button>+ {% endif %}+ </div>+ </div>+ </form>+{% endblock %}diff --git a/templates/demo/dashboard/discount/voucher_list.html b/templates/demo/dashboard/discount/voucher_list.htmlnew file mode 100644index 0000000000..3ff24a1b27--- /dev/null+++ b/templates/demo/dashboard/discount/voucher_list.html@@ -0,0 +1,79 @@+{% extends "dashboard/base.html" %}+{% load i18n %}+{% load prices_i18n %}+{% load materializecss %}++{% block title %}{% trans "Vouchers" %} - {{ block.super }}{% endblock %}++{% block body_class %}body-vouchers{% endblock %}++{% block header_extra %}+ <div class="fixed-action-btn">+ <a class="btn-fab btn-floating btn-large waves-effect waves-light teal"+ href="{% url 'dashboard:voucher-add' %}" title="{% trans "Add voucher" %}">+ <i class="material-icons">add</i>+ </a>+ </div>+{% endblock %}++{% block breadcrumbs %}+ <ul class="breadcrumbs">+ <li>{% trans "Vouchers" %}</li>+ </ul>+{% endblock %}++{% block menu_discounts_class %} active{% endblock %}++{% block content %}+ {% if vouchers %}+ <div class="card">+ <div class="data-table-container">+ <table class="bordered hoverable responsive data-table">+ <thead>+ <tr>+ <th class="wide">{% trans "Name" %}</th>+ <th>{% trans "Discount" %}</th>+ <th>{% trans "Start date" %}</th>+ <th>{% trans "End date" %}</th>+ <th>{% trans "Used" %}</th>+ <th>{% trans "Apply to" %}</th>+ <th>{% trans "Limit" %}</th>+ </tr>+ </thead>+ <tbody>+ {% for voucher in vouchers %}+ <tr>+ <td>+ <a href="{% url 'dashboard:voucher-update' pk=voucher.pk %}">{{ voucher }}</a>+ </td>+ <td>+ {{ voucher.discount_value }}{{ voucher.get_discount_value_type_display }}</td>+ <td>{{ voucher.start_date }}</td>+ <td>{{ voucher.end_date|default_if_none:"-" }}</td>+ <td>+ {% if voucher.usage_limit or voucher.usage_limit == 0 %}+ {{ voucher.used }}/{{ voucher.usage_limit }}+ {% else %}+ {{ voucher.used }}+ {% endif %}+ </td>+ <td>{{ voucher.get_apply_to_display|default_if_none:"-" }}</td>+ <td>+ {% if voucher.limit %}+ {% gross voucher.limit %}+ {% else %}+ -+ {% endif %}+ </td>+ </tr>+ {% endfor %}+ </tbody>+ </table>+ </div>+ </div>++ {% include "dashboard/includes/_pagination.html" %}+ {% else %}+ <p>{% trans "No vouchers found." %}</p>+ {% endif %}+{% endblock %}diff --git a/templates/demo/dashboard/discount/voucher_modal_confirm_delete.html b/templates/demo/dashboard/discount/voucher_modal_confirm_delete.htmlnew file mode 100644index 0000000000..f4f2c57daa--- /dev/null+++ b/templates/demo/dashboard/discount/voucher_modal_confirm_delete.html@@ -0,0 +1,17 @@+{% load i18n %}++<form action="{% url "dashboard:voucher-delete" pk=voucher.pk %}" method="post" novalidate>+ {% csrf_token %}+ <div class="modal-content">+ <h5>{% trans "Are you sure?" %}</h5>++ <p>+ {% blocktrans %}You are about to delete <strong>{{ voucher }}</strong>.{% endblocktrans %}+ </p>+ </div>++ <div class="modal-footer">+ <button type="submit" class="modal-action btn-flat blue-text">{% trans "Delete" %}</button>+ <a href="#!" class="modal-action modal-close btn-flat blue-text">{% trans "Cancel" %}</a>+ </div>+</form>diff --git a/templates/demo/dashboard/includes/_address.html b/templates/demo/dashboard/includes/_address.htmlnew file mode 100644index 0000000000..7808689498--- /dev/null+++ b/templates/demo/dashboard/includes/_address.html@@ -0,0 +1,7 @@+{% load format_address from i18n_address_tags %}+<div class="address">+ <div class="formatted-address">{% format_address address latin=True %}</div>+ {% if address.phone %}+ <div><i class="material-icons">contact_phone</i> <a href="tel:{{ address.phone }}">{{ address.phone }}</a></div>+ {% endif %}+</div>diff --git a/templates/demo/dashboard/includes/_back-link.html b/templates/demo/dashboard/includes/_back-link.htmlnew file mode 100644index 0000000000..65f8d02f6c--- /dev/null+++ b/templates/demo/dashboard/includes/_back-link.html@@ -0,0 +1 @@+<a href="{{ url }}{% if hash %}{{ hash }}{% endif %}" class="header-button"><i class="material-icons">arrow_back</i></a>diff --git a/templates/demo/dashboard/includes/_messages.html b/templates/demo/dashboard/includes/_messages.htmlnew file mode 100644index 0000000000..8343bf8ee1--- /dev/null+++ b/templates/demo/dashboard/includes/_messages.html@@ -0,0 +1,23 @@+{% if messages %}+<script>+ {% for message in messages %}+ {% if 'safe' in message.tags %}+ Materialize.toast('{{ message|safe|escapejs }}', 5000);+ {% else %}+ Materialize.toast('{{ message|escapejs }}', 5000);+ {% endif %}+ {% endfor %}+</script>+{% endif %}++{% if form.non_field_errors %}+<script>+ {% for message in form.non_field_errors %}+ {% if 'safe' in message.tags %}+ Materialize.toast('{{ message|safe|escapejs }}', 5000);+ {% else %}+ Materialize.toast('{{ message|escapejs }}', 5000);+ {% endif %}+ {% endfor %}+</script>+{% endif %}diff --git a/templates/demo/dashboard/includes/_orders_table.html b/templates/demo/dashboard/includes/_orders_table.htmlnew file mode 100644index 0000000000..ae0854e5fc--- /dev/null+++ b/templates/demo/dashboard/includes/_orders_table.html@@ -0,0 +1,32 @@+{% load i18n %}+{% load prices_i18n %}+{% load status %}++<div class="data-table-container">+ <table class="bordered hoverable responsive data-table">+ <thead>+ <tr>+ <th></th>+ <th>{% trans "Order status" %}</th>+ <th>{% trans "Payment status" %}</th>+ <th>{% trans "Customer" %}</th>+ <th>{% trans "Placed on" %}</th>+ <th>{% trans "Total" %}</th>+ </tr>+ </thead>+ <tbody>+ {% for order in orders %}+ <tr>+ <td>+ <a href="{% url 'dashboard:order-details' order_pk=order.pk %}">#{{ order.id }}</a>+ </td>+ <td>{% render_status order.status order.get_status_display %}</td>+ <td>{% render_status order.get_last_payment_status order.get_last_payment_status_display %}</td>+ <td>{{ order.user|default:_("Guest") }}</td>+ <td>{{ order.created }}</td>+ <td>{% gross order.get_total %}</td>+ </tr>+ {% endfor %}+ </tbody>+ </table>+</div>diff --git a/templates/demo/dashboard/includes/_pagination.html b/templates/demo/dashboard/includes/_pagination.htmlnew file mode 100644index 0000000000..5ba46c3351--- /dev/null+++ b/templates/demo/dashboard/includes/_pagination.html@@ -0,0 +1,31 @@+{% load i18n %}+{% load utils %}+{% if page_obj.paginator.num_pages > 1 %}+ <ul class="pagination">+ <li{% if not page_obj.has_previous %} class="disabled"{% endif %}>+ {% if page_obj.has_previous %}+ <a href="{% construct_get_query page=page_obj.previous_page_number %}">+ <i class="material-icons">chevron_left</i>+ </a>+ {% else %}+ <span><i class="material-icons">chevron_left</i></span>+ {% endif %}+ </li>+ {% for page in page_obj.paginator.page_range %}+ <li class="{% if page == page_obj.number %}active{% else %}waves-effect{% endif %}">+ <a href="{% construct_get_query page=page %}">+ {{ page }}+ </a>+ </li>+ {% endfor %}+ <li{% if not page_obj.has_next %} class="disabled"{% endif %}>+ {% if page_obj.has_next %}+ <a href="{% construct_get_query page=page_obj.next_page_number %}">+ <i class="material-icons">chevron_right</i>+ </a>+ {% else %}+ <span><i class="material-icons">chevron_right</i></span>+ {% endif %}+ </li>+ </ul>+{% endif %}diff --git a/templates/demo/dashboard/includes/_status_filters.html b/templates/demo/dashboard/includes/_status_filters.htmlnew file mode 100644index 0000000000..10d47e3d53--- /dev/null+++ b/templates/demo/dashboard/includes/_status_filters.html@@ -0,0 +1,11 @@+{% load i18n %}+{% load materializecss %}++<form method="get" novalidate>+ <div class="row">+ {{ form|materializecss:"s8 m4" }}+ <div class="col s4 m2 left-align">+ <button type="submit" class="btn btn--inline">{% trans "Filter" %}</button>+ </div>+ </div>+</form>diff --git a/templates/demo/dashboard/includes/address_short.html b/templates/demo/dashboard/includes/address_short.htmlnew file mode 100644index 0000000000..204061e658--- /dev/null+++ b/templates/demo/dashboard/includes/address_short.html@@ -0,0 +1,11 @@+{% load i18n %}+<span class="address-details"+ data-content="{% if address.company_name %}{{ address.company_name }}<br>{% endif %}+ {{ address.street_address_1 }}<br>+ {% if address.street_address_2 %}+ {{ address.street_address_2 }}<br>+ {% endif %}+ {{ address.postal_code }} {{ address.city }}<br>+ {% if address.country_area %}{{ address.country_area }}, {% endif %}{{ address.get_country_display }}<br>+ {{ 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/templates/demo/dashboard/index.html b/templates/demo/dashboard/index.htmlnew file mode 100644index 0000000000..5eec881cde--- /dev/null+++ b/templates/demo/dashboard/index.html@@ -0,0 +1,80 @@+{% extends "dashboard/base.html" %}+{% load i18n %}+{% load prices_i18n %}++{% block title %}{{ block.super }}{% endblock %}++{% 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="card-title black-text">{% trans "Preauthorized payments" %}</span>+ </div>++ {% if preauthorized_payments %}+ <div class="data-table-container">+ <table class="bordered hoverable responsive data-table">+ <thead>+ <tr>+ <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" order_pk=payment.order.pk %}">{{ payment.order }}</a></td>+ <td>{{ payment.created }}</td>+ <td>{{ payment.order.user|default:_("Guest") }}</td>+ <td class="text-right">{% gross payment.get_total_price %}</td>+ </tr>+ {% endfor %}+ </tbody>+ </table>+ </div>+ {% else %}+ <div class="card-content card-content--no-data">+ <p>{% trans "No preauthorized payments." %}</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">{% trans "Orders ready for shipment" %}</span>+ </div>++ {% if orders_to_ship %}+ {% include "dashboard/includes/_orders_table.html" with orders=orders_to_ship %}+ {% else %}+ <div class="card-content card-content--no-data">+ <p>{% trans "No orders are ready for shipment." %}</p>+ </div>+ {% endif %}+ </div>++ <div class="card">+ <div class="card-content">+ <span class="card-title black-text">{% trans "Products with low stock" %}</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." %}</p>+ {% endif %}+ </div>+ </div>+ </div>+</div>+{% endblock %}diff --git a/templates/demo/dashboard/order/detail.html b/templates/demo/dashboard/order/detail.htmlnew file mode 100644index 0000000000..bdbf9f6a12--- /dev/null+++ b/templates/demo/dashboard/order/detail.html@@ -0,0 +1,419 @@+{% extends "dashboard/base.html" %}+{% load prices_i18n %}+{% load i18n %}+{% load materializecss %}+{% load status %}+{% load discount_amount_for from prices %}++{% block title %}{{ order }} - {% trans "Orders" %} - {{ block.super }}{% endblock %}++{% block body_class %}body-orders{% endblock %}++{% block header_menu %}+ {% url "dashboard:orders" as url %}+ {% include "dashboard/includes/_back-link.html" with url=url %}+{% endblock %}++{% block header_extra %}+ {% if order.can_cancel %}+ <a class="dropdown-button" href="#" data-activates="context-menu" data-constrainwidth="false">+ <i class="material-icons">more_vert</i>+ </a>+ <ul id="context-menu" class="dropdown-content">+ <li>+ <a href="#base-modal" data-href="{% url "dashboard:order-cancel" order_pk=order.pk %}"+ class="modal-trigger-custom">+ {% trans "Cancel Order" %}+ </a>+ </li>+ </ul>+ {% endif %}+{% 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 %}+ <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 "Details" %}</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 l4 switch-two-columns">+ <div class="card grey lighten-4">+ <div class="card-content data-table-container">+ <span class="card-title black-text">Order summary</span>++ <table class="order-summary responsive-table">+ <tbody>+ <tr>+ <td>{% trans "Account" %}</td>+ <td class="right-align">+ {% if order.user %}+ <a href="{% url "dashboard:customer-details" pk=order.user.pk %}">{{ order.user }}</a>+ {% else %}+ {% trans "Guest" %}+ {% endif %}+ </td>+ </tr>+ <tr>+ <td>{% trans "Order status" %}</td>+ <td class="right-align">{% render_status order.status order.get_status_display %}</td>+ </tr>+ <tr>+ <td>{% trans "Payment status:" %}</td>+ <td class="right-align">{% if payment %}{% render_status payment.status payment.get_status_display %}{% else %}{% trans "N/A" %}{% endif %}</td>+ </tr>+ <tr>+ <td>{% trans "Order total" %}</td>+ <td class="right-align"><strong>{% gross order.get_total %}</strong></td>+ </tr>+ <tr>+ <td>{% trans "Preauthorized amount" %}</td>+ <td class="right-align">{% if preauthorized %}{% gross preauthorized %}{% else %}{% trans "N/A" %}{% endif %}</td>+ </tr>+ <tr>+ <td>{% trans "Captured amount" %}</td>+ <td class="right-align">{% gross captured %}</td>+ </tr>+ <tr>+ <td>{% trans "Outstanding balance" %}</td>+ <td class="right-align">{% gross balance %}</td>+ </tr>+ </tbody>+ </table>+ </div>++ {% if can_capture or can_refund or can_release %}+ <div class="card-action">+ {% if can_capture %}+ <a href="#base-modal" data-href="{% url 'dashboard:capture-payment' order_pk=order.pk payment_pk=payment.pk %}"+ class="modal-trigger-custom">{% trans "Capture" %}</a>+ {% elif can_refund %}+ <a href="#base-modal" data-href="{% url 'dashboard:refund-payment' order_pk=order.pk payment_pk=payment.pk %}"+ class="modal-trigger-custom">{% trans "Refund" %}</a>+ {% endif %}+ {% if can_release %}+ <a href="#base-modal" data-href="{% url 'dashboard:release-payment' order_pk=order.pk payment_pk=payment.pk %}"+ class="modal-trigger-custom">{% trans "Release" %}</a>+ {% endif %}+ </div>+ {% endif %}+ </div>++ {% with order.shipping_address as address %}+ <div class="row">+ {% if address %}+ <div class="col s12 m6 l12">+ <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="material-icons">email</i> <a href="mailto:{{ order.user_email }}">{{ order.user_email }}</a>+ </div>+ </div>++ <div class="card-action">+ <a href="#base-modal-fixed" class="modal-trigger-custom"+ data-href="{% url "dashboard:address-edit" order_pk=order.pk address_type="shipping" %}">Edit</a>+ </div>+ </div>+ </div>+ {% endif %}++ <div class="col s12 {% if address %}m6{% else %}m12{% endif %} l12">+ <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="material-icons">email</i> <a href="mailto:{{ order.user_email }}">{{ order.user_email }}</a>+ </div>+ {% endwith %}+ </div>++ <div class="card-action">+ <a href="#base-modal-fixed" class="modal-trigger-custom"+ data-href="{% url "dashboard:address-edit" order_pk=order.pk address_type="billing" %}">Edit</a>+ </div>+ </div>+ </div>+ </div>+ {% endwith %}+ </div>++ <div class="col s12 l8 switch-two-columns">+ {% 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 %}+ {% if group.can_cancel %}+ <a class="dropdown-button right" href="#" data-activates="group-actions-{{ group.pk }}" data-constrainwidth="false">+ <i class="material-icons">more_vert</i>+ </a>+ {% endif %}+ {% render_status group.status group.get_status_display %}+ </h5>+ <ul id="group-actions-{{ group.pk }}" class="dropdown-content">+ <li>+ <a href="#base-modal" data-href="{% url 'dashboard:cancel-delivery-group' order_pk=order.pk group_pk=group.pk %}" class="modal-trigger-custom"+ title="{% trans "Cancel group" %}">+ {% trans "Cancel group" %}+ </a>+ </li>+ </ul>+ </div>++ <div class="data-table-container">+ <table class="bordered hoverable responsive data-table">+ <thead>+ <tr>+ <th class="wide">{% trans "Item" %}</th>+ <th>{% trans "SKU" %}</th>+ <th class="right-align">{% trans "Price" %}</th>+ <th class="right-align">{% trans "Quantity" %}</th>+ <th class="right-align">{% trans "Total" %}</th>+ <th class="no-padded"></th>+ </tr>+ </thead>++ <tfoot>+ {% if group.shipping_price.gross or group.is_shipping_required %}+ <tr>+ <td colspan="4">+ {% trans "Shipping" %} ({{ group.shipping_method_name }})+ </td>+ <td class="right-align">+ {% gross group.shipping_price %}+ </td>+ <td class="no-padded"></td>+ </tr>+ {% endif %}+ </tfoot>++ <tbody>+ {% for item in group.items.all %}+ <tr>+ <td>+ {{ item.product_name }}<br>+ </td>+ <td>{{ 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 no-padded">+ {% if group.status != 'cancelled' %}+ <a class="dropdown-button" href="#" data-activates="line-actions-{{ item.pk }}" data-constrainwidth="false">+ <i class="material-icons">more_vert</i>+ </a>+ <ul id="line-actions-{{ item.pk }}" class="dropdown-content">+ <li>+ <a href="#base-modal" data-href="{% url 'dashboard:orderline-change-quantity' order_pk=order.pk line_pk=item.pk %}" class="modal-trigger-custom"+ {% if group.status != 'new' %} disabled{% endif %} title="{% trans "Change quantity" %}">+ {% trans "Change quantity" %}+ </a>+ </li>+ <li>+ <a href="#base-modal" data-href="{% url 'dashboard:orderline-split' order_pk=order.pk line_pk=item.pk %}" class="modal-trigger-custom"+ {% if group.status != 'new' %} disabled{% endif %} title="{% trans "Split line" %}">+ {% trans "Split order line" %}+ </a>+ </li>+ <li>+ <a href="#base-modal" data-href="{% url 'dashboard:orderline-cancel' order_pk=order.pk line_pk=item.pk %}" class="modal-trigger-custom"+ title="{% trans "Cancel line" %}">+ {% trans "Cancel line" %}+ </a>+ </li>+ </ul>+ {% endif %}+ </td>+ </tr>+ {% endfor %}+ </tbody>+ </table>+ </div>++ {% if group.can_ship %}+ <div class="card-action">+ <a href="#base-modal" data-href="{% url 'dashboard:ship-delivery-group' order_pk=order.pk group_pk=group.pk %}" class="modal-trigger-custom">+ {% trans "Ship" %}+ </a>+ </div>+ {% endif %}+ </div>+ {% endfor %}++ <div class="card" id="order-totals">+ <div class="data-table-container">+ <table class="bordered hoverable responsive data-table">+ <tfoot>+ <tr>+ <td>+ {% trans "Grand total" %}+ </td>+ <td>+ {% gross order.get_total %}+ </td>+ <td class="no-padded"></td>+ </tr>+ </tfoot>++ <tbody>+ <tr>+ <td class="wide">+ {% trans "Subtotal" %}+ </td>+ <td class="right-align">+ {% gross order.get_subtotal_without_voucher %}+ </td>+ <td class="no-padded"></td>+ </tr>+ <tr>+ <td>{% trans "Shipping" %}</td>+ <td class="right-align">+ {% gross order.get_total_shipping %}+ </td>+ <td class="no-padded"></td>+ </tr>+ {% if order.discount_amount.gross %}+ <tr>+ <td>+ {% blocktrans with voucher=order.discount_name %}Voucher {{ voucher }}{% endblocktrans %}+ </td>+ <td class="right-align">+ {% gross order.discount|discount_amount_for:order.total %}+ </td>+ <td class="no-padded">+ <a class="dropdown-button" href="#" data-activates="voucher-actions" data-constrainwidth="false">+ <i class="material-icons">more_vert</i>+ </a>++ <ul id="voucher-actions" class="dropdown-content">+ <li>+ <a href="#base-modal" data-href="{% url 'dashboard:order-remove-voucher' order_pk=order.pk %}" class="modal-trigger-custom"+ title="{% trans "Remove voucher" %}">+ {% trans "Remove voucher" %}+ </a>+ </li>+ </ul>+ </td>+ </tr>+ {% endif %}+ </tbody>+ </table>+ </div>+ </div>++ <div class="card" id="order-notes">+ <div class="card-content">+ <span class="card-title black-text">{% trans "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 %}+ <p>{% trans "There are no notes associated with this order." %}</p>+ {% endif %}+ </div>++ <div class="card-action">+ <a data-href="{% url "dashboard:order-add-note" order_pk=order.pk %}"+ class="modal-trigger-custom" href="#base-modal">{% trans "Add note" %}</a>+ </div>+ </div>+ </div>+ </div>++ <div class="tab-content" id="payment-history">+ {% if all_payments %}+ <div class="card">+ <div class="data-table-container">+ <table class="bordered hoverable responsive data-table">+ <thead>+ <tr>+ <th></th>+ <th>{% trans "Date" %}</th>+ <th class="wide">{% trans "Payment status" %}</th>+ </tr>+ </thead>++ <tbody>+ {% for payment in all_payments %}+ <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>+ </tr>+ {% endfor %}+ </tbody>+ </table>+ </div>+ </div>+ {% else %}+ <p>{% trans "No payments made for this order." %}</p>+ {% endif %}+ </div>++ <div class="card tab-content" id="order-history">+ <div class="data-table-container">+ <table class="bordered hoverable responsive data-table">+ <thead>+ <tr>+ <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>+ <td>{{ event.date }}</td>+ <td>{% render_status event.status event.get_status_display %}</td>+ <td>+ {% if event.user %}+ {{ event.user }}+ {% endif %}+ </td>+ <td>{{ event.comment|default:"" }}</td>+ </tr>+ {% endfor %}+ </tbody>+ </table>+ </div>+ </div>+{% endblock %}diff --git a/templates/demo/dashboard/order/list.html b/templates/demo/dashboard/order/list.htmlnew file mode 100644index 0000000000..80888e1af7--- /dev/null+++ b/templates/demo/dashboard/order/list.html@@ -0,0 +1,31 @@+{% extends "dashboard/base.html" %}+{% load i18n %}+{% load prices_i18n %}+{% load status %}++{% block title %}{% trans "Orders" %} - {{ block.super }}{% endblock %}++{% block body_class %}body-orders{% endblock %}++{% block breadcrumbs %}+ <ul class="breadcrumbs">+ <li>{% trans "Orders" %}</li>+ </ul>+{% endblock %}++{% block menu_sales_class %} active{% endblock %}++{% block content %}+ {% include "dashboard/includes/_status_filters.html" %}+ {% if object_list %}+ <div class="card">+ {% include "dashboard/includes/_orders_table.html" with orders=object_list %}+ </div>++ <div class="row">+ {% include "dashboard/includes/_pagination.html" %}+ </div>+ {% else %}+ <p>{% trans "No orders." %}</p>+ {% endif %}+{% endblock %}diff --git a/templates/demo/dashboard/order/modal_add_note.html b/templates/demo/dashboard/order/modal_add_note.htmlnew file mode 100644index 0000000000..af6a232ae7--- /dev/null+++ b/templates/demo/dashboard/order/modal_add_note.html@@ -0,0 +1,18 @@+{% load i18n %}+{% load materializecss %}++<form role="form" method="post" action="{% url 'dashboard:order-add-note' order_pk=order.pk %}" class="form-async" novalidate>+ {% csrf_token %}+ <div class="modal-content">+ <h5>{% trans "Add note" %}</h5>++ <div class="row">+ {{ form|materializecss }}+ </div>+ </div>++ <div class="modal-footer">+ <button type="submit" class="modal-action btn-flat blue-text btn-">{% trans "Save note" %}</button>+ <a href="#!" class="modal-action modal-close btn-flat blue-text">{% trans "Cancel" %}</a>+ </div>+</form>diff --git a/templates/demo/dashboard/order/modal_address_edit.html b/templates/demo/dashboard/order/modal_address_edit.htmlnew file mode 100644index 0000000000..e06cafefb8--- /dev/null+++ b/templates/demo/dashboard/order/modal_address_edit.html@@ -0,0 +1,23 @@+{% load i18n %}+{% load materializecss %}++<form class="form-async" role="form" method="post" action="{% url 'dashboard:address-edit' order_pk=order.pk address_type=address_type %}" novalidate>+ {% csrf_token %}+ <div class="modal-content">+ <h5>+ {% if address_type == "shipping" %}+ {% trans "Edit shipping address" %}+ {% else %}+ {% trans "Edit billing address" %}+ {% endif %}+ </h5>++ <div class="row">+ {{ form|materializecss }}+ </div>+ </div>+ <div class="modal-footer">+ <button type="submit" class="modal-action btn-flat blue-text"> {% trans "Update" %}</button>+ <a href="#!" aria-hidden="true" class="modal-action modal-close btn-flat blue-text">{% trans "Cancel" %}</a>+ </div>+</form>diff --git a/templates/demo/dashboard/order/modal_cancel_delivery_group.html b/templates/demo/dashboard/order/modal_cancel_delivery_group.htmlnew file mode 100644index 0000000000..52c3f4a444--- /dev/null+++ b/templates/demo/dashboard/order/modal_cancel_delivery_group.html@@ -0,0 +1,20 @@+{% load i18n %}+{% load materializecss %}++<form id="ship-delivery-group-form" method="post" role="form" action="{% url 'dashboard:cancel-delivery-group' order_pk=order.pk group_pk=group.pk %}" class="form-async" novalidate>+ {% csrf_token %}++ <div class="modal-content">+ <h5>{% trans "Cancel delivery group?" %}</h5>+ <p>+ {% blocktrans %}+ After this action, {{ group }} will be cancelled. Ordered items will be returned to stock.+ {% endblocktrans %}+ </p>+ </div>++ <div class="modal-footer">+ <button type="submit" class="modal-action btn-flat red-text">{% trans "Cancel group" %}</button>+ <a href="#!" aria-hidden="true" class="modal-action modal-close btn-flat blue-text">{% trans "Cancel" %}</a>+ </div>+</form>diff --git a/templates/demo/dashboard/order/modal_cancel_line.html b/templates/demo/dashboard/order/modal_cancel_line.htmlnew file mode 100644index 0000000000..70da67dafe--- /dev/null+++ b/templates/demo/dashboard/order/modal_cancel_line.html@@ -0,0 +1,43 @@+{% load i18n %}+{% load materializecss %}+{% load prices_i18n %}++<form class="form-async" role="form" method="post" action="{% url 'dashboard:orderline-cancel' order_pk=order.pk line_pk=item.pk %}" novalidate>+ {% csrf_token %}+ <div class="modal-content">+ <h5>{% trans "Cancer order line?" %}</h5>+ <p>+ {% blocktrans with order=order%}+ Are you sure, you want cancel this order line?+ {% endblocktrans %}+ </p>+ {{ form|materializecss }}+ <table>+ <thead>+ <tr>+ <th class="wide">{% trans "Item" %}</th>+ <th>{% trans "SKU" %}</th>+ <th class="right-align">{% trans "Price" %}</th>+ <th class="right-align">{% trans "Quantity" %}</th>+ <th class="right-align">{% trans "Total" %}</th>+ </tr>+ </thead>+ <tbody>+ <tr>+ <td>+ {{ item.product_name }}<br>+ </td>+ <td>{{ 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>+ </tr>+ </tbody>+ </table>+ </div>++ <div class="modal-footer">+ <button type="submit" class="modal-action btn-flat red-text">{% trans "Cancel Line" %}</button>+ <a href="#!" aria-hidden="true" class="modal-action modal-close btn-flat blue-text">{% trans "Abort" %}</a>+ </div>+</form>diff --git a/templates/demo/dashboard/order/modal_cancel_order.html b/templates/demo/dashboard/order/modal_cancel_order.htmlnew file mode 100644index 0000000000..34470acba8--- /dev/null+++ b/templates/demo/dashboard/order/modal_cancel_order.html@@ -0,0 +1,19 @@+{% load i18n %}+{% load materializecss %}++<div class="modal-content">+ <h5>{% trans "Cancer order?" %}</h5>+ <p>+ {% blocktrans with order=order%}+ Are you sure, you want cancel order {{ order }}?+ {% endblocktrans %}</p>+</div>++<div class="modal-footer">+ <form id="release-form" method="post" role="form" class="form-async"+ action="{% url 'dashboard:order-cancel' order_pk=order.pk %}" novalidate>+ {% csrf_token %}+ <button type="submit" class="modal-action btn-flat red-text">{% trans "Cancel Order" %}</button>+ <a href="#!" aria-hidden="true" class="modal-action modal-close btn-flat blue-text">{% trans "Abort" %}</a>+ </form>+</div>diff --git a/templates/demo/dashboard/order/modal_capture.html b/templates/demo/dashboard/order/modal_capture.htmlnew file mode 100644index 0000000000..5d20baf0b6--- /dev/null+++ b/templates/demo/dashboard/order/modal_capture.html@@ -0,0 +1,28 @@+{% load i18n %}+{% load babel %}+{% load materializecss %}+{% load prices_i18n %}++<form role="form" method="post" action="{% url 'dashboard:capture-payment' order_pk=order.pk payment_pk=payment.pk %}" class="form-async" novalidate>+ {% csrf_token %}++ <div class="modal-content">+ <h5>{% trans "Capture payment" %}</h5>++ <div class="row">+ {{ form|materializecss }}+ </div>++ <h5>{% trans "Before this action" %}</h5>++ <ul class="list">+ <li class="list-item">{% trans "Order total: " %}{% gross payment.order.get_total %}</li>+ <li class="list-item">{% trans "Captured amount: " %}{{ captured|currencyfmt:currency }} </li>+ </ul>+ </div>++ <div class="modal-footer">+ <button type="submit" class="modal-action btn-flat blue-text">{% trans 'Capture' %}</button>+ <a href="#!" aria-hidden="true" class="modal-action modal-close btn-flat blue-text">{% trans "Cancel" %}</a>+ </div>+</form>diff --git a/templates/demo/dashboard/order/modal_change_quantity.html b/templates/demo/dashboard/order/modal_change_quantity.htmlnew file mode 100644index 0000000000..c02dfbb00a--- /dev/null+++ b/templates/demo/dashboard/order/modal_change_quantity.html@@ -0,0 +1,18 @@+{% load i18n %}+{% load materializecss %}++<form method="post" role="form" action="{% url 'dashboard:orderline-change-quantity' order_pk=order.pk line_pk=object.pk %}" class="form-async" novalidate>+ {% csrf_token %}+ <div class="modal-content">+ <h5>{% trans "Change quantity" %}</h5>++ <div class="row">+ {{ form|materializecss:"s12 m6" }}+ </div>+ </div>++ <div class="modal-footer">+ <button type="submit" class="modal-action btn-flat blue-text">{% trans "Update" %}</button>+ <a href="#!" aria-hidden="true" class="modal-action modal-close btn-flat blue-text">{% trans "Cancel" %}</a>+ </div>+</form>diff --git a/templates/demo/dashboard/order/modal_order_remove_voucher.html b/templates/demo/dashboard/order/modal_order_remove_voucher.htmlnew file mode 100644index 0000000000..6e508966be--- /dev/null+++ b/templates/demo/dashboard/order/modal_order_remove_voucher.html@@ -0,0 +1,19 @@+{% load i18n %}+{% load materializecss %}++<div class="modal-content">+ <h5>{% trans "Remove voucher?" %}</h5>+ <p>+ {% blocktrans with order=order%}+ Are you sure, you want remove voucher discount from {{ order }}?+ {% endblocktrans %}</p>+</div>++<div class="modal-footer">+ <form id="release-form" method="post" role="form" class="form-async"+ action="{% url 'dashboard:order-remove-voucher' order_pk=order.pk %}" novalidate>+ {% csrf_token %}+ <button type="submit" class="modal-action btn-flat red-text">{% trans "Remove voucher" %}</button>+ <a href="#!" aria-hidden="true" class="modal-action modal-close btn-flat blue-text">{% trans "Abort" %}</a>+ </form>+</div>diff --git a/templates/demo/dashboard/order/modal_refund.html b/templates/demo/dashboard/order/modal_refund.htmlnew file mode 100644index 0000000000..86fbf40b9b--- /dev/null+++ b/templates/demo/dashboard/order/modal_refund.html@@ -0,0 +1,28 @@+{% load i18n %}+{% load babel %}+{% load materializecss %}+{% load prices_i18n %}++<form role="form" method="post" action="{% url 'dashboard:refund-payment' order_pk=order.pk payment_pk=payment.pk %}" class="form-async" novalidate>+ {% csrf_token %}++ <div class="modal-content">+ <h5>{% trans "Refund payment" %}</h5>++ <div class="row">+ {{ form|materializecss }}+ </div>++ <h5>{% trans "Before this action" %}</h5>++ <ul class="list">+ <li class="list-item">{% trans "Order total: " %}{% gross payment.order.get_total %}</li>+ <li class="list-item">{% trans "Captured amount: " %}{{ captured|currencyfmt:currency }} </li>+ </ul>+ </div>++ <div class="modal-footer">+ <button type="submit" class="modal-action btn-flat blue-text">{% trans 'Refund' %}</button>+ <a href="#!" aria-hidden="true" class="modal-action modal-close btn-flat blue-text">{% trans "Cancel" %}</a>+ </div>+</form>diff --git a/templates/demo/dashboard/order/modal_release.html b/templates/demo/dashboard/order/modal_release.htmlnew file mode 100644index 0000000000..771b125833--- /dev/null+++ b/templates/demo/dashboard/order/modal_release.html@@ -0,0 +1,18 @@+{% load i18n %}+{% load materializecss %}++<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" method="post" role="form" class="form-async"+ action="{% url 'dashboard:release-payment' order_pk=order.pk payment_pk=payment.pk %}" novalidate>+ {% csrf_token %}++ <button type="submit" class="modal-action btn-flat blue-text">{% trans "Release" %}</button>+ <a href="#!" aria-hidden="true" class="modal-action modal-close btn-flat blue-text">{% trans "Cancel" %}</a>+ </form>+</div>diff --git a/templates/demo/dashboard/order/modal_ship_delivery_group.html b/templates/demo/dashboard/order/modal_ship_delivery_group.htmlnew file mode 100644index 0000000000..7391e1f551--- /dev/null+++ b/templates/demo/dashboard/order/modal_ship_delivery_group.html@@ -0,0 +1,20 @@+{% load i18n %}+{% load materializecss %}++<form id="ship-delivery-group-form" method="post" role="form" action="{% url 'dashboard:ship-delivery-group' order_pk=order.pk group_pk=group.pk %}" class="form-async" novalidate>+ {% csrf_token %}++ <div class="modal-content">+ <h5>{% trans "Ship delivery group " %}</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 class="row">+ {{ form|materializecss }}+ </div>+ </div>++ <div class="modal-footer">+ <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>+ </div>+</form>diff --git a/templates/demo/dashboard/order/modal_split_order_line.html b/templates/demo/dashboard/order/modal_split_order_line.htmlnew file mode 100644index 0000000000..01fc8d84a1--- /dev/null+++ b/templates/demo/dashboard/order/modal_split_order_line.html@@ -0,0 +1,19 @@+{% load i18n %}+{% load materializecss %}++<form method="post" role="form" class="form-async"+ action="{% url 'dashboard:orderline-split' order_pk=order.pk line_pk=line_pk %}" novalidate>+ {% csrf_token %}+ <div class="modal-content">+ <h5>{% trans "Split order line " %}</h5>++ <div class="row">+ {{ form|materializecss:"s12 m6" }}+ </div>+ </div>++ <div class="modal-footer">+ <button type="submit" class="modal-action btn-flat blue-text"> {% trans "Split" %}</button>+ <a href="#!" aria-hidden="true" class="modal-action modal-close btn-flat blue-text">{% trans "Cancel" %}</a>+ </div>+</form>diff --git a/templates/demo/dashboard/payments/detail.html b/templates/demo/dashboard/payments/detail.htmlnew file mode 100644index 0000000000..dfc2f0306b--- /dev/null+++ b/templates/demo/dashboard/payments/detail.html@@ -0,0 +1,97 @@+{% extends "dashboard/base.html" %}+{% load prices_i18n %}+{% load i18n %}+{% load status %}+{% load utils %}++{% block title %}{% trans "Payment" %} #{{ payment.id }} - {% trans "Payments" %} - {{ block.super }}{% endblock %}++{% block body_class %}body-payments{% endblock %}++{% block header_menu %}+ {% url "dashboard:payments" as url %}+ {% include "dashboard/includes/_back-link.html" with url=url %}+{% endblock %}++{% block breadcrumbs %}+ <ul class="breadcrumbs">+ <li><a href="{% url "dashboard:payments" %}">{% trans "Payments" %}</a></li>+ <li>#{{ payment.id }}</li>+ </ul>+{% endblock %}++{% block menu_sales_class %} active{% endblock %}++{% block content %}+<div class="row">+ <div class="col s12 l8">+ <div class="card grey lighten-4">+ <div class="card-content">+ <span class="card-title black-text">Payment details</span>++ <ul>+ <li>{% trans "Payment status" %}: {% render_status payment.status payment.get_status_display %}</li>+ <li>{% trans "Fraud status" %}: {% render_status payment.fraud_status payment.get_fraud_status_display %}</li>+ <li>{% trans "Amount" %}: {% gross payment.get_total_price %}</li>+ <li>{% trans "Captured amount" %}: {% gross payment.get_captured_price %}</li>+ <li>{% trans "Gateway" %}: {{ payment.variant }}</li>+ <li>{% trans "Transaction ID" %}: {{ payment.transaction_id }}</li>+ <li>{% trans "Payment date" %}: {{ payment.created }}</li>+ </ul>+ </div>+ </div>++ <div class="card">+ <div class="card-content">+ <span class="card-title black-text">{% trans "Gateway response" %}</span>++ {% if payment.message %}+ {{ payment.message }}+ {% else %}+ <p>{% trans "No response available." %}</p>+ {% endif %}+ </div>+ </div>+ </div>++ <div class="col s12 l4">+ <div class="row">+ <div class="col s12 m6 l12">+ <div class="card equal-height-on-med">+ <div class="card-content">+ <span class="card-title black-text">{% trans "Customer" %}</span>++ <div class="address">+ {% if payment.order.user %}+ <div>{% trans "Account" %}: <a href="{% url "dashboard:customer-details" pk=payment.order.user.pk %}">{{ payment.order.user }}</a></div>+ {% else %}+ <div>{% trans "Account" %}: {% trans "Guest" %}</div>+ {% endif %}+ <div><i class="material-icons">email</i> <a href="mailto:{{ payment.order.user_email }}">{{ payment.order.user_email }}</a></div>+ <div>Customer IP: {{ payment.customer_ip_address }}</div>+ </div>+ </div>+ </div>+ </div>++ <div class="col s12 m6 l12">+ <div class="card equal-height-on-med">+ <div class="card-content">+ <span class="card-title black-text">{% trans "Billing address" %}</span>++ <div class="address">+ <strong>{{ payment.billing_first_name }} {{ payment.billing_last_name }}</strong>+ <div>{{ payment.billing_address_1 }}</div>+ {% if payment.payment.billing_address_2 %}+ <div>{{ payment.payment.billing_address_2 }}</div>+ {% endif %}+ <div>{{ payment.billing_postcode }}</div>+ <div>{{ payment.billing_city }}, {{ payment.billing_country_code }}</div>+ </div>+ </div>+ </div>+ </div>+ </div>+ </div>+</div>+{% endblock %}diff --git a/templates/demo/dashboard/payments/list.html b/templates/demo/dashboard/payments/list.htmlnew file mode 100644index 0000000000..979c8091c9--- /dev/null+++ b/templates/demo/dashboard/payments/list.html@@ -0,0 +1,57 @@+{% extends "dashboard/base.html" %}+{% load i18n %}+{% load prices_i18n %}+{% load status %}++{% block title %}{% trans "Payments" %} - {{ block.super }}{% endblock %}++{% block body_class %}body-payments{% endblock %}++{% block breadcrumbs %}+ <ul class="breadcrumbs">+ <li>{% trans "Payments" %}</li>+ </ul>+{% endblock %}++{% block menu_sales_class %} active{% endblock %}++{% block content %}+ {% include "dashboard/includes/_status_filters.html" %}++ {% if payments %}+ <div class="card">+ <div class="data-table-container">+ <table class="bordered hoverable responsive data-table">+ <thead>+ <tr>+ <th></th>+ <th>{% trans "Date" %}</th>+ <th>{% trans "Payment" %}</th>+ <th class="right-align">{% trans "Amount" %}</th>+ <th class="wide">{% trans "Status" %}</th>+ </tr>+ </thead>+ <tbody>+ {% for payment in payments %}+ <tr>+ <td><a href="{% url "dashboard:payment-details" pk=payment.pk %}">#{{ payment.id }}</a></td>+ <td>{{ payment.created }}</td>+ <td>+ {% trans "Gateway" %}: {{ payment.variant }} ·+ <a href="{% url 'dashboard:order-details' order_pk=payment.order.pk %}"> {% trans "Order " %}{{ payment.order }}</a>+ </td>+ <td class="right-align">{% gross payment.get_total_price %}</td>+ <td>{% render_status payment.status payment.get_status_display %}</td>+ </tr>+ {% endfor %}+ </tbody>+ </table>+ </div>+ </div>++ {% include "dashboard/includes/_pagination.html" %}+ {% else %}+ <p>{% trans "No payments found." %}</p>+ {% endif %}++{% endblock %}diff --git a/templates/demo/dashboard/product/attributes/confirm_delete.html b/templates/demo/dashboard/product/attributes/confirm_delete.htmlnew file mode 100644index 0000000000..6070c07ddd--- /dev/null+++ b/templates/demo/dashboard/product/attributes/confirm_delete.html@@ -0,0 +1,32 @@+{% extends "dashboard/base.html" %}+{% load i18n %}++{% block title %}{% trans "Delete attribute" %} - {{ block.super }}{% endblock %}++{% block breadcrumbs %}+ <ul class="breadcrumbs breadcrumbs--with-menu">+ <li><a href="{% url 'dashboard:product-attributes' %}" class="breadcrumbs--ellipsed-item">{% trans "Attributes" %}</a></li>+ <li><span class="breadcrumbs--ellipsed-item">{% trans "Delete attribute" %}</span></li>+ </ul>+{% endblock %}++{% block content %}+ <p>{% trans "Are you sure you want to delete the following attribute?" %}</p>+ <form method="post" novalidate>+ {% csrf_token %}+ <div class="row">+ <ul class="collection">+ <li class="collection-item">+ {{ attribute }}+ </li>+ </ul>+ </div>++ <div class="row">+ <div class="col m6 l4 offset-m3 offset-l4 right-align">+ <a href="{% url 'dashboard:product-attributes' %}" class="btn-flat"><i class="material-icons">clear</i> {% trans "Cancel" %}</a>+ <button type="submit" class="btn materialize-red"><i class="material-icons">delete_forever</i> {% trans "Delete" %}</button>+ </div>+ </div>+ </form>+{% endblock %}diff --git a/templates/demo/dashboard/product/attributes/form.html b/templates/demo/dashboard/product/attributes/form.htmlnew file mode 100644index 0000000000..622627a4c3--- /dev/null+++ b/templates/demo/dashboard/product/attributes/form.html@@ -0,0 +1,91 @@+{% extends "dashboard/base.html" %}+{% load i18n %}+{% load materializecss %}+{% load static %}++{% block title %}{% if attribute.pk %}{{ attribute }}{% else %}{% trans 'Add new attribute' %}{% endif %} - {% trans "Attributes" %} - {{ block.super }}{% endblock %}++{% block body_class %}body-attributes{% endblock %}++{% block header_menu %}+ {% url "dashboard:product-attributes" as url %}+ {% include "dashboard/includes/_back-link.html" with url=url %}+{% endblock %}++{% block header_extra %}+ {% if attribute.pk %}+ <a class="dropdown-button" href="#" data-activates="attribute-delete" data-constrainwidth="false">+ <i class="material-icons">more_vert</i>+ </a>+ <ul id="attribute-delete" class="dropdown-content">+ <li>+ <a class="modal-trigger-custom" href="#base-modal"+ data-href="{% url 'dashboard:product-attribute-delete' pk=attribute.pk %}">+ {% trans "Remove attribute" %}+ </a>+ </li>+ </ul>+ {% endif %}+{% endblock %}++{% block breadcrumbs %}+ <ul class="breadcrumbs breadcrumbs--with-menu">+ <li><a href="{% url 'dashboard:product-attributes' %}" class="breadcrumbs--ellipsed-item">{% trans "Attributes" %}</a></li>+ <li><span class="breadcrumbs--ellipsed-item">{% if attribute.pk %}{{ attribute }}{% else %}{% trans 'Add new attribute' %}{% endif %}</span></li>+ </ul>+{% endblock %}++{% block menu_catalogue_class %} active{% endblock %}++{% block content %}+ <form method="post" enctype="multipart/form-data" id="form-attributes" novalidate>+ <div class="row">+ <div class="col l8">+ <div class="row">+ {% csrf_token %}+ {{ form.display|materializecss }}+ {{ form.name|materializecss }}+ </div>++ <h5>{% trans "Attribute values" %}</h5>+ {{ formset.management_form }}+ {{ formset.non_form_errors.as_ul }}+ <table id="formset" class="highlight">+ {% for form in formset.forms %}+ {% if forloop.first %}+ <thead>+ <tr>+ {% for field in form.visible_fields %}+ <th>{{ field.label|capfirst }}</th>+ {% endfor %}+ </tr>+ </thead>+ {% endif %}+ <tr>+ {% for field in form.visible_fields %}+ <td{% if forloop.last %} class="center-align"{% endif %}>+ {% if forloop.first %}+ {% for hidden in form.hidden_fields %}+ {{ hidden }}+ {% endfor %}+ {% endif %}+ {{ field|materializecss }}+ </td>+ {% endfor %}+ </tr>+ {% endfor %}+ </table>+ </div>+ </div>++ <div class="row">+ <div class="col l8 right-align">+ {% if attribute.pk %}+ <button type="submit" class="btn">{% trans "Update" %}</button>+ {% else %}+ <button type="submit" class="btn">{% trans "Create" %}</button>+ {% endif %}+ </div>+ </div>+ </form>+{% endblock %}diff --git a/templates/demo/dashboard/product/attributes/list.html b/templates/demo/dashboard/product/attributes/list.htmlnew file mode 100644index 0000000000..bdaa815949--- /dev/null+++ b/templates/demo/dashboard/product/attributes/list.html@@ -0,0 +1,48 @@+{% extends "dashboard/base.html" %}+{% load i18n %}+{% load materializecss %}++{% block title %}{% trans "Attributes" %} - {{ block.super }}{% endblock %}++{% block body_class %}body-attributes{% endblock %}++{% block header_extra %}+ <div class="fixed-action-btn">+ <a class="btn-fab btn-floating btn-large waves-effect waves-light teal"+ href="{% url 'dashboard:product-attribute-add' %}" title="{% trans "Add attribute" %}">+ <i class="material-icons">add</i>+ </a>+ </div>+{% endblock %}++{% block breadcrumbs %}+ <ul class="breadcrumbs">+ <li>{% trans "Attributes" %}</li>+ </ul>+{% endblock %}++{% block menu_catalogue_class %} active{% endblock %}++{% block content %}+ <div class="row">+ <div class="col s12">+ {% if attributes %}+ <ul class="collection list list--attributes">+ {% for attribute in attributes %}+ <li class="collection-item list-item list--attributes-item list-item--two-lines">+ <a class="list-item-name" href="{% url 'dashboard:product-attribute-update' pk=attribute.pk %}">{{ attribute.display }}</a>++ <p class="list-item-desc">+ {% for value in attribute.values.all %}+ {{ value }}{% if not forloop.last %}, {% endif %}+ {% endfor %}+ </p>+ </li>+ {% endfor %}+ </ul>+ {% else %}+ <p>{% trans "No attributes found." %}</p>+ {% endif %}+ </div>+ </div>+{% endblock %}diff --git a/templates/demo/dashboard/product/attributes/modal_confirm_delete.html b/templates/demo/dashboard/product/attributes/modal_confirm_delete.htmlnew file mode 100644index 0000000000..73c8fe552a--- /dev/null+++ b/templates/demo/dashboard/product/attributes/modal_confirm_delete.html@@ -0,0 +1,17 @@+{% load i18n %}++<form action="{% url "dashboard:product-attribute-delete" pk=attribute.pk %}" method="post" novalidate>+ {% csrf_token %}+ <div class="modal-content">+ <h5>{% trans "Are you sure?" %}</h5>++ <p>+ {% blocktrans %}You are about to delete an attribute <strong>{{ attribute }}</strong>.{% endblocktrans %}+ </p>+ </div>++ <div class="modal-footer">+ <button type="submit" class="modal-action btn-flat blue-text">{% trans "Delete" %}</button>+ <a href="#!" class="modal-action modal-close btn-flat blue-text">{% trans "Cancel" %}</a>+ </div>+</form>diff --git a/templates/demo/dashboard/product/list.html b/templates/demo/dashboard/product/list.htmlnew file mode 100644index 0000000000..80a11321d9--- /dev/null+++ b/templates/demo/dashboard/product/list.html@@ -0,0 +1,85 @@+{% extends "dashboard/base.html" %}+{% load i18n %}+{% load prices_i18n %}+{% load materializecss %}+{% load staticfiles %}++{% block title %}{% trans "Products" %} - {{ block.super }}{% endblock %}++{% block body_class %}body-products{% endblock %}++{% block header_extra %}+ <div class="fixed-action-btn">+ {% if form.product_cls.1 %}+ <a class="btn-fab btn-floating btn-large waves-effect waves-light teal modal-trigger"+ href="#modal-product-class" title="{% trans "Add product" %}">+ <i class="material-icons">add</i>+ </a>+ {% else %}+ <form method="post" novalidate>+ <div hidden>+ {% csrf_token %}+ {{ form }}+ </div>++ <button type="submit" class="btn-fab btn-floating btn-large waves-effect waves-light teal"+ title="{% trans "Add product" %}">+ <i class="material-icons">add</i>+ </button>+ </form>+ {% endif %}+ </div>+{% endblock %}++{% block breadcrumbs %}+ <ul class="breadcrumbs">+ <li>{% trans "Products" %}</li>+ </ul>+{% endblock %}++{% block menu_catalogue_class %} active{% endblock %}++{% block content %}+ <div class="row">+ <div class="col s12">+ {% if products %}+ <ul class="collection list">+ {% for product in products %}+ <li class="collection-item avatar list-item">+ {% if product.images.exists %}+ <img src="{{ product.images.first.image.crop.100x100 }}" alt="" class="circle teal">+ {% else %}+ <img src="{% static 'images/product-image-placeholder-small.png' %}" alt="" class="circle teal">+ {% endif %}+ <a class="title" href="{% url 'dashboard:product-update' pk=product.pk %}">+ <span class="list-item-name">{{ product.name }}</span>+ </a>+ <p class="list-item-price">{% gross product.price %}</p>+ </li>+ {% endfor %}+ </ul>+ {% include "dashboard/includes/_pagination.html" with page_obj=products %}+ {% else %}+ <p>{% trans "No products found." %}</p>+ {% endif %}+ </div>+ </div>+ <div id="modal-product-class" class="modal">+ <div class="modal-content">+ <form method="post" novalidate>+ {% csrf_token %}+ <div class="row">+ {{ form|materializecss }}+ </div>++ <div class="row">+ <div class="col s12">+ <button class="btn" type="submit">+ <i class="material-icons left">create</i> {% trans "Create new" %}+ </button>+ </div>+ </div>+ </form>+ </div>+ </div>+{% endblock %}diff --git a/templates/demo/dashboard/product/modal_product_confirm_delete.html b/templates/demo/dashboard/product/modal_product_confirm_delete.htmlnew file mode 100644index 0000000000..d3e47dc879--- /dev/null+++ b/templates/demo/dashboard/product/modal_product_confirm_delete.html@@ -0,0 +1,33 @@+{% load i18n %}+{% load prices_i18n %}+{% load staticfiles %}++<form action="{% url "dashboard:product-delete" pk=product.pk %}" method="post" novalidate>+ {% csrf_token %}+ <div class="modal-content">+ <div class="row">+ <div class="col s12">+ <h5>{% trans "Are you sure?" %}</h5>+ </div>+ </div>++ <div class="row">+ <div class="col s12 center-align">+ {% if product.images.exists %}+ <img src="{{ product.images.first.image.crop.400x400 }}" alt="" class="responsive-img">+ {% else %}+ <img src="{% static 'images/product-image-placeholder.png' %}" alt="" class="responsive-img">+ {% endif %}+ </div>+ </div>++ <p>+ {% blocktrans %}If you remove <strong>{{ product }}</strong> you will lose all data related to this product.{% endblocktrans %}+ </p>+ </div>++ <div class="modal-footer">+ <button type="submit" class="modal-action btn-flat blue-text">{% trans "Delete" %}</button>+ <a href="#!" class="modal-action modal-close btn-flat blue-text">{% trans "Cancel" %}</a>+ </div>+</form>diff --git a/templates/demo/dashboard/product/modal_product_image_confirm_delete.html b/templates/demo/dashboard/product/modal_product_image_confirm_delete.htmlnew file mode 100644index 0000000000..81f604d0b2--- /dev/null+++ b/templates/demo/dashboard/product/modal_product_image_confirm_delete.html@@ -0,0 +1,27 @@+{% load i18n %}++<form action="{% url 'dashboard:product-image-delete' product_pk=product.pk img_pk=product_image.pk %}" method="post" novalidate>+ {% csrf_token %}+ <input type="hidden" name="success_url" value="{% url 'dashboard:product-update' pk=product.pk %}#images">++ <div class="modal-content">+ <div class="row">+ <div class="col s12">+ <h5>{% trans "Are you sure?" %}</h5>+ </div>+ </div>++ <div class="center-align">+ <img class="responsive-img" src="{{ product_image.image.crop.400x400 }}" alt="">+ </div>++ <p>+ {% blocktrans %}You are about to delete this image.{% endblocktrans %}+ </p>+ </div>++ <div class="modal-footer">+ <button type="submit" class="modal-action btn-flat blue-text">{% trans "Delete" %}</button>+ <a href="#!" class="modal-action modal-close btn-flat blue-text">{% trans "Cancel" %}</a>+ </div>+</form>diff --git a/templates/demo/dashboard/product/product_confirm_delete.html b/templates/demo/dashboard/product/product_confirm_delete.htmlnew file mode 100644index 0000000000..7f94d9fa1f--- /dev/null+++ b/templates/demo/dashboard/product/product_confirm_delete.html@@ -0,0 +1,49 @@+{% extends "dashboard/base.html" %}+{% load i18n %}+{% load prices_i18n %}+{% load staticfiles %}++{% block title %}{% trans "Delete" %} {{ product }} - {{ block.super }}{% endblock %}++{% block body_class %}body-store body-products{% endblock %}++{% block header_menu %}+ {% url "dashboard:product-update" pk=product.pk as url %}+ {% include "dashboard/includes/_back-link.html" with url=url %}+{% endblock %}++{% block breadcrumbs %}+ <ul class="breadcrumbs breadcrumbs--with-menu">+ <li><a href="{% url "dashboard:product-list" %}" class="breadcrumbs--ellipsed-item">{% trans "Products" %}</a></li>+ <li><a href="{% url "dashboard:product-update" pk=product.pk %}" class="breadcrumbs--ellipsed-item">{{ product }}</a></li>+ <li>+ <span class="hide-on-med-and-down">{% trans "Delete product" %}</span>+ <span class="hide-on-large-only">{% trans "Delete" %} {{ product }}</span>+ </li>+ </ul>+{% endblock %}++{% block menu_catalogue_class %} active{% endblock %}++{% block content %}+ <form method="post" novalidate>+ {% csrf_token %}+ <div class="row">+ <div class="col m6 l4">+ <div class="card">+ <div class="card-content">+ {% if object.images.exists %}+ <img src="{{ product.images.first.image.crop.400x400 }}" alt="" class="responsive-img">+ {% else %}+ <img src="{% static 'images/product-image-placeholder.png' %}" alt="" class="responsive-img">+ {% endif %}+ </div>++ <div class="card-action">+ <button type="submit" class="card-link blue-text">{% trans "Delete" %}</button>+ </div>+ </div>+ </div>+ </div>+ </form>+{% endblock %}diff --git a/templates/demo/dashboard/product/product_form.html b/templates/demo/dashboard/product/product_form.htmlnew file mode 100644index 0000000000..b04884fb44--- /dev/null+++ b/templates/demo/dashboard/product/product_form.html@@ -0,0 +1,371 @@+{% extends "dashboard/base.html" %}+{% load prices_i18n %}+{% load i18n %}+{% load materializecss %}+{% load static %}+{% load attributes %}++{% block title %}{% if product.pk %}{{ product }}{% else %}{% trans 'Add new product' %}{% endif %} - {% trans "Products" %} - {{ block.super }}{% endblock %}++{% block body_class %}body-products{% endblock %}++{% block header_menu %}+ {% url "dashboard:product-list" as url %}+ {% include "dashboard/includes/_back-link.html" with url=url %}+{% endblock %}++{% block header_extra %}+ {% if product.pk %}+ <a class="dropdown-button" href="#" data-activates="context-menu" data-constrainwidth="false">+ <i class="material-icons">more_vert</i>+ </a>+ <ul id="context-menu" class="dropdown-content">+ <li>+ <a href="{{ product.get_absolute_url }}" target="_blank">+ {% trans 'View on site' %}+ </a>+ </li>+ <li>+ <a href="#base-modal" data-href="{% url 'dashboard:product-delete' pk=product.pk %}"+ class="modal-trigger-custom">+ {% trans "Remove product" %}+ </a>+ </li>+ </ul>+ {% endif %}+{% endblock %}++{% block breadcrumbs %}+ <ul class="breadcrumbs breadcrumbs--with-menu">+ <li><a href="{% url "dashboard:product-list" %}" class="breadcrumbs--ellipsed-item">{% trans "Products" %}</a></li>+ <li><span class="breadcrumbs--ellipsed-item">{% if product.pk %}{{ product }}{% else %}{% trans 'Add new product' %}{% endif %}</span></li>+ </ul>+{% endblock %}++{% block menu_catalogue_class %} active{% endblock %}++{% block content %}+ {% if product.pk %}+ <div class="row">+ <div class="col s12">+ <ul class="tabs">+ <li class="tab col s3" role="presentation">+ <a href="#details" class="active" role="tab">+ <span>{% trans "Details" %}</span>+ <i class="material-icons">edit</i>+ </a>+ </li>++ <li class="tab col s3" role="presentation">+ <a href="#variants" role="tab">+ <span>{% trans "Variants" %}</span>+ <i class="material-icons">style</i>+ </a>+ </li>++ <li class="tab col s3" role="presentation">+ <a href="#stock" role="tab">+ <span>{% trans "Stock" %}</span>+ <i class="material-icons">store</i>+ </a>+ </li>++ <li class="tab col s3" role="presentation">+ <a href="#images" role="tab">+ <span>{% trans "Images" %}</span>+ <i class="material-icons">collections</i>+ </a>+ </li>+ </ul>+ </div>+ </div>+ {% endif %}++ <div class="row tab-content" id="details">+ <form method="post" id="form-product" enctype="multipart/form-data" novalidate>+ {% csrf_token %}+ {{ product_form.name|materializecss:"s12 m8" }}+ {{ product_form.price|materializecss:"s12 m4" }}++ <div class="col s12 l8" >+ <div class="row">+ {{ product_form.description|materializecss }}+ </div>+ </div>++ <div class="col s12 l4">+ <div class="row">+ {{ product_form.weight|materializecss:"input-field s12" }}+ {{ product_form.categories|materializecss:"input-field s12" }}+ {{ product_form.attributes|materializecss:"input-field s12" }}+ {{ product_form.available_on|materializecss:"input-field s12" }}+ </div>+ </div>++ <div class="col s12 right-align">+ <div class="row">+ {% if product.pk %}+ <button type="submit" class="btn">{% trans "Update" %}</button>+ {% else %}+ <button type="submit" class="btn">{% trans "Create" %}</button>+ {% endif %}+ </div>+ </div>+ </form>+ </div>++ {% if product.pk %}+ <div id="variants" class="card tab-content">+ <form method="post" action="{% url 'dashboard:variant-bulk-delete' product_pk=product.pk %}" novalidate>+ {% csrf_token %}+ <div class="data-table-header">+ <a href="{% url 'dashboard:variant-add' product_pk=product.pk %}" class="btn-data-table btn-show-when-unchecked blue-text">+ {% trans "Add" %}+ </a>++ <a href="#modal-product-variant-delete" class="modal-trigger btn-data-table btn-show-when-checked blue-text" hidden>+ {% trans "Delete" %}+ </a>++ <div class="modal" id="modal-product-variant-delete">+ <div class="modal-content">+ <h5>{% trans "Are you sure?" %}</h5>++ <p>+ {% blocktrans %}You are about to delete variants of this product.{% endblocktrans %}+ </p>+ </div>++ <div class="modal-footer">+ <button type="submit" class="modal-action btn-flat blue-text">{% trans "Delete" %}</button>+ <a href="#!" class="modal-action modal-close btn-flat blue-text">{% trans "Cancel" %}</a>+ </div>+ </div>+ </div>++ <div class="data-table-container">+ <table class="bordered hoverable responsive data-table">+ {% if variants %}+ <thead>+ <tr>+ <th class="bulk-checkbox">+ <input type="checkbox" id="select-all-variants" class="filled-in select-all switch-actions">+ <label for="select-all-variants"></label>+ </th>+ <th>{% trans "SKU" %}</th>+ {% for attribute in attributes %}+ <th>{{ attribute.display|capfirst }}</th>+ {% endfor %}+ <th class="wide">{% trans "Variant name" %}</th>+ <th class="right-align">{% trans "Price" %}</th>+ </tr>+ </thead>++ <tbody>+ {% for variant in variants %}+ <tr>+ <td class="bulk-checkbox">+ <input id="id_variants_{{ variant.id }}" name="items" type="checkbox" value="{{ variant.id }}" class="filled-in switch-actions">+ <label for="id_variants_{{ variant.id }}"></label>+ </td>+ <td><a class="light-blue-text text-lighten-1" title="{% trans "Edit variant" %}"+ href="{% url 'dashboard:variant-update' product_pk=product.pk variant_pk=variant.pk %}">+ {{ variant.sku }}+ </a></td>+ {% for attr_display in variant|attributes_values_with_empty:attributes %}+ <td>+ {{ attr_display }}+ </td>+ {% endfor %}+ <td>{{ variant.name }}</td>+ <td class="right-align">{% gross variant.get_price_per_item %}</td>+ </tr>+ {% endfor %}+ </tbody>+ {% else %}+ <tbody>+ <tr>+ <td>+ <span>{% trans "There are no variants for this product" %}</span>+ </td>+ </tr>+ </tbody>+ {% endif %}+ </table>+ </div>+ <input type="hidden" name="success_url" value="{% url 'dashboard:product-update' pk=product.pk %}#variants">+ </form>+ </div>++ <div id="stock" class="card tab-content">+ <form method="post" action="{% url 'dashboard:stock-bulk-delete' product_pk=product.pk %}" novalidate>+ {% csrf_token %}+ <div class="data-table-header">+ <a href="{% url 'dashboard:product-stock-add' product_pk=product.pk %}" class="btn-data-table btn-show-when-unchecked blue-text">+ {% trans "Add" %}+ </a>++ <a href="#modal-product-stock-delete" class="modal-trigger btn-data-table btn-show-when-checked blue-text" hidden>+ {% trans "Delete" %}+ </a>++ <div class="modal" id="modal-product-stock-delete">+ <div class="modal-content">+ <h5>{% trans "Are you sure?" %}</h5>++ <p>+ {% blocktrans %}You are about to delete stock for this product variant.{% endblocktrans %}+ </p>+ </div>++ <div class="modal-footer">+ <button type="submit" class="modal-action btn-flat blue-text">{% trans "Delete" %}</button>+ <a href="#!" class="modal-action modal-close btn-flat blue-text">{% trans "Cancel" %}</a>+ </div>+ </div>+ </div>++ <div class="data-table-container">+ <table class="bordered hoverable responsive data-table">+ {% if stock_items %}+ <thead>+ <tr>+ <th class="bulk-checkbox">+ <input type="checkbox" id="select-all-stock" class="filled-in select-all switch-actions">+ <label for="select-all-stock"></label>+ </th>+ <th>{% trans "SKU" %}</th>+ <th class="wide">{% trans "Location" %}</th>+ <th class="right-align">{% trans "Quantity" %}</th>+ <th class="right-align">{% trans "Allocated" %}</th>+ </tr>+ </thead>++ <tbody>+ {% for item in stock_items %}+ <tr>+ <td class="bulk-checkbox">+ <input name="items" type="checkbox" id="{{ item.id }}" class="filled-in switch-actions" value="{{ item.id }}">+ <label for="{{ item.id }}"></label>+ </td>+ <td><a class="light-blue-text text-lighten-1" title="{% trans "Edit variant" %}"+ href="{% url 'dashboard:product-stock-update' product_pk=product.pk stock_pk=item.pk %}">+ {{ item.variant.sku }}+ </a></td>+ <td>{{ item.location }}</td>+ <td class="right-align">{{ item.quantity }}</td>+ <td class="right-align">{{ item.quantity_allocated }}</td>+ </tr>+ {% endfor %}+ </tbody>+ {% else %}+ <tbody>+ <tr>+ <td>+ <span>{% trans "There is no stock for this product." %}</span>+ </td>+ </tr>+ </tbody>+ {% endif %}+ </table>+ </div>+ <input type="hidden" name="success_url" value="{% url 'dashboard:product-update' pk=product.pk %}#stock">+ </form>+ </div>++ <div id="images" class="tab-content">+ <div class="row">+ <div class="col l12">+ <form action="{% url 'dashboard:product-images-upload' product_pk=product.pk %}" class="dropzone" id="product-image-form" novalidate>+ <div class="dz-message"></div>+ {% csrf_token %}+ <input type="hidden" name="success_url" value="{% url 'dashboard:product-update' pk=product.pk %}#images">+ <ul class="row product-gallery" id="product-gallery" data-post-url="{% url 'dashboard:product-images-reorder' product_pk=product.pk %}">+ {% if images %}+ {% for image in images %}+ <li class="col s6 m3 card product-gallery-item" data-id="{{ image.pk }}">+ <div class="card-image product-gallery-item-image">+ <img class="responsive-img" src="{{ image.image.crop.400x400 }}" alt="">+ </div>++ <div class="card-content">+ <span class="product-gallery-item-title card-title black-text" title="{{ image.alt }}">+ {% if image.alt %}+ {{ image.alt }}+ {% else %}+ <span class="grey-text">{% trans "No description" %}</span>+ {% endif %}+ </span>+ <span class="product-gallery-item-desc" title="{{ image.image.name }}">{{ image.image.name }}</span>+ </div>++ <div class="card-action">+ <a href="{% url 'dashboard:product-image-update' product_pk=product.pk img_pk=image.pk %}">+ {% trans "Edit" %}+ </a>++ <a href="#base-modal" class="modal-trigger-custom"+ data-href="{% url 'dashboard:product-image-delete' product_pk=product.pk img_pk=image.pk %}">+ {% trans "Delete" %}+ </a>+ </div>+ </li>+ {% endfor %}+ {% else %}+ <p class="no-images">{% trans "This product has no images yet." %}</p>+ {% endif %}+ <li class="col s6 m3 card product-gallery-item dropzone-ghost">+ <div class="card-content">+ <span class="product-gallery-item-title product-gallery-item-title--noclip card-title black-text">+ <span class="grey-text">{% trans "Drop images here to upload" %}</span>+ </span>+ </div>+ </li>+ </ul>+ </form>+ </div>+ </div>++ <script type="application/template" id="template">+ <li class="col s6 m3 card product-gallery-item dz-preview dz-file-preview" data-id="{{ image.pk }}">+ <div class="card-image product-gallery-item-image">+ <img data-dz-thumbnail />+ </div>++ <div class="dz-progress">+ <span class="dz-upload" data-dz-uploadprogress></span>+ </div>++ <div class="card-content">+ <span class="product-gallery-item-title card-title black-text">+ <span class="grey-text">{% trans "No description" %}</span>+ </span>+ <span class="product-gallery-item-desc">+ + </span>+ </div>++ <div class="card-action">+ <a class="card-action-edit" href="{% url 'dashboard:product-image-update' product_pk=product.pk img_pk=0 %}">+ {% trans "Edit" %}+ </a>++ <a href="#base-modal" class="card-action-delete modal-trigger-custom" data-href="{% url 'dashboard:product-image-delete' product_pk=product.pk img_pk=0 %}">+ {% trans "Delete" %}+ </a>++ + </div>+ </li>+ </script>+ </div>++ <div class="fixed-action-btn">+ <a class="btn-fab btn-fab-hidden btn-floating btn-large waves-effect waves-light teal" id="images-btn"+ href="{% url 'dashboard:product-image-add' product_pk=product.pk %}" title="{% trans "Add image" %}">+ <i class="material-icons">add</i>+ </a>+ </div>+ {% endif %}++{% endblock %}diff --git a/templates/demo/dashboard/product/product_image_confirm_delete.html b/templates/demo/dashboard/product/product_image_confirm_delete.htmlnew file mode 100644index 0000000000..83b59ab6bf--- /dev/null+++ b/templates/demo/dashboard/product/product_image_confirm_delete.html@@ -0,0 +1,44 @@+{% extends "dashboard/base.html" %}+{% load i18n %}++{% block title %}{% trans "Delete image" %} - {{ block.super }}{% endblock %}++{% block body_class %}body-store body-products{% endblock %}++{% block header_menu %}+ {% url "dashboard:product-update" pk=product.pk as url %}+ {% include "dashboard/includes/_back-link.html" with url=url hash="#images" %}+{% endblock %}++{% block breadcrumbs %}+ <ul class="breadcrumbs breadcrumbs--with-menu">+ <li><a href="{% url "dashboard:product-list" %}" class="breadcrumbs--ellipsed-item">{% trans "Products" %}</a></li>+ <li><a href="{% url "dashboard:product-update" pk=product.pk %}" class="breadcrumbs--ellipsed-item">{{ product }}</a></li>+ <li>{% trans "Delete image" %}</li>+ </ul>+{% endblock %}++{% block content %}+ <form method="post" novalidate>+ {% csrf_token %}+ <input type="hidden" name="success_url" value="{% url 'dashboard:product-update' pk=product.pk %}#images">+ <div class="row">+ <p>{% trans "Are you sure you want to delete the following image?" %}</p>+ <div class="col m6 l4 offset-m3 offset-l4">+ <div class="card">+ <div class="card-content">+ <div class="card-title black-text">{{ product_image.alt }}</div>+ <img src="{{ product_image.image.crop.400x400}}" alt="{{ product_image.alt }}" class="responsive-img">+ </div>+ </div>+ </div>+ </div>++ <div class="row">+ <div class="col m6 l4 offset-m3 offset-l4 right-align">+ <a href="{% url 'dashboard:product-update' pk=product.pk %}#images" class="btn-flat"><i class="material-icons">clear</i> {% trans "Cancel" %}</a>+ <button type="submit" class="btn materialize-red"><i class="material-icons">delete_forever</i> {% trans "Delete" %}</button>+ </div>+ </div>+ </form>+{% endblock %}diff --git a/templates/demo/dashboard/product/product_image_form.html b/templates/demo/dashboard/product/product_image_form.htmlnew file mode 100644index 0000000000..e86da3a867--- /dev/null+++ b/templates/demo/dashboard/product/product_image_form.html@@ -0,0 +1,66 @@+{% extends "dashboard/base.html" %}+{% load i18n %}+{% load materializecss %}+{% load static %}++{% block title %}+ {% if product_image.pk %}+ {{ product_image.image.name }}+ {% else %}+ {% trans "Add image" %}+ {% endif %} - {{ block.super }}+{% endblock %}++{% block body_class %}body-store body-products{% endblock %}++{% block header_menu %}+ {% url "dashboard:product-update" pk=product.pk as url %}+ {% include "dashboard/includes/_back-link.html" with url=url hash="#images" %}+{% endblock %}++{% block breadcrumbs %}+ <ul class="breadcrumbs">+ <li><a href="{% url "dashboard:product-list" %}">{% trans "Products" %}</a></li>+ <li><a href="{% url "dashboard:product-update" pk=product.pk %}#images">{{ product }}</a></li>+ {% if product_image.pk %}+ <li>{{ product_image.image }}</li>+ {% else %}+ <li>+ <span class="hide-on-med-and-down">{% trans "Add image" %}</span>+ <span class="hide-on-large-only">{% blocktrans %}Add image for {{ product }}{% endblocktrans %}</span>+ </li>+ {% endif %}+ </ul>+{% endblock %}++{% block menu_catalogue_class %} active{% endblock %}++{% block content %}+ <form method="post" enctype="multipart/form-data">+ <div class="row">+ <div class="col l8">+ {% csrf_token %}++ {% if product_image.pk %}+ <p class="no-margin">{% trans "Pick the most relevant part of the image using the red circle." %}</p>+ {% endif %}+ <div class="row">+ {{ form.image|materializecss }}+ {{ form.alt|materializecss }}+ {{ form.variants|materializecss }}+ <input type="hidden" name="success_url" value="{% url 'dashboard:product-update' pk=product.pk %}#images">+ </div>+ </div>+ </div>++ <div class="row">+ <div class="col l8 right-align">+ {% if product_image.pk %}+ <button type="submit" class="btn">{% trans "Update" %}</button>+ {% else %}+ <button type="submit" class="btn">{% trans "Create" %}</button>+ {% endif %}+ </div>+ </div>+ </form>+{% endblock %}diff --git a/templates/demo/dashboard/product/product_variant_confirm_delete.html b/templates/demo/dashboard/product/product_variant_confirm_delete.htmlnew file mode 100644index 0000000000..7e279be0ea--- /dev/null+++ b/templates/demo/dashboard/product/product_variant_confirm_delete.html@@ -0,0 +1,48 @@+{% extends "dashboard/base.html" %}+{% load i18n %}++{% block title %}{% trans "Delete variant" %} - {{ block.super }}{% endblock %}++{% block body_class %}body-store body-products{% endblock %}++{% block header_menu %}+ {% url "dashboard:product-update" pk=product.pk as url %}+ {% include "dashboard/includes/_back-link.html" with url=url hash="#variants" %}+{% endblock %}++{% block breadcrumbs %}+ <ul class="breadcrumbs breadcrumbs--with-menu">+ <li><a href="{% url "dashboard:product-list" %}" class="breadcrumbs--ellipsed-item">{% trans "Products" %}</a></li>+ <li><a href="{% url "dashboard:product-update" pk=product.pk %}#variants" class="breadcrumbs--ellipsed-item">{{ product }}</a></li>+ <li>+ <span class="hide-on-med-and-down">{% trans "Delete variant" %}</span>+ <span class="hide-on-large-only">{% blocktrans %}Delete variant for {{ product }}{% endblocktrans %}</span>+ </li>+ </ul>+{% endblock %}++{% block menu_catalogue_class %} active{% endblock %}++{% block content %}+ <form method="post">+ {% csrf_token %}+ <input type="hidden" name="success_url" value="{% url 'dashboard:product-update' pk=product.pk %}#variants">+ <div class="row">+ <div class="col m6 l4">+ <div class="card">+ <div class="card-content">+ {% if is_only_variant %}+ <p>{% trans 'This is the only variant. Deleting it will make the product unavailable for your customers.' %}</p>+ {% endif %}++ <h5>{{ variant }}{% if variant.name %} {{ variant.name }}{% endif %} </h5>+ </div>++ <div class="card-action">+ <button type="submit" class="card-link blue-text">{% trans "Delete" %}</button>+ </div>+ </li>+ </ul>+ </div>+ </form>+{% endblock %}diff --git a/templates/demo/dashboard/product/stock_confirm_delete.html b/templates/demo/dashboard/product/stock_confirm_delete.htmlnew file mode 100644index 0000000000..c6336bb35c--- /dev/null+++ b/templates/demo/dashboard/product/stock_confirm_delete.html@@ -0,0 +1,46 @@+{% extends "dashboard/base.html" %}+{% load i18n %}++{% block title %}{% trans "Delete stock" %} - {{ block.super }}{% endblock %}++{% block body_class %}body-store body-products{% endblock %}++{% block header_menu %}+ {% url "dashboard:product-update" pk=product.pk as url %}+ {% include "dashboard/includes/_back-link.html" with url=url hash="#stock" %}+{% endblock %}++{% block breadcrumbs %}+ <ul class="breadcrumbs breadcrumbs--with-menu">+ <li><a href="{% url "dashboard:product-list" %}" class="breadcrumbs--ellipsed-item">{% trans "Products" %}</a></li>+ <li><a href="{% url "dashboard:product-update" pk=product.pk %}#stock" class="breadcrumbs--ellipsed-item">{{ product }}</a></li>+ <li>+ <span class="hide-on-med-and-down">{% trans "Delete stock" %}</span>+ <span class="hide-on-large-only">{% blocktrans %}Delete stock for {{ product }}{% endblocktrans %}</span>+ </li>+ </ul>+{% endblock %}++{% block menu_catalogue_class %} active{% endblock %}++{% block content %}+ <form method="post">+ {% csrf_token %}+ <input type="hidden" name="success_url" value="{% url 'dashboard:product-update' pk=product.pk %}#stock">+ <div class="row">+ <div class="col m6 l4">+ <div class="card">+ <div class="card-content">+ <h5>+ {{ stock.variant.sku }} ({{ stock.variant.name }}) – {{ stock.location }}+ </h5>+ </div>++ <div class="card-action">+ <button type="submit" class="card-link blue-text">{% trans "Delete" %}</button>+ </div>+ </div>+ </div>+ </div>+ </form>+{% endblock %}diff --git a/templates/demo/dashboard/product/stock_form.html b/templates/demo/dashboard/product/stock_form.htmlnew file mode 100644index 0000000000..548042bfcd--- /dev/null+++ b/templates/demo/dashboard/product/stock_form.html@@ -0,0 +1,62 @@+{% extends "dashboard/base.html" %}+{% load i18n %}+{% load materializecss %}+{% load static %}++{% block title %}+ {% if stock.pk %}+ {% trans "Stock" %} {{ stock }}+ {% else %}+ {% trans "Add stock" %}+ {% endif %} - {{ block.super }}+{% endblock %}++{% block body_class %}body-store body-products{% endblock %}++{% block header_menu %}+ {% url "dashboard:product-update" pk=product.pk as url %}+ {% include "dashboard/includes/_back-link.html" with url=url hash="#stock" %}+{% endblock %}++{% block breadcrumbs %}+ <ul class="breadcrumbs breadcrumbs--with-menu">+ <li><a href="{% url "dashboard:product-list" %}" class="breadcrumbs--ellipsed-item">{% trans "Products" %}</a></li>+ <li><a href="{% url "dashboard:product-update" pk=product.pk %}#stock" class="breadcrumbs--ellipsed-item">{{ product }}</a></li>+ {% if stock.pk %}+ <li><span class="breadcrumbs--ellipsed-item">{% trans "Stock" %} {{ stock.variant }}</span></li>+ {% else %}+ <li>+ <span class="hide-on-med-and-down">{% trans "Add stock" %}</span>+ <span class="hide-on-large-only">{% blocktrans %}Add stock for {{ product }}{% endblocktrans %}</span>+ </li>+ {% endif %}+ </ul>+{% endblock %}++{% block menu_catalogue_class %} active{% endblock %}++{% block content %}+ <form method="post" id="form-stock" enctype="multipart/form-data">+ <div class="row">+ {% csrf_token %}+ {{ form.variant|materializecss:"s12 m8 l6" }}+ {{ form.quantity|materializecss:"s12 m4 l2" }}+ </div>++ <div class="row">+ {{ form.location|materializecss:"s12 m6 l4" }}+ {{ form.cost_price|materializecss:"s12 m6 l4" }}+ <input type="hidden" name="success_url" value="{% url 'dashboard:product-update' pk=product.pk %}#stock">+ </div>++ <div class="row">+ <div class="col s12 l8 right-align">+ {% if stock.pk %}+ <button type="submit" class="btn">{% trans "Update" %}</button>+ {% else %}+ <button type="submit" class="btn">{% trans "Create" %}</button>+ {% endif %}+ </div>+ </div>+ </form>+{% endblock %}diff --git a/templates/demo/dashboard/product/variant_form.html b/templates/demo/dashboard/product/variant_form.htmlnew file mode 100644index 0000000000..1e0254c427--- /dev/null+++ b/templates/demo/dashboard/product/variant_form.html@@ -0,0 +1,74 @@+{% extends "dashboard/base.html" %}+{% load i18n %}+{% load materializecss %}+{% load static %}++{% block title %}+ {% if variant.pk %}+ {{ variant.sku }}{% if variant.name %} ({{ variant.name }}){% endif %}+ {% else %}+ {% trans "Add variant" %}+ {% endif %} - {{ block.super }}{% endblock %}++{% block body_class %}body-store body-products{% endblock %}++{% block header_menu %}+ {% url "dashboard:product-update" pk=product.pk as url %}+ {% include "dashboard/includes/_back-link.html" with url=url hash="#variants" %}+{% endblock %}++{% block breadcrumbs %}+ <ul class="breadcrumbs breadcrumbs--with-menu">+ <li><a href="{% url "dashboard:product-list" %}" class="breadcrumbs--ellipsed-item">{% trans "Products" %}</a></li>+ <li><a href="{% url "dashboard:product-update" pk=product.pk %}#variants" class="breadcrumbs--ellipsed-item">{{ product }}</a></li>+ {% if variant.pk %}+ <li><span class="breadcrumbs--ellipsed-item">{% trans "Variant" %} {{ variant.sku }}{% if variant.name %} ({{ variant.name }}){% endif %}</span></li>+ {% else %}+ <li>+ <span class="hide-on-med-and-down">{% trans "Add variant" %}</span>+ <span class="hide-on-large-only">{% blocktrans %}Add variant for {{ product }}{% endblocktrans %}</span>+ </li>+ {% endif %}+ </ul>+{% endblock %}++{% block menu_catalogue_class %} active{% endblock %}++{% block content %}+ <form method="post" id="form-variant" enctype="multipart/form-data">+ {% csrf_token %}+ <input type="hidden" name="success_url" value="{% url 'dashboard:product-update' pk=product.pk %}#variants">+ <div class="row">+ <div class="col s12 m6 l4">+ {% if attribute_form.fields %}+ <div class="row">+ {% for attribute_field in attribute_form %}+ {{ attribute_field|materializecss }}+ {% endfor %}+ </div>+ {% else %}+ <p>{% trans "This product has no attributes." %}</p>+ {% endif %}+ </div>++ <div class="col s12 m6 l4">+ <div class="row">+ {{ form.sku|materializecss }}+ {{ form.price_override|materializecss }}+ {{ form.weight_override|materializecss }}+ {{ form.name|materializecss }}+ </div>+ </div>+ </div>++ <div class="row">+ <div class="col s12 l8 right-align">+ {% if variant.pk %}+ <button type="submit" class="btn">{% trans "Update" %}</button>+ {% else %}+ <button type="submit" class="btn">{% trans "Create" %}</button>+ {% endif %}+ </div>+ </div>+ </form>+{% endblock %}diff --git a/templates/demo/dashboard/shipping/method_delete.html b/templates/demo/dashboard/shipping/method_delete.htmlnew file mode 100644index 0000000000..f01932d4a8--- /dev/null+++ b/templates/demo/dashboard/shipping/method_delete.html@@ -0,0 +1,44 @@+{% extends "dashboard/base.html" %}+{% load materializecss %}+{% load i18n %}++{% block title %}{% trans "Delete" %} {{ shipping_method }}{% endblock %}++{% block body_class %}body-shipping-methods{% endblock %}++{% block page_title %}{% trans "Delete" %} {{ shipping_method }}{% endblock %}++{% block menu_delivery_class %}active{% endblock %}++{% block breadcrumbs %}+ <ul class="breadcrumbs breadcrumbs--with-menu">+ <li><a href="{% url 'dashboard:shipping-methods' %}"+ class="breadcrumbs--ellipsed-item">{% trans "Subscription methods" %}</a>+ </li>+ <li><a href="{% url 'dashboard:shipping-method-detail' pk=shipping_method.pk %}"+ class="breadcrumbs--ellipsed-item">{{ shipping_method }}</a>+ </li>+ <li>+ <span class="breadcrumbs--ellipsed-item">{% trans "Delete" %}</span>+ </li>+ </ul>+{% endblock %}++{% block menu_shipping_class %} active{% endblock %}++{% block content %}+ <div class="row">+ <div class="col s12 m5">+ <div class="card-panel">+ {% blocktrans with shipping_method_name=shipping_method %}+ Are you sure you want to delete the {{ shipping_method_name }} method?+ {% endblocktrans %}+ </div>+ </div>+ </div>+ <form method="post">+ {% csrf_token %}+ <button type="submit" class="btn red">{% trans "Delete" %}</button>+ </div>+ </form>+{% endblock %}diff --git a/templates/demo/dashboard/shipping/method_form.html b/templates/demo/dashboard/shipping/method_form.htmlnew file mode 100644index 0000000000..aa72cb8f90--- /dev/null+++ b/templates/demo/dashboard/shipping/method_form.html@@ -0,0 +1,88 @@+{% extends "dashboard/base.html" %}+{% load materializecss %}+{% load i18n %}+{% load mptt_tags %}+++{% block title %}+ {% trans "Shipping methods" %}+ {% if shipping_method.pk %}+ - {{ shipping_method }}+ {% else %}+ - {% trans 'Add new method' %}+ {% endif %}+ - {{ block.super }}+{% endblock %}++{% block body_class %}body-shipping-methods{% endblock %}++{% block menu_delivery_class %}active{% endblock %}++{% block page_title %}{% if shipping_method.pk %}{{ shipping_method }}{% else %}+ {% trans 'Add new method' %}+{% endif %}{% endblock %}++{% block breadcrumbs %}+ <ul class="breadcrumbs breadcrumbs--with-menu">+ <li><a href="{% url 'dashboard:shipping-methods' %}"+ class="breadcrumbs--ellipsed-item">{% trans "Shipping methods" %}</a>+ </li>+ <li>+ {% if shipping_method.pk %}+ <span class="breadcrumbs--ellipsed-item">{{ shipping_method }}</span>+ {% else %}+ <span class="breadcrumbs--ellipsed-item">{% trans 'Add new method' %}</span>+ {% endif %}+ </li>+ </ul>+{% endblock %}++{% block menu_shipping_class %} active{% endblock %}++{% block content %}+ <form method="post" id="form-method">+ {% csrf_token %}+ {{ price_per_country_formset.management_form }}+ <div class="row">+ {{ shipping_method_form|materializecss }}+ </div>+ <h4 class="light">{% trans "Price per country" %}</h4>++ <div class="card-panel">+ {% for form in price_per_country_formset %}+ <div class="row">+ {{ form.id }}+ {{ form.country_code|materializecss:"input-field s12 l5" }}+ {{ form.price|materializecss:"input-field s12 l5" }}+ {{ form.DELETE|materializecss:"input-field s12 l2" }}+ </div>+ {% if form.non_field_errors %}+ {% for error in form.non_field_errors %}+ <p class="help-block materialize-red-text">{{ error }}</p>+ {% endfor %}+ {% endif %}+ {% endfor %}+ </div>+++ <div class="row">+ {% if shipping_method.pk %}+ <div class="col s12 l6">+ <a href="{% url 'dashboard:shipping-method-delete' pk=shipping_method.pk %}"+ class="btn red">{% trans "Delete" %}</a>+ </div>+ <div class="col s12 l6 right-align">+ <a href="{% url 'dashboard:shipping-methods' %}"+ class="btn-flat">{% trans "Cancel" %}</a>+ <button type="submit" class="btn">{% trans "Update" %}</button>+ </div>+ {% else %}+ <div class="col s12 right-align">+ <a href="{% url 'dashboard:shipping-methods' %}"+ class="btn-flat">{% trans "Cancel" %}</a>+ <button type="submit" class="btn">{% trans "Create" %}</button>+ </div>+ {% endif %}+ </div>+ </form>+{% endblock %}diff --git a/templates/demo/dashboard/shipping/method_list.html b/templates/demo/dashboard/shipping/method_list.htmlnew file mode 100644index 0000000000..f1d235ae69--- /dev/null+++ b/templates/demo/dashboard/shipping/method_list.html@@ -0,0 +1,70 @@+{% extends "dashboard/base.html" %}+{% load i18n %}+{% load prices_i18n %}+{% load status %}++{% block title %}{% trans "Shipping methods" %} - {{ block.super }}{% endblock %}++{% block body_class %}body-shipping-methods{% endblock %}++{% block menu_delivery_class %}active{% endblock %}++{% block breadcrumbs %}+ <ul class="breadcrumbs">+ <li>{% trans "Shipping" %}</li>+ <li>{% trans "methods" %}</li>+ </ul>+{% endblock %}++{% block header_extra %}+ <div class="fixed-action-btn">+ <a class="btn-fab btn-floating btn-large waves-effect waves-light teal"+ title="{% trans "Add method" %}"+ href="{% url 'dashboard:shipping-method-add' %}">+ <i class="material-icons">add</i>+ </a>+ </div>+{% endblock %}++{% block content %}+ {% if shipping_methods %}+ <div class="card">+ <div class="data-table-container">+ <table class="bordered hoverable responsive data-table">+ <thead>+ <tr>+ <th>{% trans "Name" %}</th>+ <th>{% trans "Price range" %}</th>+ <th class="wide">{% trans "Countries" %}</th>+ </tr>+ </thead>+ <tbody>+ {% for method in shipping_methods %}+ <tr>+ <td>+ <a href="{% url 'dashboard:shipping-method-detail' pk=method.pk %}">{{ method }}</a>+ </td>+ <td>+ {% if not method.price_range %}+ -+ {% elif method.price_range.min_price == method.price_range.max_price %}+ {% gross method.price_range.min_price %}+ {% else %}+ {% gross method.price_range.min_price %} -+ {% gross method.price_range.max_price %}+ {% endif %}+ </td>+ <td>{{ method.countries|join:", " }}</td>+ </tr>+ {% endfor %}+ </tbody>+ </table>+ </div>+ </div>++ {% include "dashboard/includes/_pagination.html" %}+ {% else %}+ <p>{% trans "No shipping methods found." %}</p>+ {% endif %}++{% endblock %}diff --git a/templates/demo/home.html b/templates/demo/home.htmlindex e866ec93c9..d44ecb8c8a 100644--- a/templates/demo/home.html+++ b/templates/demo/home.html@@ -3,14 +3,16 @@{% block content %}- <div class="container home">+ <div class="home"><div class="row"><div class="col-sm-12 home__block1">- <h1>{% trans "Promo & Sale" %}</h1>- <h2>{% trans "form the Northpole" %}</h2>- <button class="btn btn-secondary home__button">- {% trans "Shop now" %}- </button>+ <div>+ <h1>{% trans "Promo & Sale" %}</h1>+ <h2>{% trans "form the Northpole" %}</h2>+ <button class="btn btn-secondary home__button">+ {% trans "Shop now" %}+ </button>+ </div></div></div><div class="row">diff --git a/templates/demo/product/details.html b/templates/demo/product/details.htmlindex debcda025a..ce6cf19d15 100644--- a/templates/demo/product/details.html+++ b/templates/demo/product/details.html@@ -10,126 +10,96 @@{% block title %}{{ product }} — {{ block.super }}{% endblock %}{% block breadcrumb %}- {{ block.super }}- {% with product.get_first_category as category %}- {% if category %}- <li><a href="{{ category.get_absolute_url }}">{{ category }}</a></li>- {% endif %}- {% endwith %}- <li><a href="{{ product.get_absolute_url }}">{{ product }}</a></li>-{% endblock breadcrumb %}--{% block outercontent %}-{% if not is_visible %}- <div class="alert alert-warning" role="alert">- {% blocktrans with date=product.available_on|date %}<strong>Warning!</strong> You are previewing a product that will become visible on <strong>{{ date }}</strong>.{% endblocktrans %}- </div>-{% endif %}-<div itemscope itemtype="http://schema.org/Product">- <div class="row">- <div class="col-sm-6 col-sm-push-6">- <h1 itemprop="name">- {{ product }}- </h1>-- {% if product.is_in_stock %}- <p class="lead" itemprop="offers" itemscope itemtype="http://schema.org/Offer">- <span class="price">{% price_range price_range %}</span>- {% if discount %}- <small class="price undiscounted text-muted">{% gross undiscounted_price_range.min_price html=True %}</small>- {% endif %}- {% if local_price_range %}- <br>- <small class="text-info">- ≈- {% gross local_price_range.min_price html=True %}- </small>- {% endif %}- </p>- {% endif %}-- <hr>-- <div class="visible-xs">- {% if product.images.first %}- <img class="img-responsive" src="{{ product.images.first.image.crop.680x680 }}" alt="">- {% else %}- <img src="{% static 'images/product-image-placeholder.png' %}" alt="" class="img-responsive">- {% endif %}- <hr>- </div>-- {% if is_visible and product.is_in_stock %}- {% block orderform %}- <form role="form" class="product-form form-vertical" method="post"- action="{% url 'cart:add-to-cart' product_id=product.pk %}?next={{ product.get_absolute_url }}" novalidate>- {% csrf_token %}- {% bootstrap_form form %}-- <div class="form-group">- <button class="btn btn-lg btn-block btn-primary">- {% trans "Add to cart" %}- </button>- </div>- </form>- {% endblock %}- {% else %}- <p class="alert alert-warning">{% trans "This product is currently <strong>unavailable</strong>." %}</p>+ <ul class="breadcrumbs list-unstyled hidden-sm-down">+ <li><a href="/">{% trans "Home" %}</a></li>+ {% with product.get_first_category as category %}+ {% if category %}+ <li><a href="{{ category.get_absolute_url }}">{{ category }}</a></li>{% endif %}+ {% endwith %}+ <li><a href="{{ product.get_absolute_url }}">{{ product }}</a></li>+ </ul>+{% endblock breadcrumb %}- <hr>-- <div itemprop="description">- {{ product.description|markdown }}- </div>-+{% block content %}+ {% if not is_visible %}+ <div class="alert alert-warning" role="alert">+ {% blocktrans with date=product.available_on|date %}<strong>Warning!</strong> You are previewing a product that will become visible on <strong>{{ date }}</strong>.{% endblocktrans %}</div>-- {% with images=product.images.all %}- <div class="col-sm-6 col-sm-pull-6">- <div id="product-carousel" class="carousel slide panel panel-default hidden-xs" data-ride="carousel">- <div class="carousel-inner">- {% for image in images %}- <div class="item{% if forloop.first %} active{% endif %}">- <a href="#" data-toggle="modal" data-target="#modal-{{ forloop.counter }}">- <img class="img-responsive" src="{{ image.image.crop.750x750 }}" alt="">- </a>- </div>- {% empty %}- <div class="item active">- <img src="{% static 'images/product-image-placeholder.png' %}" alt="" class="img-responsive">- </div>- {% endfor %}+ {% endif %}+ <div itemscope itemtype="http://schema.org/Product">+ <div class="row product">+ <div class="col-sm-7 product__gallery">+ {% with images=product.images.all %}+ <div id="carousel-example-generic" class="carousel slide">+ <ol class="carousel-indicators hidden-xs-down">+ {% for image in images %}+ <li data-target="#carousel-example-generic" data-slide-to="{{ forloop.counter0 }}">+ <img src="{{ image.image.crop.60x60 }}" alt="">+ </li>+ {% endfor %}+ </ol>+ <div class="carousel-inner" role="listbox">+ {% for image in images %}+ <div class="carousel-item{% if forloop.first %} active{% endif %}">+ <img src="{{ image.image.crop.750x750 }}" alt="">+ </div>+ {% endfor %}</div>+ <a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev">+ <img class="icon-next" src="{% static "img/gallery-arrow.svg" %}">+ </a>+ <a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next">+ <img class="icon-next" src="{% static "img/gallery-arrow.svg" %}">+ </a>+ </div>+ {% endwith %}+ </div>+ <div class="col-sm-5 product__info">+ <h1 itemprop="name" class="product__info__name">+ {{ product }}+ </h1>+ {% if product.is_in_stock %}+ <h2 itemprop="offers" itemscope itemtype="http://schema.org/Offer">+ <span class="product__info__price">{% price_range price_range %}</span>+ {% if discount %}+ <small class="price undiscounted text-muted">{% gross undiscounted_price_range.min_price html=True %}</small>+ {% endif %}+ {% if local_price_range %}+ <br>+ <small class="text-info">+ ≈+ {% gross local_price_range.min_price html=True %}+ </small>+ {% endif %}+ </h2>+ {% endif %}+ {% if is_visible and product.is_in_stock %}+ {% block orderform %}+ <form role="form" class="product-form form-vertical" method="post"+ action="{% url 'cart:add-to-cart' product_id=product.pk %}?next={{ product.get_absolute_url }}" novalidate>+ {% csrf_token %}+ {% bootstrap_form form %}++ <div class="form-group">+ <button class="btn primary">+ {% trans "Add to cart" %}+ </button>+ </div>+ </form>+ {% endblock %}+ {% else %}+ <p class="alert alert-warning">{% trans "This product is currently <strong>unavailable</strong>." %}</p>+ {% endif %}- {% for image in images %}- <div class="modal fade" id="modal-{{ forloop.counter }}"- tabindex="-1" role="dialog" aria-labelledby="myModalLabel{{ forloop.counter }}" aria-hidden="true">- <div class="modal-dialog modal-lg">- <div class="modal-content">- <div class="modal-header">- <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>- <h4 class="modal-title" id="myModalLabel{{ forloop.counter }}">{{ product }}</h4>- </div>+ <hr>- <div class="modal-body">- <img class="img-responsive" src="" data-src="{{ image.image.url }}" alt="">- </div>- </div>- </div>+ <div itemprop="product__info__description">+ <p><strong>{% trans "Description" %}</strong></p>+ {{ product.description|markdown }}</div>- {% endfor %}- </div>- <div class="product-gallery row">- {% for image in images %}- <a href="{{ image.image.url }}" target="_blank" class="product-gallery-item col-xs-6 col-md-3">- <img class="thumbnail img-responsive" src="{{ image.image.crop.280x280 }}" alt="">- </a>- {% endfor %}</div></div>- {% endwith %}</div>-</div>-{% endblock outercontent %}+{% endblock content %}diff --git a/webpack.config.js b/webpack.config.jsindex 7a3c51a02b..177d967a60 100644--- a/webpack.config.js+++ b/webpack.config.js@@ -24,7 +24,8 @@ var providePlugin = new webpack.ProvidePlugin({jQuery: 'jquery','window.jQuery': 'jquery',Backbone: 'backbone',- 'window.Backbone': 'backbone'+ 'window.Backbone': 'backbone',+ "window.Tether": 'tether'});var config = {@@ -34,7 +35,7 @@ var config = {storefront: './saleor/static/js/storefront.js',demo: './saleor/static/js/demo/storefront.js',vendor: [- 'bootstrap-sass',+ 'bootstrap','jquery','jquery.cookie']