Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Redo the dashboard based on material design
Patryk Zawadzki22789c51af73
diff --git a/saleor/static/js/dashboard.js b/saleor/static/js/dashboard.jsindex 1ecc39b0b6..aa335eeefe 100644--- a/saleor/static/js/dashboard.js+++ b/saleor/static/js/dashboard.js@@ -6,6 +6,20 @@ import Sortable from 'sortablejs';import '../scss/dashboard/dashboard.scss';+var supportsPassive = false;+try {+ var opts = Object.defineProperty({}, 'passive', {+ get: function() {+ supportsPassive = true;+ }+ });+ window.addEventListener('test', null, opts);+} catch (e) {}++function onScroll(func) {+ window.addEventListener('scroll', func, supportsPassive ? {passive: true} : false);+}+function openModal() {$('.modal-trigger-custom').on('click', function (e) {let that = this;@@ -25,63 +39,16 @@ function openModal() {}$(document).ready(function() {- let tabletScreen = 990;- let wideScreen = 1650;- let navWidth = '250px';- let $mainNav = $('#main-nav');- let mainNavTop = $mainNav.offset().top;- let $closeMenu = $('#close-menu');- let $openMenu = $('#open-menu');- function openMenu(animationSpeed) {- $mainNav.animate({- 'left': navWidth- }, animationSpeed);- if ($(window).width() < wideScreen && $(window).width() >= tabletScreen) {- $('main .container, .subheader .nav-wrapper').animate({- 'marginLeft': navWidth- }, animationSpeed);- }- $openMenu.addClass('hide');- $closeMenu.removeClass('hide');- $(window).scroll(function() {- $mainNav.toggleClass('sticky', $(window).scrollTop() > mainNavTop);- });- if ($(window).width() > tabletScreen) {- $.cookie('menu', 'open', { path: '/' });- }- }- function closeMenu() {- $mainNav.animate({- 'left': '0'- });- $closeMenu.addClass('hide');- $openMenu.removeClass('hide');- $.removeCookie('menu', { path: '/' });- if ($(window).width() < wideScreen) {- $('main .container, .subheader .nav-wrapper').css({- 'margin-left': 'auto'- });- }+ let mainNavTop = $('.side-nav').offset().top;+ let $toggleMenu = $('#toggle-menu');+ function toggleMenu(e) {+ $(document.body).toggleClass('nav-toggled');+ e.preventDefault();}- $openMenu.click(function() {- openMenu(400);+ $toggleMenu.click(toggleMenu);+ onScroll(function() {+ $(document.body).toggleClass('sticky-nav', Math.floor($(window).scrollTop()) > Math.ceil(mainNavTop));});- $closeMenu.click(function() {- closeMenu();- });- if ($(window).width() <= tabletScreen) {- $(window).click(function() {- closeMenu();- });- $openMenu.click(function(event) {- event.stopPropagation();- });- }- if ($.cookie('menu') === 'open') {- openMenu(0);- } else {- closeMenu();- }initSelects();$('.modal').modal();@@ -237,7 +204,7 @@ $('.datepicker').pickadate({});function initSelects() {$('select:not(.browser-default):not([multiple])').material_select();- $('select[multiple]:not(.browser-default)').select2();+ $('select[multiple]:not(.browser-default)').select2({width: '100%'});}// Coupon dynamic formsdiff --git a/saleor/static/scss/dashboard/widget/_breadcrumbs.scss b/saleor/static/scss/dashboard/components/_breadcrumbs.scsssimilarity index 100%rename from saleor/static/scss/dashboard/widget/_breadcrumbs.scssrename to saleor/static/scss/dashboard/components/_breadcrumbs.scssdiff --git a/saleor/static/scss/dashboard/widget/_card.scss b/saleor/static/scss/dashboard/components/_card.scsssimilarity index 100%rename from saleor/static/scss/dashboard/widget/_card.scssrename to saleor/static/scss/dashboard/components/_card.scssdiff --git a/saleor/static/scss/dashboard/widget/_data-table.scss b/saleor/static/scss/dashboard/components/_data-table.scsssimilarity index 75%rename from saleor/static/scss/dashboard/widget/_data-table.scssrename to saleor/static/scss/dashboard/components/_data-table.scssindex c6ffb050b5..9224e07e3d 100644--- a/saleor/static/scss/dashboard/widget/_data-table.scss+++ b/saleor/static/scss/dashboard/components/_data-table.scss@@ -11,6 +11,11 @@}}+ &-actions {+ border-bottom: 1px solid $table-border-color;+ padding: 21px 8px;+ }+&-header {padding: 21px 24px;@@ -23,27 +28,27 @@font-weight: 300;margin: 0;- .data-table-status {+ a {+ color: $secondary-color;+ }++ .label {float: right;margin-top: -4px;}}- $statuses-map: (- danger: map-get($red, base),- success: map-get($green, lighten-2),- default: map-get($grey, base)- );-- &-status {- @each $status in (danger, success, default) {- &--#{$status} {- color: white;- background: #{map_get($statuses-map, $status)};- border-radius: 2px;- padding: .25em 5px;- font-size: .8em;- }+ .label {+ @extend .grey-text;+ font-size: 12px;+ text-transform: uppercase;++ &.label-danger {+ @extend .red-text;+ }++ &.label-success {+ @extend .green-text;}}@@ -65,6 +70,10 @@vertical-align: middle;white-space: nowrap;+ a {+ color: $secondary-color;+ }+&:first-child {padding-left: 24px;}@@ -79,7 +88,6 @@}th {- border-top: 1px solid $table-border-color;color: map_get($grey, darken-1);font-weight: normal;font-size: 85%;diff --git a/saleor/static/scss/dashboard/widget/_dropzone.scss b/saleor/static/scss/dashboard/components/_dropzone.scsssimilarity index 87%rename from saleor/static/scss/dashboard/widget/_dropzone.scssrename to saleor/static/scss/dashboard/components/_dropzone.scssindex 2e5c5d3bb3..82ec434ca4 100644--- a/saleor/static/scss/dashboard/widget/_dropzone.scss+++ b/saleor/static/scss/dashboard/components/_dropzone.scss@@ -1,4 +1,5 @@@mixin dropzone {+ background-color: inherit;border: none;height: 79vh;padding: 0;@@ -53,6 +54,14 @@}}}++ .dz-message {+ position: absolute;+ left: 0;+ margin: 0;+ right: 0;+ top: 0;+ }}.dropzone {diff --git a/saleor/static/scss/dashboard/widget/_form.scss b/saleor/static/scss/dashboard/components/_form.scsssimilarity index 74%rename from saleor/static/scss/dashboard/widget/_form.scssrename to saleor/static/scss/dashboard/components/_form.scssindex d9f7b7bb94..ad12a6fa88 100644--- a/saleor/static/scss/dashboard/widget/_form.scss+++ b/saleor/static/scss/dashboard/components/_form.scss@@ -9,7 +9,7 @@label {@extend .active;- display: block;+ transition: none;}input[type=radio] {@@ -18,6 +18,11 @@select[multiple] {display: initial;+ width: 100%;+ }++ textarea {+ width: 100%;}p.help-block {@@ -26,8 +31,18 @@clear: both;}+ .input-field {+ margin-top: 0;+ padding-top: 1rem;+ label, label.active {+ top: 0;+ transform: none;+ }+ }+%input-lg {font-size: 2.2rem;+ transition: none;}&#form-product {@@ -60,18 +75,6 @@#id_display {@extend %input-lg;}-- table {- .input-field, p {- margin: 0;- padding: 0;- }-- label {- font-size: 0;- vertical-align: bottom;- }- }}&#form-category {@@ -112,6 +115,19 @@}}-form {+.input-with-suffix {+ display: flex;+ input {+ flex-grow: 1;+ }+ .input-text-suffix {+ @extend .grey-text;+ line-height: 45px;+ padding-left: 10px;+ text-align: right;+ }+}++.main form {@include form;}diff --git a/saleor/static/scss/dashboard/components/_formset.scss b/saleor/static/scss/dashboard/components/_formset.scssnew file mode 100644index 0000000000..dcde28eb19--- /dev/null+++ b/saleor/static/scss/dashboard/components/_formset.scss@@ -0,0 +1,80 @@+@mixin formset-table {+ input[type=checkbox].filled-in + label {+ margin-top: 5px;+ padding: 0;++ &:after {+ display: inline-block;+ position: static;+ }+ }++ th, td {+ height: 48px;+ padding: 0 28px;+ vertical-align: baseline;++ &:first-child {+ padding-left: 24px;+ }++ &:last-child {+ padding-right: 24px;+ }++ &.no-padded {+ padding: 0;+ }++ .input-field {+ label {+ font-size: 0;+ vertical-align: bottom;+ }+ }+ }++ th {+ color: map_get($grey, darken-1);+ font-weight: normal;+ font-size: 85%;+ height: 56px;+ vertical-align: middle;+ }++ tfoot {+ font-weight: bold;+ }++ .bulk-checkbox {+ padding: 0 24px;+ width: 1px;++ + th, + td {+ padding-left: 0;+ }+ }++ .wide {+ width: 99%;+ }++ &.hoverable {+ box-shadow: none;+ }++ .dropdown-button {+ padding: 15px 28px;+ }++ .dropdown-content {+ left: auto !important;+ right: 0;+ top: 0;+ white-space: nowrap;+ }+}++.formset-table {+ @include formset-table;+}diff --git a/saleor/static/scss/dashboard/widget/_list.scss b/saleor/static/scss/dashboard/components/_list.scsssimilarity index 80%rename from saleor/static/scss/dashboard/widget/_list.scssrename to saleor/static/scss/dashboard/components/_list.scssindex 89ecf32d50..b0d514bf1d 100644--- a/saleor/static/scss/dashboard/widget/_list.scss+++ b/saleor/static/scss/dashboard/components/_list.scss@@ -1,22 +1,13 @@@mixin list {- border: none;overflow: visible;& &-item.avatar {- border: none;- padding-left: 59px;- padding-right: 0;- padding-bottom: 3px;- min-height: 0;+ min-height: 64px;@media (max-width: $small-screen) {margin-right: -$gutter-width/2;}- .circle {- left: 0;- }-&-delete {background: white;font-size: $font-size-action-icon;@@ -36,12 +27,9 @@}}- & &-item--two-lines {+ & &-item {border: none;- padding: 0;- }-- &-item {+ padding-bottom: 0;position: relative;&-name {@@ -58,12 +46,13 @@&-price, &-desc, &-name--single {border-bottom: 1px solid $collection-border-color;- padding-bottom: 12px;+ margin: 0;+ padding-bottom: 10px;}&-desc {- color: map_get($grey, base);- margin: 0 0 12px;+ @extend .grey-text;+ margin: 0;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;@@ -88,11 +77,8 @@margin-bottom: 5px;}}-- &--attributes {- & &-item {- padding-left: 0;- }+ &-item:last-child &-item-price, &-item:last-child &-item-desc, &-item:last-child &-item-name--single {+ border: none;}.card & {diff --git a/saleor/static/scss/dashboard/components/_nav.scss b/saleor/static/scss/dashboard/components/_nav.scssnew file mode 100644index 0000000000..cd8511738f--- /dev/null+++ b/saleor/static/scss/dashboard/components/_nav.scss@@ -0,0 +1,221 @@+header {+ .top-nav {+ box-shadow: none;+ line-height: 0;+ .left {+ float: none !important;+ margin-right: 56px;+ @media (max-width: $small-screen) {+ margin-right: 0;+ }+ .search {+ float: none;+ margin-left: 272px;+ padding: 10px 0;+ .input-field {+ input {+ background-color: rgba(255, 255, 255, .15);+ border-radius: 3px;+ box-sizing: border-box;+ display: inline-block;+ height: 36px;+ margin-bottom: 0;+ transition: background-color .2s ease-out;+ width: 100%;+ &:hover {+ background-color: rgba(255, 255, 255, .25);+ }+ &:focus {+ background-color: white;+ }+ }+ label {+ transition: color .2s ease-out;+ i {+ height: 36px;+ line-height: 36px;+ }+ }+ }+ }+ }+ .user-name {+ padding: (($dropdown-item-height - 22) / 2) 16px;+ white-space: normal;+ max-width: 90vw;+ }+ .menu-toggle {+ background-color: $primary-color;+ position: absolute;+ width: 237px;+ z-index: 2;+ i {+ color: white;+ }+ a:hover {+ background-color: transparent;+ }+ }+ .header-button, .button-collapse {+ float: left;+ margin: 0 $gutter-width;+ display: block;+ i {+ font-size: 2.7rem;+ height: $header-height;+ line-height: $header-height;+ }+ }++ .dropdown-button {+ float: right;+ line-height: $header-height/2;+ position: relative;+ top: $header-height/4;+ margin-left: 1rem;+ z-index: 999;+ i {+ height: $header-height/2;+ line-height: $header-height/2;+ }+ }++ .dropdown-content {+ left: auto !important;+ right: 0;+ white-space: nowrap;+ }++ .logo {+ img {+ max-height: $navbar-height;+ margin: 13px 0;+ }+ }+ .right {+ padding-right: 15px;+ }+ }++ .side-nav {+ width: 232px;+ padding: 12px 8px 52px;+ position: absolute;+ top: $header-height + $subheader-height;+ height: 100vh;+ transition: transform .1s;+ @media (min-width: $medium-screen) {+ background: transparent;+ box-shadow: none;+ }+ @media (min-width: $large-screen) {+ transform: translateX(0);+ }+ &-section {+ p {+ @extend .grey-text;+ @extend .text-darken-1;+ margin: 0;+ height: 40px;+ line-height: 40px;+ padding: 0 (2 * $sidenav-padding);+ font-size: 13px;+ }+ &:not(:last-of-type) {+ border-bottom: 1px solid map-get($grey, lighten-2);+ }+ padding-top: $gutter-width / 2;+ &#first{+ border-top: 1px solid map-get($grey, lighten-2);+ }+ }+ a {+ @media (min-width: $medium-screen) {+ height: 40px;+ line-height: 40px;+ }+ }+ li {+ border-radius: 2px;+ &.active {+ a {+ @extend .grey-text;+ @extend .text-darken-4;+ }+ }+ .body-home &.nav-home {+ @extend .active;+ }+ }+ }+}++.subheader {+ background-color: $primary-color-light;+ height: $subheader-height;+ margin-top: 0;+ .container {+ margin: 0 40px;+ transition: margin .1s;+ @media (min-width: $large-screen) {+ margin-left: 272px;+ }+ }+ i {+ font-size: $subheader-height/2;+ line-height: $subheader-height;+ color: white;+ }+}++.main {+ .container {+ margin: 40px 40px 0;+ max-width: none;+ width: auto;+ transition: margin .1s;+ @media (min-width: $large-screen) {+ margin-left: 272px;+ }+ }+}++body.nav-toggled {+ header {+ .side-nav {+ transform: translateX(0);+ @media (min-width: $large-screen) {+ transform: translateX(-105%);+ }+ }+ }+ .subheader {+ .container {+ @media (min-width: $medium-screen) {+ margin-left: 272px;+ }+ @media (min-width: $large-screen) {+ margin-left: 40px;+ }+ }+ }+ .main {+ .container {+ @media (min-width: $medium-screen) {+ margin-left: 272px;+ }+ @media (min-width: $large-screen) {+ margin-left: 40px;+ }+ }+ }+}++body.sticky-nav {+ header {+ .side-nav {+ position: fixed;+ top: 0;+ }+ }+}diff --git a/saleor/static/scss/dashboard/widget/_ppoi.scss b/saleor/static/scss/dashboard/components/_ppoi.scsssimilarity index 100%rename from saleor/static/scss/dashboard/widget/_ppoi.scssrename to saleor/static/scss/dashboard/components/_ppoi.scssdiff --git a/saleor/static/scss/dashboard/widget/_product-gallery.scss b/saleor/static/scss/dashboard/components/_product-gallery.scsssimilarity index 97%rename from saleor/static/scss/dashboard/widget/_product-gallery.scssrename to saleor/static/scss/dashboard/components/_product-gallery.scssindex 2cac5b51db..d069dd1265 100644--- a/saleor/static/scss/dashboard/widget/_product-gallery.scss+++ b/saleor/static/scss/dashboard/components/_product-gallery.scss@@ -1,4 +1,5 @@@mixin product-gallery {+ margin: 0;&-item {margin: 0 $gutter-width/2 $gutter-width !important;padding: 0;@@ -57,7 +58,8 @@}}.sortable__drag-area {- background-color: grey;+ bottom: 0;+ left: 0;position: absolute;top: 0;right: 0;diff --git a/saleor/static/scss/dashboard/widget/_select2.scss b/saleor/static/scss/dashboard/components/_select2.scsssimilarity index 97%rename from saleor/static/scss/dashboard/widget/_select2.scssrename to saleor/static/scss/dashboard/components/_select2.scssindex e91637e135..7a5662d36d 100644--- a/saleor/static/scss/dashboard/widget/_select2.scss+++ b/saleor/static/scss/dashboard/components/_select2.scss@@ -1,5 +1,5 @@@mixin select2 {- margin-bottom: 15px;+ margin-bottom: 20px;&.select2-container--default, &.select2-container--default.select2-container--focus {border-bottom: $input-border;@@ -38,7 +38,7 @@border: none;border-radius: 0;box-sizing: border-box;- line-height: 3rem;+ line-height: calc(3rem - 1px);.select2-selection__rendered {padding: 0;@@ -86,7 +86,7 @@&.select2-container--default.select2-container--open {border-bottom: 1px solid $input-focus-color;box-shadow: 0 1px 0 0 $input-focus-color;-+.select2-selection__rendered {background-color: $select-background;}diff --git a/saleor/static/scss/dashboard/widget/_tabs.scss b/saleor/static/scss/dashboard/components/_tabs.scsssimilarity index 100%rename from saleor/static/scss/dashboard/widget/_tabs.scssrename to saleor/static/scss/dashboard/components/_tabs.scssdiff --git a/saleor/static/scss/dashboard/widget/_toast.scss b/saleor/static/scss/dashboard/components/_toast.scsssimilarity index 100%rename from saleor/static/scss/dashboard/widget/_toast.scssrename to saleor/static/scss/dashboard/components/_toast.scssdiff --git a/saleor/static/scss/dashboard/dashboard.scss b/saleor/static/scss/dashboard/dashboard.scssindex f9175dbe7c..3c000ffc27 100644--- a/saleor/static/scss/dashboard/dashboard.scss+++ b/saleor/static/scss/dashboard/dashboard.scss@@ -1,9 +1,18 @@+$button-padding: 0 16px;+$button-flat-color: #EC407A;$font-size-action-icon: 18px;$header-height: 64px;+$navbar-height: 56px;$navbar-height-mobile: 64px;+$placeholder-text-color: white;+$primary-color: #0097A7;+$primary-color-light: #00BCD4;+$secondary-color: #EC407A;+$sidenav-font-color: #616161;+$sidenav-padding: 8px;$subheader-height: 48px;+$tabs-bg-color: #f5f5f5;$transition-duration: .2s;-$placeholder-text-color: white;$roboto-font-path: "~materialize-css/fonts/roboto/";@import "~materialize-css/sass/materialize";@@ -22,165 +31,6 @@ $roboto-font-path: "~materialize-css/fonts/roboto/";url('~material-design-icons/iconfont/MaterialIcons-Regular.ttf') format('truetype');}-header {- .top-nav {- box-shadow: none;- line-height: 0;- .left {- width: 98vw;- @media (max-width: $small-screen) {- width: auto;- }- .search {- min-width: 50%;- width: auto;- .input-field {- margin-top: 0.5rem;- @media (min-width: $large-screen) {- margin-top: 0.3rem;- }- margin-left: 3rem;- input {- padding: 1rem;- background-color: $primary-color-light;- margin-bottom: 0;- border-radius: 3px;- width: 80%;- display: inline-block;- @media (min-width: $large-screen) {- width: 90%;- }- @media (max-width: $medium-screen) {- width: 70%;- }- &:focus {- background-color: white;- & + .search-icon i{- color: $primary-color;- }- }-- }- .search-icon {- background: transparent;- border: none;- position: absolute;- right: 1.3rem;- top: 0.9rem;- i {- height: 21px;- line-height: 1;- }- }- }- }- }- .user-name {- padding: (($dropdown-item-height - 22) / 2) 16px;- white-space: normal;- max-width: 90vw;- }- .menu-toggle {- background-color: $primary-color;- position: absolute;- width: 237px;- z-index: 2;- i {- color: white;- }- a:hover {- background-color: transparent;- }- }- .header-button, .button-collapse {- float: left;- margin: 0 $gutter-width;- display: block;- i {- font-size: 2.7rem;- height: $header-height;- line-height: $header-height;- }- }-- .dropdown-button {- float: right;- line-height: $header-height/2;- position: relative;- top: $header-height/4;- margin-left: 1rem;- z-index: 999;- i {- height: $header-height/2;- line-height: $header-height/2;- }- }-- .dropdown-content {- left: auto !important;- right: 0;- white-space: nowrap;- }-- .logo {- img {- max-height: $header-height;- padding-top: $sidenav-padding- }- }- .right {- padding-right: $sidenav-padding;- }- }-- .side-nav {- width: 250px;- position: absolute;- top: $header-height + $subheader-height;- height: 100vh;- &-section {- p {- line-height: 1;- color: map-get($grey, darken-1);- margin-left: $gutter-width;- font-size: 85%;- }- &:not(:last-of-type) {- border-bottom: 1px solid map-get($grey, lighten-2);- }- padding-top: $gutter-width / 2;- &#first{- border-top: 1px solid map-get($grey, lighten-2);- }- }- &.sticky {- position: fixed;- top: 0;- }- li {- display: block;- .body-home &.nav-home {- @extend .active;- }- }- }-}--.subheader {- background-color: $primary-color-light;- height: $subheader-height;- margin-top: 0;- i {- font-size: $subheader-height/2;- line-height: $subheader-height;- color: white;- }-}--.main {- margin-top: 1.5rem;-}-.modal-content {.row {margin: {@@ -220,18 +70,6 @@ header {}}-.input-with-suffix input {- float: left;- width: calc(100% - 40px);-}--.input-text-suffix {- float: right;- line-height: 45px;- text-align: right;- width: 40px;-}-#modal-product-class {max-width: 300px;}@@ -241,15 +79,6 @@ header {}.btn-data-table {- background: none;- border: none;- font-weight: bold;- padding: 0;- text-transform: uppercase;-- &:hover, &:focus {- background: none;- }}.fixed-action-btn {@@ -358,14 +187,25 @@ header {color: $primary-color;}-@import "widget/breadcrumbs";-@import "widget/card";-@import "widget/data-table";-@import "widget/dropzone";-@import "widget/form";-@import "widget/list";-@import "widget/product-gallery";-@import "widget/ppoi";-@import "widget/select2";-@import "widget/tabs";-@import "widget/toast";+.currency {+ @extend .grey-text;+ font-size: 12px;+}++html {+ background: #f5f5f5;+}++@import "components/breadcrumbs";+@import "components/card";+@import "components/data-table";+@import "components/dropzone";+@import "components/form";+@import "components/formset";+@import "components/list";+@import "components/nav";+@import "components/product-gallery";+@import "components/ppoi";+@import "components/select2";+@import "components/tabs";+@import "components/toast";diff --git a/templates/cart/index.html b/templates/cart/index.htmlindex 578be9e6d2..9861cbda16 100644--- a/templates/cart/index.html+++ b/templates/cart/index.html@@ -108,7 +108,7 @@</div><div class="col-6 cart__delivery-info__price">{% for option in default_country_options %}- <p class="text-right">{% gross option.price %}</p>+ <p class="text-right">{% gross option.price html=True %}</p>{% endfor %}</div></div>diff --git a/templates/checkout/details.html b/templates/checkout/details.htmlindex cd336bde98..c129eb6da9 100644--- a/templates/checkout/details.html+++ b/templates/checkout/details.html@@ -69,7 +69,7 @@<h3>{% trans "Total" %}</h3></div><div class="col-4">- <h3 class="float-right">{% gross total %}</h3>+ <h3 class="float-right">{% gross total html=True %}</h3></div></div></div>diff --git a/templates/dashboard/base.html b/templates/dashboard/base.htmlindex 79e2471594..9072b4ee42 100644--- a/templates/dashboard/base.html+++ b/templates/dashboard/base.html@@ -19,7 +19,7 @@<body class="{% block body_class %}body-home{% endblock %}"><header>- <nav class="top-nav">+ <nav class="top-nav" id="top-nav"><div class="nav-wrapper"><div class="right"><ul id="user-action" class="dropdown-content">@@ -32,12 +32,30 @@{% trans "Log out" context "Dashboard top navigation action" %}</a></li></ul>- <a class="dropdown-button" data-constrainwidth="false" href="#" data-activates="user-action"><i class="material-icons">account_circle</i><i class="mdi-navigation-arrow-drop-down right"></i></a>+ <a class="dropdown-button" data-constrainwidth="false" href="#" data-activates="user-action"><i class="material-icons">account_circle</i></a>{% if SEARCH_IS_ENABLED %}<a href="{% url "dashboard:search" %}" class="hide-on-med-and-up dropdown-button"><i class="material-icons">search</i></a>{% endif %}</div>- <ul class="side-nav" id="main-nav">+ <ul class="left">+ <li><a href="#" id="toggle-menu" class="show-on-large"><i class="material-icons">menu</i></a></li>+ <li><a href="{% url 'dashboard:index' %}" class="logo">+ <img src="{% static "images/dashboard-logo.svg" %}" alt="Saleor">+ </a></li>+ <li class="search">+ {% if SEARCH_IS_ENABLED %}+ <form method="get" action="{% url "dashboard:search" %}" class="hide-on-small-only">+ <div class="input-field">+ <input id="search" type="search" placeholder="{% trans "Search" context "Dashboard search placeholder" %}" name="q" value="{% if query %}{{ query }}{% endif %}">+ <label>+ <i class="material-icons">search</i>+ </label>+ </div>+ </form>+ {% endif %}+ </li>+ </ul>+ <ul class="side-nav"><li class="nav-home"><a href="{% url 'dashboard:index' %}">{% trans "Home" context "Dashboard side navigation link" %}</a></li>@@ -93,29 +111,6 @@</ul></li></ul>- <ul>- <li class="menu-toggle">- <ul class="left">- <li><a href="#" id="open-menu" class="show-on-large"><i class="material-icons">menu</i></a></li>- <li><a href="#" id="close-menu" class="show-on-large hide"><i class="material-icons">clear</i></a></li>- <li><a href="{% url 'dashboard:index' %}" class="logo">- <img src="{% static "images/dashboard-logo.svg" %}" alt="Saleor">- </a></li>- <li class="search">- {% if SEARCH_IS_ENABLED %}- <form method="get" action="{% url "dashboard:search" %}" class="hide-on-small-only">- <div class="input-field">- <input id="search" type="search" class="validate" placeholder="{% trans "Order, product, customer" context "Dashboard search placeholder" %}" name="q" value="{% if query %}{{ query }}{% endif %}">- <button type="submit" class="right search-icon">- <i class="material-icons">search</i>- </button>- </div>- </form>- {% endif %}- </li>- </ul>- </li>- </ul></div></nav></header>diff --git a/templates/dashboard/category/list.html b/templates/dashboard/category/list.htmlindex 842e1e7a15..1c0e8f670b 100644--- a/templates/dashboard/category/list.html+++ b/templates/dashboard/category/list.html@@ -85,39 +85,37 @@{% 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>+ <ul class="collection list">+ {% if categories %}+ {% for node in categories %}+ <li class="collection-item list-item">+ <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." context "Empty Category list message" %}+ <p class="list-item-desc"><span>+ {% if node.description %}+ {{ node.description }}{% else %}- {% trans "No categories." context "Empty Category list message" %}+ {% endif %}- </p>- {% endif %}- </ul>- </div>- </div>+ </span></p>++ {% if node.hidden %}+ <span class="list-item-icon"><i class="material-icons">visibility_off</i></span>+ {% endif %}+ </li>+ {% endfor %}+ {% else %}+ <li class="collection-item list-item">+ <p class="list-item-name--single">+ {% if root %}+ {% trans "No subcategories." context "Empty Category list message" %}+ {% else %}+ {% trans "No categories." context "Empty Category list message" %}+ {% endif %}+ </p>+ </li>+ {% endif %}+ </ul>{% endblock %}diff --git a/templates/dashboard/category/modal_delete.html b/templates/dashboard/category/modal_delete.htmlindex c6466a71fe..b10b0a30d4 100644--- a/templates/dashboard/category/modal_delete.html+++ b/templates/dashboard/category/modal_delete.html@@ -43,10 +43,10 @@</div><div class="modal-footer">- <button type="submit" class="modal-action btn-flat blue-text">+ <button type="submit" class="modal-action btn-flat">{% trans "Delete" context "Delete category form primary action" %}</button>- <a href="#!" class="modal-action modal-close btn-flat blue-text">+ <a href="#!" class="modal-action modal-close btn-flat">{% trans "Cancel" context "Delete category form secondary action" %}</a></div>diff --git a/templates/dashboard/category/modal_edit.html b/templates/dashboard/category/modal_edit.htmlindex 2895d432b3..2f23ad642a 100644--- a/templates/dashboard/category/modal_edit.html+++ b/templates/dashboard/category/modal_edit.html@@ -21,10 +21,10 @@</div><div class="modal-footer">- <button type="submit" class="modal-action btn-flat blue-text">+ <button type="submit" class="modal-action btn-flat">{% trans "Update" context "Edit category form primary action" %}</button>- <a href="#!" class="modal-action modal-close btn-flat blue-text">+ <a href="#!" class="modal-action modal-close btn-flat">{% trans "Cancel" context "Edit category form secondary action" %}</a></div>diff --git a/templates/dashboard/customer/detail.html b/templates/dashboard/customer/detail.htmlindex 16992e2553..ee5199c146 100644--- a/templates/dashboard/customer/detail.html+++ b/templates/dashboard/customer/detail.html@@ -25,8 +25,6 @@</ul>{% endblock %}-{% block menu_sales_class %} active{% endblock %}-{% block content %}<div class="row"><div class="col s12 l8">@@ -44,9 +42,8 @@<tr><th>{% trans "Number" context "Customer orders table header" %}</th><th>{% trans "Placed on" context "Customer orders table header" %}</th>- <th>{% trans "Payment" context "Customer orders table header" %}</th><th>{% trans "Order status" context "Customer orders table header" %}</th>- <th>{% trans "Total" context "Customer orders table header" %}</th>+ <th class="right-align">{% trans "Total" context "Customer orders table header" %}</th></tr></thead><tbody>@@ -54,9 +51,8 @@<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>+ <td class="right-align">{% gross order.get_total html=True %}</td></tr>{% endfor %}</tbody>diff --git a/templates/dashboard/customer/list.html b/templates/dashboard/customer/list.htmlindex c0b6181a3f..4b4a09d8a8 100644--- a/templates/dashboard/customer/list.html+++ b/templates/dashboard/customer/list.html@@ -16,23 +16,38 @@{% 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="card">+ <form method="get" novalidate>+ <div class="card-content">+ <div class="row">+ <div class="col s12 m3">+ <div class="row">+ {{ form.email|materializecss }}+ </div>+ </div>+ <div class="col s12 m4">+ <div class="row">+ {{ form.name|materializecss }}+ </div>+ </div>+ <div class="col s12 m3">+ <div class="row">+ {{ form.order_status|materializecss:"input-field s12" }}+ </div>+ </div>- <div class="col s5 m3 l3">- <button type="submit" class="btn btn--inline">- {% trans "Filter" context "Customer list form primary action" %}</button>- {% if form.is_bound %}- <a class="btn btn--inline" href="{% url 'dashboard:customers' %}">- {% trans "Clear" context "Customer list form secondary action" %}</a>- {% endif %}+ <div class="col s12 m2">+ <button type="submit" class="btn btn-flat btn--inline">+ {% trans "Filter" context "Customer list form primary action" %}</button>+ {% if form.is_bound %}+ <a class="btn btn--inline" href="{% url 'dashboard:customers' %}">+ {% trans "Clear" context "Customer list form secondary action" %}</a>+ {% endif %}+ </div>+ </div></div>- </div>- </form>-+ </form>+ </div><div class="card"><div class="data-table-header{% if not customers %} data-table-header--no-data{% endif %}">diff --git a/templates/dashboard/discount/sale_form.html b/templates/dashboard/discount/sale_form.htmlindex 3be36424ab..3f8056156c 100644--- a/templates/dashboard/discount/sale_form.html+++ b/templates/dashboard/discount/sale_form.html@@ -46,32 +46,42 @@{% 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="card">+ <form method="post" enctype="multipart/form-data" id="form-sales" novalidate>+ <div class="card-content">+ {% csrf_token %}<div class="row">- {% csrf_token %}{{ form.name|materializecss }}- {{ form.value|materializecss:"s12 m8" }}- {{ form.type|materializecss:"s12 m4" }}+ </div>+ <div class="row">+ <div class="col s12 m8">+ <div class="row">+ {{ form.value|materializecss }}+ </div>+ </div>+ <div class="col s12 m4">+ {{ form.type|materializecss:"input-field s12" }}+ </div>+ </div>+ <div class="row">{{ form.products|materializecss }}+ </div>+ <div class="row">{{ form.categories|materializecss }}</div></div>- </div>- <div class="row">- <div class="col l8 right-align">+ <div class="card-action right-align">{% if sale.pk %}- <button type="submit" class="btn">+ <button type="submit" class="btn btn-flat">{% trans "Update" context "Sale (discount) primary action" %}</button>{% else %}- <button type="submit" class="btn">+ <button type="submit" class="btn btn-flat">{% trans "Create" context "Sale (discount) primary action" %}</button>{% endif %}</div>- </div>- </form>+ </form>+ </div>{% endblock %}diff --git a/templates/dashboard/discount/sale_modal_confirm_delete.html b/templates/dashboard/discount/sale_modal_confirm_delete.htmlindex 8268dd82fa..1b7c067a3c 100644--- a/templates/dashboard/discount/sale_modal_confirm_delete.html+++ b/templates/dashboard/discount/sale_modal_confirm_delete.html@@ -13,9 +13,9 @@</div><div class="modal-footer">- <button type="submit" class="modal-action btn-flat blue-text">+ <button type="submit" class="modal-action btn-flat">{% trans "Delete" context "Delete sale (discount) form primary action" %}</button>- <a href="#!" class="modal-action modal-close btn-flat blue-text">+ <a href="#!" class="modal-action modal-close btn-flat">{% trans "Cancel" context "Delete sale (discount) form secondary action" %}</a></div></form>diff --git a/templates/dashboard/discount/voucher_form.html b/templates/dashboard/discount/voucher_form.htmlindex 7345de47e3..23e3a45caa 100644--- a/templates/dashboard/discount/voucher_form.html+++ b/templates/dashboard/discount/voucher_form.html@@ -45,50 +45,70 @@{% 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="card">+ <form method="post" enctype="multipart/form-data" id="form-vouchers" novalidate>+ <div class="card-content">+ {% 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">- {{ 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" }}+ <div class="col s12 m8">+ <div class="row">+ {{ form.code|materializecss }}+ </div>+ <div class="row">+ {{ form.name|materializecss }}+ </div>+ <div class="row">+ <div class="col s12 m8">+ <div class="row">+ {{ form.discount_value|materializecss }}+ </div>+ </div>+ <div class="col s12 m4">+ <div class="row">+ {{ form.discount_value_type|materializecss:"input-field s12" }}+ </div>+ </div>+ </div>+ <div class="row">+ {{ form.type|materializecss:"input-field s12" }}+ </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:"input-field s12" }}+ {% endfor %}+ </div>{% 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 class="col s12 m4">+ <div class="row">+ {{ form.start_date|materializecss:"input-field s12" }}+ </div>+ <div class="row">+ {{ form.end_date|materializecss:"input-field s12" }}+ </div>+ <div class="row">+ {{ form.usage_limit|materializecss }}+ </div>+ </div></div></div>- </div>- <div class="row">- <div class="col l8 right-align">+ <div class="card-action right-align">{% if voucher.pk %}- <button type="submit" class="btn">{% trans "Update" context "Voucher form primary action" %}</button>+ <button type="submit" class="btn btn-flat">{% trans "Update" context "Voucher form primary action" %}</button>{% else %}- <button type="submit" class="btn">{% trans "Create" context "Voucher form primary action" %}</button>+ <button type="submit" class="btn btn-flat">{% trans "Create" context "Voucher form primary action" %}</button>{% endif %}</div>- </div>- </form>+ </form>+ </div>{% endblock %}diff --git a/templates/dashboard/discount/voucher_list.html b/templates/dashboard/discount/voucher_list.htmlindex 1366c302d2..43cdbf0c93 100644--- a/templates/dashboard/discount/voucher_list.html+++ b/templates/dashboard/discount/voucher_list.html@@ -62,7 +62,7 @@<td>{{ voucher.get_apply_to_display|default_if_none:"-" }}</td><td>{% if voucher.limit %}- {% gross voucher.limit %}+ {% gross voucher.limit html=True %}{% else %}-{% endif %}diff --git a/templates/dashboard/discount/voucher_modal_confirm_delete.html b/templates/dashboard/discount/voucher_modal_confirm_delete.htmlindex dcf8de647d..548e05c52a 100644--- a/templates/dashboard/discount/voucher_modal_confirm_delete.html+++ b/templates/dashboard/discount/voucher_modal_confirm_delete.html@@ -13,9 +13,9 @@</div><div class="modal-footer">- <button type="submit" class="modal-action btn-flat blue-text">+ <button type="submit" class="modal-action btn-flat">{% trans "Delete" context "Delete voucher primary action" %}</button>- <a href="#!" class="modal-action modal-close btn-flat blue-text">+ <a href="#!" class="modal-action modal-close btn-flat">{% trans "Cancel" context "Delete voucher secondary action" %}</a></div></form>diff --git a/templates/dashboard/includes/_orders_table.html b/templates/dashboard/includes/_orders_table.htmlindex 5482240a7b..d2864fd00f 100644--- a/templates/dashboard/includes/_orders_table.html+++ b/templates/dashboard/includes/_orders_table.html@@ -6,12 +6,12 @@<table class="bordered hoverable responsive data-table"><thead><tr>- <th></th>+ <th>#</th><th>{% trans "Order status" context "Orders table header" %}</th><th>{% trans "Payment status" context "Orders table header" %}</th><th>{% trans "Customer" context "Orders table header" %}</th><th>{% trans "Placed on" context "Orders table header" %}</th>- <th>{% trans "Total" context "Orders table header" %}</th>+ <th class="right-align">{% trans "Total" context "Orders table header" %}</th></tr></thead><tbody>@@ -25,7 +25,7 @@{% trans "Guest" context "Customer column anonymous user text" as guest %}<td>{{ order.user|default:guest }}</td><td>{{ order.created }}</td>- <td>{% gross order.get_total %}</td>+ <td class="right-align">{% gross order.get_total html=True %}</td></tr>{% endfor %}</tbody>diff --git a/templates/dashboard/includes/_pagination.html b/templates/dashboard/includes/_pagination.htmlindex 5ba46c3351..ef8a1628dd 100644--- a/templates/dashboard/includes/_pagination.html+++ b/templates/dashboard/includes/_pagination.html@@ -8,7 +8,7 @@<i class="material-icons">chevron_left</i></a>{% else %}- <span><i class="material-icons">chevron_left</i></span>+ <a href="#!"><i class="material-icons">chevron_left</i></a>{% endif %}</li>{% for page in page_obj.paginator.page_range %}@@ -24,7 +24,7 @@<i class="material-icons">chevron_right</i></a>{% else %}- <span><i class="material-icons">chevron_right</i></span>+ <a href="#!"><i class="material-icons">chevron_right</i></a>{% endif %}</li></ul>diff --git a/templates/dashboard/includes/_status_filters.html b/templates/dashboard/includes/_status_filters.htmlindex 689ac79128..af84cd89ac 100644--- a/templates/dashboard/includes/_status_filters.html+++ b/templates/dashboard/includes/_status_filters.html@@ -1,11 +1,19 @@{% 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" context "Status filter action" %}</button>+<div class="card">+ <form method="get" novalidate>+ <div class="card-content">+ <div class="row">+ <div class="col s12 m10">+ <div class="row">+ {{ form|materializecss:"s12" }}+ </div>+ </div>+ <div class="col s12 m2">+ <button type="submit" class="btn btn-flat btn--inline">{% trans "Filter" context "Status filter action" %}</button>+ </div>+ </div></div>- </div>-</form>+ </form>+</div>diff --git a/templates/dashboard/index.html b/templates/dashboard/index.htmlindex 5a31f8daa9..14de168fd4 100644--- a/templates/dashboard/index.html+++ b/templates/dashboard/index.html@@ -14,13 +14,13 @@{% if preauthorized_payments %}<div class="data-table-container">- <table class="bordered hoverable responsive data-table">+ <table class="bordered responsive data-table"><thead><tr>- <th>{% trans "Order number" context "Preauthorized payments table header" %}</th>+ <th>#</th><th>{% trans "Date" context "Preauthorized payments table header" %}</th><th>{% trans "Customer" context "Preauthorized payments table header" %}</th>- <th class="text-right">{% trans "Amount" context "Preauthorized payments table header" %}</th>+ <th class="right-align">{% trans "Amount" context "Preauthorized payments table header" %}</th></tr></thead><tbody>@@ -29,7 +29,7 @@<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>+ <td class="right-align">{% gross payment.get_total_price html=True %}</td></tr>{% endfor %}</tbody>@@ -59,23 +59,40 @@</div><div class="card">- <div class="card-content">- <span class="card-title black-text">{% trans "Products with low stock" context "Dashboard homepage table title" %}</span>+ <div class="data-table-header{% if not preauthorized_payments %} data-table-header--no-data{% endif %}">+ <span class="card-title">{% trans "Products with low stock" context "Dashboard homepage table title" %}</span>+ </div>- {% 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 %}+ {% if low_stock %}+ <div class="data-table-container">+ <table class="bordered responsive data-table">+ <thead>+ <tr>+ <th>{% trans "Product name" context "Low stock product list" %}</th>+ <th class="right-align">{% trans "Stock left" context "Low stock product list" %}</th>+ </tr>+ </thead>+ <tbody>+ {% for product in low_stock %}+ <tr>+ <td>+ <a class="list-item-name list-item-name--single" href="{% url "dashboard:product-update" pk=product.pk %}#stock">+ {{ product }}+ </a>+ </td>+ <td class="right-align">+ {{ product.total_stock }}+ </td>+ </tr>+ {% endfor %}+ </tbody>+ </table>+ </div>+ {% else %}+ <div class="card-content card-content--no-data"><p>{% trans "No products are low in stock." context "Empty low stock table message" %}</p>- {% endif %}- </div>+ </div>+ {% endif %}</div></div></div>diff --git a/templates/dashboard/order/detail.html b/templates/dashboard/order/detail.htmlindex 93058fe675..a04545f6c4 100644--- a/templates/dashboard/order/detail.html+++ b/templates/dashboard/order/detail.html@@ -89,21 +89,21 @@</tr><tr><td>{% trans "Order total" context "Order summary card header" %}</td>- <td class="right-align"><strong>{% gross order.get_total %}</strong></td>+ <td class="right-align"><strong>{% gross order.get_total html=True %}</strong></td></tr><tr><td>{% trans "Preauthorized amount" context "Order summary card header" %}</td><td class="right-align">- {% if preauthorized %}{% gross preauthorized %}+ {% if preauthorized %}{% gross preauthorized html=True %}{% else %}{% trans "N/A" context "Preauthorized amount not available" %}{% endif %}</td></tr><tr><td>{% trans "Captured amount" context "Order summary card header" %}</td>- <td class="right-align">{% gross captured %}</td>+ <td class="right-align">{% gross captured html=True %}</td></tr><tr><td>{% trans "Outstanding balance" context "Order summary card header" %}</td>- <td class="right-align">{% gross balance %}</td>+ <td class="right-align">{% gross balance html=True %}</td></tr></tbody></table>@@ -224,7 +224,7 @@{% endblocktrans %}</td><td class="right-align">- {% gross group.shipping_price %}+ {% gross group.shipping_price html=True %}</td><td class="no-padded"></td></tr>@@ -238,9 +238,9 @@{{ 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">{% gross item.get_price_per_item html=True %}</td><td class="right-align">{{ item.quantity }}</td>- <td class="right-align">{% gross item.get_total %}</td>+ <td class="right-align">{% gross item.get_total html=True %}</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">@@ -301,7 +301,7 @@{% trans "Grand total" context "Order totals header" %}</td><td>- {% gross order.get_total %}+ {% gross order.get_total html=True %}</td><td class="no-padded"></td></tr>@@ -313,14 +313,14 @@{% trans "Subtotal" context "Order totals header" %}</td><td class="right-align">- {% gross order.get_subtotal_without_voucher %}+ {% gross order.get_subtotal_without_voucher html=True %}</td><td class="no-padded"></td></tr><tr><td>{% trans "Shipping" context "Order totals header" %}</td><td class="right-align">- {% gross order.get_total_shipping %}+ {% gross order.get_total_shipping html=True %}</td><td class="no-padded"></td></tr>@@ -332,7 +332,7 @@{% endblocktrans %}</td><td class="right-align">- {% gross order.discount|discount_amount_for:order.total %}+ {% gross order.discount|discount_amount_for:order.total html=True %}</td><td class="no-padded"><a class="dropdown-button" href="#" data-activates="voucher-actions" data-constrainwidth="false">diff --git a/templates/dashboard/order/modal_add_note.html b/templates/dashboard/order/modal_add_note.htmlindex 517e8bc614..eb94f971a9 100644--- a/templates/dashboard/order/modal_add_note.html+++ b/templates/dashboard/order/modal_add_note.html@@ -12,10 +12,10 @@</div><div class="modal-footer">- <button type="submit" class="modal-action btn-flat blue-text btn-">+ <button type="submit" class="modal-action btn-flat">{% trans "Save note" context "Modal add note primary action" %}</button>- <a href="#!" class="modal-action modal-close btn-flat blue-text">+ <a href="#!" class="modal-action modal-close btn-flat">{% trans "Cancel" context "Modal add note secondary action" %}</a></div></form>diff --git a/templates/dashboard/order/modal_address_edit.html b/templates/dashboard/order/modal_address_edit.htmlindex 127e68d526..d5f7b37302 100644--- a/templates/dashboard/order/modal_address_edit.html+++ b/templates/dashboard/order/modal_address_edit.html@@ -17,10 +17,10 @@</div></div><div class="modal-footer">- <button type="submit" class="modal-action btn-flat blue-text">+ <button type="submit" class="modal-action btn-flat">{% trans "Update" context "Modal address primary action" %}</button>- <a href="#!" aria-hidden="true" class="modal-action modal-close btn-flat blue-text">+ <a href="#!" aria-hidden="true" class="modal-action modal-close btn-flat">{% trans "Cancel" context "Modal address secondary action" %}</a></div>diff --git a/templates/dashboard/order/modal_cancel_delivery_group.html b/templates/dashboard/order/modal_cancel_delivery_group.htmlindex 714a9b4c93..dbe6077600 100644--- a/templates/dashboard/order/modal_cancel_delivery_group.html+++ b/templates/dashboard/order/modal_cancel_delivery_group.html@@ -14,9 +14,9 @@</div><div class="modal-footer">- <button type="submit" class="modal-action btn-flat red-text">+ <button type="submit" class="modal-action btn-flat">{% trans "Cancel group" context "Modal cancel delivery group primary action" %}</button>- <a href="#!" aria-hidden="true" class="modal-action modal-close btn-flat blue-text">+ <a href="#!" aria-hidden="true" class="modal-action modal-close btn-flat">{% trans "Cancel" context "Modal cancel delivery group secondary action" %}</a></div></form>diff --git a/templates/dashboard/order/modal_cancel_line.html b/templates/dashboard/order/modal_cancel_line.htmlindex df7eb307cf..7e14429671 100644--- a/templates/dashboard/order/modal_cancel_line.html+++ b/templates/dashboard/order/modal_cancel_line.html@@ -28,18 +28,18 @@{{ 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">{% gross item.get_price_per_item html=True %}</td><td class="right-align">{{ item.quantity }}</td>- <td class="right-align">{% gross item.get_total %}</td>+ <td class="right-align">{% gross item.get_total html=True %}</td></tr></tbody></table></div><div class="modal-footer">- <button type="submit" class="modal-action btn-flat red-text">+ <button type="submit" class="modal-action btn-flat">{% trans "Cancel Line" context "Modal cancel order line primary action" %}</button>- <a href="#!" aria-hidden="true" class="modal-action modal-close btn-flat blue-text">+ <a href="#!" aria-hidden="true" class="modal-action modal-close btn-flat">{% trans "Abort" context "Modal cancel order line secondary action" %}</a></div></form>diff --git a/templates/dashboard/order/modal_cancel_order.html b/templates/dashboard/order/modal_cancel_order.htmlindex 64e9b48e2d..e4c78b63f6 100644--- a/templates/dashboard/order/modal_cancel_order.html+++ b/templates/dashboard/order/modal_cancel_order.html@@ -13,9 +13,9 @@<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">+ <button type="submit" class="modal-action btn-flat">{% trans "Cancel Order" context "Modal cancel order primary action" %}</button>- <a href="#!" aria-hidden="true" class="modal-action modal-close btn-flat blue-text">+ <a href="#!" aria-hidden="true" class="modal-action modal-close btn-flat">{% trans "Abort" context "Modal cancel order secondary action" %}</a></form></div>diff --git a/templates/dashboard/order/modal_capture.html b/templates/dashboard/order/modal_capture.htmlindex fe1692c4cc..59b84a3cc8 100644--- a/templates/dashboard/order/modal_capture.html+++ b/templates/dashboard/order/modal_capture.html@@ -17,17 +17,17 @@<ul class="list"><li class="list-item">{% trans "Order total:" context "Modal capture payment list title" %}- {% gross payment.order.get_total %}</li>+ {% gross payment.order.get_total html=True %}</li><li class="list-item">{% trans "Captured amount:" context "Modal capture payment list title" %}{{ captured|currencyfmt:currency }} </li></ul></div><div class="modal-footer">- <button type="submit" class="modal-action btn-flat blue-text">+ <button type="submit" class="modal-action btn-flat">{% trans "Capture" context "Modal capture payment primary action" %}</button>- <a href="#!" aria-hidden="true" class="modal-action modal-close btn-flat blue-text">+ <a href="#!" aria-hidden="true" class="modal-action modal-close btn-flat">{% trans "Cancel" context "Modal capture payment secondary action" %}</a></div>diff --git a/templates/dashboard/order/modal_change_quantity.html b/templates/dashboard/order/modal_change_quantity.htmlindex de2f4ba9fe..3723a6e5b0 100644--- a/templates/dashboard/order/modal_change_quantity.html+++ b/templates/dashboard/order/modal_change_quantity.html@@ -12,9 +12,9 @@</div><div class="modal-footer">- <button type="submit" class="modal-action btn-flat blue-text">+ <button type="submit" class="modal-action btn-flat">{% trans "Update" context "Modal change quantity primary action" %}</button>- <a href="#!" aria-hidden="true" class="modal-action modal-close btn-flat blue-text">+ <a href="#!" aria-hidden="true" class="modal-action modal-close btn-flat">{% trans "Cancel" context "Modal change quantity secondary action" %}</a></div>diff --git a/templates/dashboard/order/modal_order_remove_voucher.html b/templates/dashboard/order/modal_order_remove_voucher.htmlindex 962bb51d4e..76b38d25ba 100644--- a/templates/dashboard/order/modal_order_remove_voucher.html+++ b/templates/dashboard/order/modal_order_remove_voucher.html@@ -14,9 +14,9 @@<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">+ <button type="submit" class="modal-action btn-flat">{% trans "Remove voucher" context "Modal remove voucher from order primary action" %}</button>- <a href="#!" aria-hidden="true" class="modal-action modal-close btn-flat blue-text">+ <a href="#!" aria-hidden="true" class="modal-action modal-close btn-flat">{% trans "Abort" context "Modal remove voucher from order secondary action" %}</a></form>diff --git a/templates/dashboard/order/modal_refund.html b/templates/dashboard/order/modal_refund.htmlindex 43121285a8..a1f363f672 100644--- a/templates/dashboard/order/modal_refund.html+++ b/templates/dashboard/order/modal_refund.html@@ -17,7 +17,7 @@<ul class="list"><li class="list-item">{% trans "Order total:" context "Modal refund payment list title" %}- {% gross payment.order.get_total %}+ {% gross payment.order.get_total html=True %}</li><li class="list-item">{% trans "Captured amount:" context "Modal refund payment list title" %}{{ captured|currencyfmt:currency }}@@ -26,10 +26,10 @@</div><div class="modal-footer">- <button type="submit" class="modal-action btn-flat blue-text">+ <button type="submit" class="modal-action btn-flat">{% trans "Refund" context "Modal refund payment primary action" %}</button>- <a href="#!" aria-hidden="true" class="modal-action modal-close btn-flat blue-text">+ <a href="#!" aria-hidden="true" class="modal-action modal-close btn-flat">{% trans "Cancel" context "Modal refund payment secondary action" %}</a></div>diff --git a/templates/dashboard/order/modal_release.html b/templates/dashboard/order/modal_release.htmlindex 8816cc771c..7ebd593d74 100644--- a/templates/dashboard/order/modal_release.html+++ b/templates/dashboard/order/modal_release.html@@ -12,10 +12,10 @@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">+ <button type="submit" class="modal-action btn-flat">{% trans "Release" context "Modal release payment primary action" %}</button>- <a href="#!" aria-hidden="true" class="modal-action modal-close btn-flat blue-text">+ <a href="#!" aria-hidden="true" class="modal-action modal-close btn-flat">{% trans "Cancel" context "Modal release payment secondary action" %}</a></form>diff --git a/templates/dashboard/order/modal_ship_delivery_group.html b/templates/dashboard/order/modal_ship_delivery_group.htmlindex c039e7d2fc..a7fc0c640d 100644--- a/templates/dashboard/order/modal_ship_delivery_group.html+++ b/templates/dashboard/order/modal_ship_delivery_group.html@@ -14,10 +14,10 @@</div><div class="modal-footer">- <button type="submit" class="modal-action btn-flat blue-text">+ <button type="submit" class="modal-action btn-flat">{% trans "Ship" context "Modal ship delivery group primary action" %}</button>- <a href="#!" aria-hidden="true" class="modal-action modal-close btn-flat blue-text">+ <a href="#!" aria-hidden="true" class="modal-action modal-close btn-flat">{% trans "Cancel" context "Modal ship delivery group secondary action" %}</a></div>diff --git a/templates/dashboard/order/modal_split_order_line.html b/templates/dashboard/order/modal_split_order_line.htmlindex 71b500d963..e539b9ee09 100644--- a/templates/dashboard/order/modal_split_order_line.html+++ b/templates/dashboard/order/modal_split_order_line.html@@ -13,9 +13,9 @@</div><div class="modal-footer">- <button type="submit" class="modal-action btn-flat blue-text">+ <button type="submit" class="modal-action btn-flat">{% trans "Split" context "Modal split order line primary action" %}</button>- <a href="#!" aria-hidden="true" class="modal-action modal-close btn-flat blue-text">+ <a href="#!" aria-hidden="true" class="modal-action modal-close btn-flat">{% trans "Cancel" context "Modal split order line primary action" %}</a></div>diff --git a/templates/dashboard/payments/detail.html b/templates/dashboard/payments/detail.htmlindex e75231ab9e..57c6b287a8 100644--- a/templates/dashboard/payments/detail.html+++ b/templates/dashboard/payments/detail.html@@ -33,20 +33,18 @@</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"><div class="card-content"><span class="card-title black-text">{% trans "Payment details" context "Payment detail card title" %}</span><ul><li>{% trans "Payment status" context "Payment detail card list item title" %}: {% render_status payment.status payment.get_status_display %}</li><li>{% trans "Fraud status" context "Payment detail card list item title" %}: {% render_status payment.fraud_status payment.get_fraud_status_display %}</li>- <li>{% trans "Amount" context "Payment detail card list item title" %}: {% gross payment.get_total_price %}</li>- <li>{% trans "Captured amount" context "Payment detail card list item title" %}: {% gross payment.get_captured_price %}</li>+ <li>{% trans "Amount" context "Payment detail card list item title" %}: {% gross payment.get_total_price html=True %}</li>+ <li>{% trans "Captured amount" context "Payment detail card list item title" %}: {% gross payment.get_captured_price html=True %}</li><li>{% trans "Gateway" context "Payment detail card list item title" %}: {{ payment.variant }}</li><li>{% trans "Transaction ID" context "Payment detail card list item title" %}: {{ payment.transaction_id }}</li><li>{% trans "Payment date" context "Payment detail card list item title" %}: {{ payment.created }}</li>diff --git a/templates/dashboard/payments/list.html b/templates/dashboard/payments/list.htmlindex db9ca2c784..9d33e95dc4 100644--- a/templates/dashboard/payments/list.html+++ b/templates/dashboard/payments/list.html@@ -50,7 +50,7 @@{% endblocktrans %}</a></td>- <td class="right-align">{% gross payment.get_total_price %}</td>+ <td class="right-align">{% gross payment.get_total_price html=True %}</td><td>{% render_status payment.status payment.get_status_display %}</td></tr>{% endfor %}diff --git a/templates/dashboard/product/attributes/form.html b/templates/dashboard/product/attributes/form.htmlindex 0abf6e8173..47e569d31e 100644--- a/templates/dashboard/product/attributes/form.html+++ b/templates/dashboard/product/attributes/form.html@@ -46,27 +46,31 @@{% 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 s12 l8">+ <div class="card">+ <form method="post" enctype="multipart/form-data" id="form-attributes" novalidate>+ <div class="card-content">+ {% csrf_token %}<div class="row">- {% csrf_token %}{{ form.display|materializecss }}+ </div>+ <div class="row">{{ form.name|materializecss }}</div>- <h5>{% trans "Attribute values" context "Attribute values formset title" %}</h5>+ <h5 class="card-title">{% trans "Attribute values" context "Attribute values formset title" %}</h5>{{ formset.management_form }}{{ formset.non_form_errors.as_ul }}- <table id="formset" class="highlight">+ </div>+ <div class="formset-table-container">+ <table id="formset" class="formset-table">{% for form in formset.forms %}{% if forloop.first %}<thead>- <tr>- {% for field in form.visible_fields %}- <th>{{ field.label|capfirst }}</th>- {% endfor %}- </tr>+ <tr>+ {% for field in form.visible_fields %}+ <th>{{ field.label|capfirst }}</th>+ {% endfor %}+ </tr></thead>{% endif %}<tr>@@ -84,16 +88,14 @@{% endfor %}</table></div>- </div>- <div class="row">- <div class="col s12 l8 right-align">+ <div class="card-action right-align">{% if attribute.pk %}- <button type="submit" class="btn">{% trans "Update" context "Attribute values formset action" %}</button>+ <button type="submit" class="btn btn-flat">{% trans "Update" context "Attribute values formset action" %}</button>{% else %}- <button type="submit" class="btn">{% trans "Create" context "Attribute values formset action" %}</button>+ <button type="submit" class="btn btn-flat">{% trans "Create" context "Attribute values formset action" %}</button>{% endif %}</div>- </div>- </form>+ </form>+ </div>{% endblock %}diff --git a/templates/dashboard/product/attributes/list.html b/templates/dashboard/product/attributes/list.htmlindex 0e88d0d7a1..98e065b4ee 100644--- a/templates/dashboard/product/attributes/list.html+++ b/templates/dashboard/product/attributes/list.html@@ -26,25 +26,21 @@{% block menu_catalogue_class %} active{% endblock %}{% block content %}- <div class="row">- <div class="col s12">- {% if attributes %}- <ul class="collection list list--attributes">- {% for pk, display, values 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=pk %}">{{ display }}</a>-- <p class="list-item-desc">- {% for value in values %}- {{ value }}{% if not forloop.last %}, {% endif %}- {% endfor %}- </p>- </li>- {% endfor %}- </ul>- {% else %}- <p>{% trans "No attributes found." context "Empty attribute list message" %}</p>- {% endif %}- </div>- </div>+ {% if attributes %}+ <ul class="collection list">+ {% for pk, display, values in attributes %}+ <li class="collection-item list-item">+ <a class="list-item-name" href="{% url 'dashboard:product-attribute-update' pk=pk %}">{{ display }}</a>++ <p class="list-item-desc">+ {% for value in values %}+ {{ value }}{% if not forloop.last %}, {% endif %}+ {% endfor %}+ </p>+ </li>+ {% endfor %}+ </ul>+ {% else %}+ <p>{% trans "No attributes found." context "Empty attribute list message" %}</p>+ {% endif %}{% endblock %}diff --git a/templates/dashboard/product/attributes/modal_confirm_delete.html b/templates/dashboard/product/attributes/modal_confirm_delete.htmlindex 5244fe5842..a1fd4115bd 100644--- a/templates/dashboard/product/attributes/modal_confirm_delete.html+++ b/templates/dashboard/product/attributes/modal_confirm_delete.html@@ -13,9 +13,9 @@</div><div class="modal-footer">- <button type="submit" class="modal-action btn-flat blue-text">+ <button type="submit" class="modal-action btn-flat">{% trans "Delete" context "Modal delete attribute primary action" %}</button>- <a href="#!" class="modal-action modal-close btn-flat blue-text">+ <a href="#!" class="modal-action modal-close btn-flat">{% trans "Cancel" context "Modal delete attribute secondary action" %}</a></div></form>diff --git a/templates/dashboard/product/class_list.html b/templates/dashboard/product/class_list.htmlindex a0e39e3218..40bba3e630 100644--- a/templates/dashboard/product/class_list.html+++ b/templates/dashboard/product/class_list.html@@ -39,10 +39,10 @@<a class="title" href="{% url 'dashboard:product-class-update' pk=pk %}"><span class="list-item-name">{{ name }}</span></a>- <p>+ <p class="list-item-desc">{% trans "Variants" context "Product type item list text" %}: {% if has_variants %}{% trans "Yes" %}{% else %}{% trans "No" %}{% endif %}- {% if variant_attributes %} | {% trans "Variant attributes" context "Product type item list text" %}: {{ variant_attributes|join:", " }}{% endif %}- {% if product_attributes %} | {% trans "Product attributes" context "Product type item list text" %}: {{ product_attributes|join:", " }}{% endif %}+ {% if variant_attributes %} · {% trans "Variant attributes" context "Product type item list text" %}: {{ variant_attributes|join:", " }}{% endif %}+ {% if product_attributes %} · {% trans "Product attributes" context "Product type item list text" %}: {{ product_attributes|join:", " }}{% endif %}</p></li>{% endfor %}diff --git a/templates/dashboard/product/list.html b/templates/dashboard/product/list.htmlindex 5916023487..08f93c8167 100644--- a/templates/dashboard/product/list.html+++ b/templates/dashboard/product/list.html@@ -45,7 +45,7 @@<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>+ <p class="list-item-price">{% gross product.price html=True %}</p></li>{% endfor %}</ul>diff --git a/templates/dashboard/product/modal_product_class_confirm_delete.html b/templates/dashboard/product/modal_product_class_confirm_delete.htmlindex 40a14e3866..c342c61385 100644--- a/templates/dashboard/product/modal_product_class_confirm_delete.html+++ b/templates/dashboard/product/modal_product_class_confirm_delete.html@@ -23,7 +23,7 @@</div><div class="modal-footer">- <a href="#!" class="modal-action modal-close btn-flat blue-text">+ <a href="#!" class="modal-action modal-close btn-flat">{% trans "Cancel" context "Modal delete product class with products secondary action" %}</a></div>@@ -44,10 +44,10 @@</div><div class="modal-footer">- <button type="submit" class="modal-action btn-flat blue-text">+ <button type="submit" class="modal-action btn-flat">{% trans "Delete" context "Modal delete product class primary action" %}</button>- <a href="#!" class="modal-action modal-close btn-flat blue-text">+ <a href="#!" class="modal-action modal-close btn-flat">{% trans "Cancel" context "Modal delete product class secondary action" %}</a></div>diff --git a/templates/dashboard/product/modal_product_confirm_delete.html b/templates/dashboard/product/modal_product_confirm_delete.htmlindex 45efd54d9d..bdd3a2ca1a 100644--- a/templates/dashboard/product/modal_product_confirm_delete.html+++ b/templates/dashboard/product/modal_product_confirm_delete.html@@ -29,10 +29,10 @@</div><div class="modal-footer">- <button type="submit" class="modal-action btn-flat blue-text">+ <button type="submit" class="modal-action btn-flat">{% trans "Delete" context "Modal delete product primary action" %}</button>- <a href="#!" class="modal-action modal-close btn-flat blue-text">+ <a href="#!" class="modal-action modal-close btn-flat">{% trans "Cancel" context "Modal delete product secondary action" %}</a></div>diff --git a/templates/dashboard/product/modal_product_image_confirm_delete.html b/templates/dashboard/product/modal_product_image_confirm_delete.htmlindex 82180831a1..956c6045b9 100644--- a/templates/dashboard/product/modal_product_image_confirm_delete.html+++ b/templates/dashboard/product/modal_product_image_confirm_delete.html@@ -23,9 +23,9 @@</div><div class="modal-footer">- <button type="submit" class="modal-action btn-flat blue-text">+ <button type="submit" class="modal-action btn-flat">{% trans "Delete" context "Modal delete image primary action" %}</button>- <a href="#!" class="modal-action modal-close btn-flat blue-text">+ <a href="#!" class="modal-action modal-close btn-flat">{% trans "Cancel" context "Modal delete image secondary action" %}</a></div></form>diff --git a/templates/dashboard/product/product_class_form.html b/templates/dashboard/product/product_class_form.htmlindex d96df5b994..109798696d 100644--- a/templates/dashboard/product/product_class_form.html+++ b/templates/dashboard/product/product_class_form.html@@ -47,17 +47,40 @@{% endblock %}{% block content %}- <div class="row tab-content" id="details">+ <div class="card"><form method="post" id="form-product" enctype="multipart/form-data" novalidate>- {% csrf_token %}- {{ form.name|materializecss:"s12" }}- {{ form.is_shipping_required|materializecss:"input-field s2" }}- {{ form.product_attributes|materializecss:"input-field s10" }}- {{ form.has_variants|materializecss:"input-field s2" }}- {{ form.variant_attributes|materializecss:"input-field s10" }}- <div class="col s12 right-align">+ <div class="card-content">+ {% csrf_token %}<div class="row">- <button type="submit" class="btn">+ {{ form.name|materializecss }}+ </div>+ <div class="row">+ <div class="col s12 m8">+ <div class="row">+ {{ form.product_attributes|materializecss:"input-field s12" }}+ </div>+ <div class="row">+ {{ form.variant_attributes|materializecss:"input-field s12" }}+ </div>+ </div>+ <div class="col s12 m4">+ <div class="row">+ {{ form.is_shipping_required|materializecss }}+ </div>+ <div class="row">+ {{ form.has_variants|materializecss }}+ </div>+ <p class="grey-text">+ {% blocktrans trimmed context "Product class help text" %}+ Product Type is a template used for creating new products.+ It also controls which attributes can be used during product creation process.+ {% endblocktrans %}+ </p>+ </div>+ </div>+ </div>+ <div class="card-action right-align">+ <button type="submit" class="btn btn-flat">{% if product_class.pk %}{% trans "Update" context "Product class primary action" %}{% else %}@@ -67,11 +90,5 @@</div></div></form>- <p>- {% blocktrans trimmed context "Product class help text" %}- Product Type is a template used for creating new products.- It also controls which attributes can be used during product creation process.- {% endblocktrans %}- </p></div>{% endblock %}diff --git a/templates/dashboard/product/product_confirm_delete.html b/templates/dashboard/product/product_confirm_delete.htmlindex 08c77d474d..4115081286 100644--- a/templates/dashboard/product/product_confirm_delete.html+++ b/templates/dashboard/product/product_confirm_delete.html@@ -48,7 +48,7 @@</div><div class="card-action">- <button type="submit" class="card-link blue-text">{% trans "Delete" context "Product delete primary action" %}</button>+ <button type="submit" class="card-link">{% trans "Delete" context "Product delete primary action" %}</button></div></div></div>diff --git a/templates/dashboard/product/product_form.html b/templates/dashboard/product/product_form.htmlindex c5ca3632f7..2ea0e9a529 100644--- a/templates/dashboard/product/product_form.html+++ b/templates/dashboard/product/product_form.html@@ -92,50 +92,59 @@</div>{% endif %}- <div class="row tab-content" id="details">- <div class="col s12 l8">- <label>{% trans "Product type" context "Product form details tab label" %}</label>- <h5>- {{ product.product_class }}- </h5>- </div>+ <div class="tab-content card" 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="card-content">+ <h5 class="card-title">+ {{ product.product_class }}+ </h5><div class="row">- {% for attribute_field in product_form.iter_attribute_fields %}- {{ attribute_field|materializecss }}- {% endfor %}- {{ product_form.description|materializecss }}- </div>- </div>+ <div class="col s12 l8" >+ <div class="row">+ {{ product_form.name|materializecss }}+ </div>+ {% for attribute_field in product_form.iter_attribute_fields %}+ <div class="row">+ {{ attribute_field|materializecss:"input-field s12" }}+ </div>+ {% endfor %}+ <div class="row">+ {{ product_form.description|materializecss }}+ </div>+ </div>- <div class="col s12 l4">- <div class="row">- {% if not product.product_class.has_variants %}- {{ variant_form.sku|materializecss:"input-field s12" }}- {% endif %}- {{ product_form.categories|materializecss:"input-field s12" }}- {{ product_form.available_on|materializecss:"input-field s12" }}- {{ product_form.is_featured|materializecss:"input-field s12" }}+ <div class="col s12 l4">+ <div class="row">+ {{ product_form.price|materializecss }}+ </div>+ {% if not product.product_class.has_variants %}+ <div class="row">+ {{ variant_form.sku|materializecss }}+ </div>+ {% endif %}+ <div class="row">+ {{ product_form.categories|materializecss:"input-field s12" }}+ </div>+ <div class="row">+ {{ product_form.available_on|materializecss:"input-field s12" }}+ </div>+ <div class="row">+ {{ product_form.is_featured|materializecss }}+ </div>+ </div></div></div>-- <div class="col s12 right-align">- <div class="row">- {% if product.pk %}- <button type="submit" class="btn">- {% trans "Update" context "Product form details tab action" %}- </button>- {% else %}- <button type="submit" class="btn">- {% trans "Create" context "Product form details tab action" %}- </button>- {% endif %}- </div>+ <div class="card-action right-align">+ {% if product.pk %}+ <button type="submit" class="btn btn-flat">+ {% trans "Update" context "Product form details tab action" %}+ </button>+ {% else %}+ <button type="submit" class="btn btn-flat">+ {% trans "Create" context "Product form details tab action" %}+ </button>+ {% endif %}</div></form></div>@@ -145,12 +154,12 @@<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">+ <div class="data-table-actions">+ <a href="{% url 'dashboard:variant-add' product_pk=product.pk %}" class="btn-data-table btn-show-when-unchecked btn-flat">{% trans "Add" context "Product form variants tab table action" %}</a>- <a href="#modal-product-variant-delete" class="modal-trigger btn-data-table btn-show-when-checked blue-text" hidden>+ <a href="#modal-product-variant-delete" class="modal-trigger btn-data-table btn-show-when-checked btn-flat" hidden>{% trans "Delete" context "Product form variants tab table action" %}</a>@@ -163,9 +172,9 @@</div><div class="modal-footer">- <button type="submit" class="modal-action btn-flat blue-text">+ <button type="submit" class="modal-action btn-flat">{% trans "Delete" context "Modal delete variant from product primary action" %}</button>- <a href="#!" class="modal-action modal-close btn-flat blue-text">+ <a href="#!" class="modal-action modal-close btn-flat">{% trans "Cancel" context "Modal delete variant from product secondary action" %}</a></div></div>@@ -207,7 +216,7 @@</td>{% endfor %}<td>{{ variant.name }}</td>- <td class="right-align">{% gross variant.get_price_per_item %}</td>+ <td class="right-align">{% gross variant.get_price_per_item html=True %}</td></tr>{% endfor %}</tbody>@@ -232,12 +241,12 @@<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">+ <div class="data-table-actions">+ <a href="{% url 'dashboard:product-stock-add' product_pk=product.pk %}" class="btn-data-table btn-show-when-unchecked btn-flat">{% trans "Add" context "Product form stock tab table action" %}</a>- <a href="#modal-product-stock-delete" class="modal-trigger btn-data-table btn-show-when-checked blue-text" hidden>+ <a href="#modal-product-stock-delete" class="modal-trigger btn-data-table btn-show-when-checked btn-flat" hidden>{% trans "Delete" context "Product form stock tab table action" %}</a>@@ -253,9 +262,9 @@</div><div class="modal-footer">- <button type="submit" class="modal-action btn-flat blue-text">+ <button type="submit" class="modal-action btn-flat">{% trans "Delete" context "Modal delete stock from variant primary action" %}</button>- <a href="#!" class="modal-action modal-close btn-flat blue-text">+ <a href="#!" class="modal-action modal-close btn-flat">{% trans "Cancel" context "Modal delete stock from variant secondary action" %}</a></div></div>@@ -311,96 +320,96 @@</div><div id="images" class="tab-content">+ <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"><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">- <div class="row ">- <ul class="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" context "Image card text" %}</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" context "Image card action" %}- </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" context "Image card action" %}- </a>- </div>- <div class="sortable__drag-area"></div>- </li>- {% endfor %}- {% else %}- <p class="no-images">{% trans "This product has no images yet." context "Empty image gallery message" %}</p>- {% endif %}-- </ul>- <div 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" context "Image gallery upload box text" %}- </span>- </span>+ {% if images %}+ <ul class="product-gallery" id="product-gallery" data-post-url="{% url 'dashboard:product-images-reorder' product_pk=product.pk %}">+ {% for image in images %}+ <li class="col s6 m3 product-gallery-item" data-id="{{ image.pk }}">+ <div class="row">+ <div class="card">+ <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" context "Image card text" %}</span>+ {% endif %}+ </span>+ </div>++ <div class="sortable__drag-area"></div>++ <div class="card-action">+ <a href="{% url 'dashboard:product-image-update' product_pk=product.pk img_pk=image.pk %}">+ {% trans "Edit" context "Image card action" %}+ </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" context "Image card action" %}+ </a>+ </div>+ </div></div>- </div>+ </li>+ {% endfor %}+ </ul>+ {% else %}+ <p class="no-images">{% trans "This product has no images yet." context "Empty image gallery message" %}</p>+ {% endif %}++ <div class="col s6 m3 product-gallery-item dropzone-ghost">+ <div class="card">+ <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" context "Image gallery upload box text" %}+ </span>+ </span></div>- </form>+ </div></div></div>+ </form><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>+ <li class="col s6 m3 product-gallery-item dz-preview dz-file-preview" data-id="{{ image.pk }}">+ <div class="card">+ <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="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" context "Empty image gallery message" %}</span>- </span>- <span class="product-gallery-item-desc">- - </span>- </div>+ <div class="card-content">+ <span class="product-gallery-item-title card-title black-text">+ <span class="grey-text">{% trans "No description" context "Empty image gallery message" %}</span>+ </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" context "Image card action" %}- </a>+ <div class="sortable__drag-area"></div>- <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" context "Image card action" %}- </a>+ <div class="card-action">+ <a class="card-action-edit" href="{% url 'dashboard:product-image-update' product_pk=product.pk img_pk=0 %}">+ {% trans "Edit" context "Image card action" %}+ </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" context "Image card action" %}+ </a>+ </div></div>- <div class="sortable__drag-area"></div></li></script></div>diff --git a/templates/dashboard/product/product_image_form.html b/templates/dashboard/product/product_image_form.htmlindex 29b72b49ce..b095179e6d 100644--- a/templates/dashboard/product/product_image_form.html+++ b/templates/dashboard/product/product_image_form.html@@ -25,7 +25,7 @@<li><a href="{% url "dashboard:product-update" pk=product.pk %}#images" class="breadcrumbs--ellipsed-item">{{ product }}</a></li><li class="back-mobile"><a href="{% url "dashboard:product-update" pk=product.pk %}#images" class="breadcrumb"><i class="material-icons">arrow_back</i></a></li>{% if product_image.pk %}- <li><span class="breadcrumbs--ellipsed-item">{{ product_image.image }}</span></li>+ <li><span class="breadcrumbs--ellipsed-item">{{ product_image.alt|default:_("No description") }}</span></li>{% else %}<li><span class="hide-on-med-and-down">@@ -43,35 +43,42 @@{% block menu_catalogue_class %} active{% endblock %}{% block content %}- <form method="post" enctype="multipart/form-data">- <div class="row">- <div class="col l8">+ <div class="card">+ <form method="post" enctype="multipart/form-data">+ <div class="card-content">{% csrf_token %}-- {% if product_image.pk %}- <p class="no-margin">- {% trans "Pick the most relevant part of the image using the red circle." context "Image form text" %}- </p>- {% endif %}+ <input type="hidden" name="success_url" value="{% url 'dashboard:product-update' pk=product.pk %}#images">+ <div class="row">+ <div class="col s12 m8">+ <div class="row">+ {{ form.image|materializecss }}+ </div>+ {% if product_image.pk %}+ <p class="no-margin">+ {% trans "Pick the most relevant part of the image using the red circle." context "Image form text" %}+ </p>+ {% endif %}+ </div>+ <div class="col s12 m4">+ {% if show_variants %}+ <div class="row">+ {{ form.variants|materializecss }}+ </div>+ {% endif %}+ </div>+ </div><div class="row">- {{ form.image|materializecss }}{{ form.alt|materializecss }}- {% if show_variants %}- {{ form.variants|materializecss }}- {% endif %}- <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">+ <div class="card-action right-align">{% if product_image.pk %}- <button type="submit" class="btn">{% trans "Update" context "Image form primary action" %}</button>+ <button type="submit" class="btn btn-flat">{% trans "Update" context "Image form primary action" %}</button>{% else %}- <button type="submit" class="btn">{% trans "Create" context "Image form secondary action" %}</button>+ <button type="submit" class="btn btn-flat">{% trans "Create" context "Image form secondary action" %}</button>{% endif %}</div>- </div>- </form>+ </form>+ </div>{% endblock %}diff --git a/templates/dashboard/product/product_variant_confirm_delete.html b/templates/dashboard/product/product_variant_confirm_delete.htmlindex 1cf625e959..c54323ce1b 100644--- a/templates/dashboard/product/product_variant_confirm_delete.html+++ b/templates/dashboard/product/product_variant_confirm_delete.html@@ -51,7 +51,7 @@</div><div class="card-action">- <button type="submit" class="card-link blue-text">+ <button type="submit" class="card-link btn btn-flat">{% trans "Delete" context "Delete variant action" %}</button></div>diff --git a/templates/dashboard/product/stock_confirm_delete.html b/templates/dashboard/product/stock_confirm_delete.htmlindex 9bdf540840..f937eabc99 100644--- a/templates/dashboard/product/stock_confirm_delete.html+++ b/templates/dashboard/product/stock_confirm_delete.html@@ -44,7 +44,7 @@</div><div class="card-action">- <button type="submit" class="card-link blue-text">+ <button type="submit" class="card-link btn btn-flat">{% trans "Delete" context "Delete stock action" %}</button></div>diff --git a/templates/dashboard/product/stock_form.html b/templates/dashboard/product/stock_form.htmlindex f9a69c6a7e..7a85603b20 100644--- a/templates/dashboard/product/stock_form.html+++ b/templates/dashboard/product/stock_form.html@@ -24,9 +24,11 @@{% block breadcrumbs %}<ul class="breadcrumbs breadcrumbs--history">- <li><a href="{% url "dashboard:product-list" %}" class="breadcrumbs--ellipsed-item"><i class="material-icons">first_page</i></a></li>- <li><a href="{% url "dashboard:product-update" pk=product.pk %}#stock" class="breadcrumbs--ellipsed-item">{{ product }}</a></li>+ <li><a href="{% url "dashboard:product-list" %}" class="breadcrumb">+ {% trans "Products" context "Stock form breadcrumbs" %}+ </a></li><li class="back-mobile"><a href="{% url "dashboard:product-update" pk=product.pk %}#stock"><i class="material-icons">chevron_left</i></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">{% blocktrans trimmed with variant=stock.variant context "Stock form breadcrumbs" %}@@ -51,31 +53,42 @@{% 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="card">+ <form method="post" id="form-stock" enctype="multipart/form-data">+ <div class="card-content">+ {% csrf_token %}+ <input type="hidden" name="success_url" value="{% url 'dashboard:product-update' pk=product.pk %}#stock">+ <div class="row">+ <div class="col s12 m8">+ <div class="row">+ {{ form.variant|materializecss:"input-field s12" }}+ </div>+ <div class="row">+ {{ form.location|materializecss:"input-field s12" }}+ </div>+ </div>+ <div class="col s12 m4">+ <div class="row">+ {{ form.quantity|materializecss }}+ </div>+ <div class="row">+ {{ form.cost_price|materializecss }}+ </div>+ </div>+ </div>+ </div>- <div class="row">- <div class="col s12 l8 right-align">+ <div class="card-action right-align">{% if stock.pk %}- <button type="submit" class="btn">+ <button type="submit" class="btn btn-flat">{% trans "Update" context "Stock form action" %}</button>{% else %}- <button type="submit" class="btn">+ <button type="submit" class="btn btn-flat">{% trans "Create" context "Stock form action" %}</button>{% endif %}</div>- </div>- </form>+ </form>+ </div>{% endblock %}diff --git a/templates/dashboard/product/stock_locations/form.html b/templates/dashboard/product/stock_locations/form.htmlindex 57ff1a2ad9..231c4d0034 100644--- a/templates/dashboard/product/stock_locations/form.html+++ b/templates/dashboard/product/stock_locations/form.html@@ -40,28 +40,26 @@{% block content %}- <div class="row tab-content" id="details">+ <div class="card"><form method="post" id="form-product" novalidate>- {% csrf_token %}+ <div class="card-content">+ {% csrf_token %}- <div class="col s12 l4"><div class="row">- {{ form.name|materializecss:"input-field s12" }}+ {{ form.name|materializecss }}</div></div>- <div class="col s12 right-align">- <div class="row">- {% if location.pk %}- <button type="submit" class="btn">- {% trans "Update" context "Stock location detail action" %}- </button>- {% else %}- <button type="submit" class="btn">- {% trans "Create" context "Stock location detail action" %}- </button>- {% endif %}- </div>+ <div class="card-action right-align">+ {% if location.pk %}+ <button type="submit" class="btn btn-flat">+ {% trans "Update" context "Stock location detail action" %}+ </button>+ {% else %}+ <button type="submit" class="btn btn-flat">+ {% trans "Create" context "Stock location detail action" %}+ </button>+ {% endif %}</div></form></div>diff --git a/templates/dashboard/product/stock_locations/list.html b/templates/dashboard/product/stock_locations/list.htmlindex fcc33e8e8b..20b93c6b76 100644--- a/templates/dashboard/product/stock_locations/list.html+++ b/templates/dashboard/product/stock_locations/list.html@@ -33,9 +33,11 @@<ul class="collection list">{% for location in locations %}<li class="collection-item list-item">- <a class="list-item-name" href="{% url 'dashboard:product-stock-location-edit' location.pk %}">- {{ location }}- </a>+ <p class="list-item-name--single">+ <a href="{% url 'dashboard:product-stock-location-edit' location.pk %}">+ {{ location }}+ </a>+ </p></li>{% endfor %}</ul>diff --git a/templates/dashboard/product/stock_locations/modal_confirm_delete.html b/templates/dashboard/product/stock_locations/modal_confirm_delete.htmlindex 59273bd788..e341e1697b 100644--- a/templates/dashboard/product/stock_locations/modal_confirm_delete.html+++ b/templates/dashboard/product/stock_locations/modal_confirm_delete.html@@ -23,9 +23,9 @@</div><div class="modal-footer">- <button type="submit" class="modal-action btn-flat blue-text">+ <button type="submit" class="modal-action btn-flat">{% trans "Delete" context "Modal delete stock location primary action" %}</button>- <a href="#!" class="modal-action modal-close btn-flat blue-text">+ <a href="#!" class="modal-action modal-close btn-flat">{% trans "Cancel" context "Modal delete stock location secondary action" %}</a></div>diff --git a/templates/dashboard/product/variant_form.html b/templates/dashboard/product/variant_form.htmlindex dee910508d..4e722b542f 100644--- a/templates/dashboard/product/variant_form.html+++ b/templates/dashboard/product/variant_form.html@@ -19,15 +19,14 @@{% block breadcrumbs %}<ul class="breadcrumbs breadcrumbs--history">- <li><a href="{% url "dashboard:product-list" %}"><i class="material-icons">first_page</i></a></li>- <li><a href="{% url "dashboard:product-update" pk=product.pk %}#variants" class="breadcrumbs--ellipsed-item">{{ product }}</a></li>+ <li><a href="{% url "dashboard:product-list" %}" class="breadcrumb">+ {% trans "Products" context "Variant form breadcrumbs" %}+ </a></li><li class="back-mobile"><a href="{% url "dashboard:product-update" pk=product.pk %}#variants"><i class="material-icons">chevron_left</i></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">- {% blocktrans trimmed with variant_sku=variant.sku context "Variant form breadcrumbs" %}- Variant {{ variant_sku }}- {% endblocktrans %}- {% if variant.name %} ({{ variant.name }}){% endif %}+ {{ variant }}</span></li>{% else %}<li>@@ -47,43 +46,49 @@{% 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 class="card">+ <form method="post" id="form-variant" enctype="multipart/form-data">+ <div class="card-content">+ {% csrf_token %}+ <input type="hidden" name="success_url" value="{% url 'dashboard:product-update' pk=product.pk %}#variants">+ <div class="row">+ <div class="col s12 m8">+ <div class="row">+ {{ form.name|materializecss }}+ </div>+ {% if attribute_form.fields %}+ {% for attribute_field in attribute_form %}+ <div class="row">+ {{ attribute_field|materializecss:"input-field s12" }}+ </div>+ {% endfor %}+ {% else %}+ <p>{% trans "This product has no attributes." context "Variant form text" %}</p>+ {% endif %}</div>- {% else %}- <p>{% trans "This product has no attributes." context "Variant form text" %}</p>- {% endif %}- </div>- <div class="col s12 m6 l4">- <div class="row">- {{ form.sku|materializecss }}- {{ form.price_override|materializecss }}- {{ form.name|materializecss }}+ <div class="col s12 m4">+ <div class="row">+ {{ form.sku|materializecss }}+ </div>+ <div class="row">+ {{ form.price_override|materializecss }}+ </div>+ </div></div></div>- </div>- <div class="row">- <div class="col s12 l8 right-align">+ <div class="card-action right-align">{% if variant.pk %}- <button type="submit" class="btn">+ <button type="submit" class="btn btn-flat">{% trans "Update" context "Variant form action" %}</button>{% else %}- <button type="submit" class="btn">+ <button type="submit" class="btn btn-flat">{% trans "Create" context "Variant form action" %}</button>{% endif %}</div>- </div>- </form>+ </form>+ </div>{% endblock %}diff --git a/templates/dashboard/search/results.html b/templates/dashboard/search/results.htmlindex 2c62601730..feebfd1df7 100644--- a/templates/dashboard/search/results.html+++ b/templates/dashboard/search/results.html@@ -45,7 +45,7 @@<span class="list-item-name">{{ product.name }}</span></a><p class="list-item-price">- <small>{% gross product.price %}</small>+ <small>{% gross product.price html=True %}</small></p>{% endwith %}{% elif result.content_type == 'order_order' %}diff --git a/templates/dashboard/shipping/method_form.html b/templates/dashboard/shipping/method_form.htmlindex a689aeaa8f..e4fec902de 100644--- a/templates/dashboard/shipping/method_form.html+++ b/templates/dashboard/shipping/method_form.html@@ -43,51 +43,62 @@{% 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" context "Shipping method form text" %}</h4>-- <div class="card-panel">- {% for form in price_per_country_formset %}+ <div class="card">+ <form method="post" id="form-method">+ <div class="card-content">+ {% csrf_token %}+ {{ price_per_country_formset.management_form }}<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" }}+ {{ shipping_method_form|materializecss }}</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>-+ <h class="card-title">{% trans "Price per country" context "Shipping method form text" %}</h5>+ </div>+ <div class="formset-table-container">+ <table class="formset-table">+ <thead>+ <tr>+ <th>{% trans "Country" context "Shipping method country list" %}</th>+ <th>{% trans "Price" context "Shipping method country list" %}</th>+ <th>{% trans "Delete" context "Shipping method country list" %}</th>+ </tr>+ </thead>+ <tbody>+ {% for form in price_per_country_formset %}+ <tr>+ <td>+ {% for hidden in form.hidden_fields %}+ {{ hidden }}+ {% endfor %}+ {{ form.country_code|materializecss:"input-field s12" }}+ </td>+ <td>+ {{ form.price|materializecss }}+ </td>+ <td>+ {{ form.DELETE|materializecss }}+ </td>+ </trv>+ {% if form.non_field_errors %}+ {% for error in form.non_field_errors %}+ <p class="help-block materialize-red-text">{{ error }}</p>+ {% endfor %}+ {% endif %}+ {% endfor %}+ </tbody>+ </table>+ </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" context "Shipping method form action" %}</a>- </div>- <div class="col s12 l6 right-align">- <a href="{% url 'dashboard:shipping-methods' %}"- class="btn-flat">{% trans "Cancel" context "Shipping method form action" %}</a>- <button type="submit" class="btn">{% trans "Update" context "Shipping method form action" %}- </button>- </div>- {% else %}- <div class="col s12 right-align">- <a href="{% url 'dashboard:shipping-methods' %}"- class="btn-flat">{% trans "Cancel" context "Shipping method form action" %}</a>- <button type="submit" class="btn">{% trans "Create" context "Shipping method form action" %}- </button>- </div>- {% endif %}- </div>- </form>+ <div class="card-action right-align">+ {% if shipping_method.pk %}+ <a href="{% url 'dashboard:shipping-method-delete' pk=shipping_method.pk %}" class="btn btn-flat">{% trans "Delete" context "Shipping method form action" %}</a>+ <a href="{% url 'dashboard:shipping-methods' %}" class="btn btn-flat">{% trans "Cancel" context "Shipping method form action" %}</a>+ <button type="submit" class="btn btn-flat">{% trans "Update" context "Shipping method form action" %}</button>+ {% else %}+ <a href="{% url 'dashboard:shipping-methods' %}" class="btn btn-flat">{% trans "Cancel" context "Shipping method form action" %}</a>+ <button type="submit" class="btn btn-flat">{% trans "Create" context "Shipping method form action" %}</button>+ </div>+ {% endif %}+ </div>+ </form>+ </div>{% endblock %}diff --git a/templates/dashboard/shipping/method_list.html b/templates/dashboard/shipping/method_list.htmlindex b717e22888..3f07118bb6 100644--- a/templates/dashboard/shipping/method_list.html+++ b/templates/dashboard/shipping/method_list.html@@ -47,10 +47,9 @@{% if not method.price_range %}-{% elif method.price_range.min_price == method.price_range.max_price %}- {% gross method.price_range.min_price %}+ {% gross method.price_range.min_price html=True %}{% else %}- {% gross method.price_range.min_price %} -- {% gross method.price_range.max_price %}+ {% gross method.price_range.min_price html=True %}–{% gross method.price_range.max_price html=True %}{% endif %}</td><td>{{ method.countries|join:", " }}</td>diff --git a/templates/dashboard/sites/detail.html b/templates/dashboard/sites/detail.htmlindex a7a019924c..3adf685a5d 100644--- a/templates/dashboard/sites/detail.html+++ b/templates/dashboard/sites/detail.html@@ -21,23 +21,27 @@{% 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="card">+ <form method="post" id="form-category" enctype="multipart/form-data" novalidate>+ <div class="card-content">+ {% csrf_token %}<div class="row">{{ form.name|materializecss }}+ </div>+ <div class="row">{{ form.domain|materializecss }}+ </div>+ <div class="row">{{ form.header_text|materializecss }}+ </div>+ <div class="row">{{ form.description|materializecss }}</div></div>- </div>- <div class="row">- <div class="col s12 l8 right-align">- <button type="submit" class="btn">{% trans "Update" context "Site settings action" %}</button>+ <div class="card-action right-align">+ <button type="submit" class="btn btn-flat">{% trans "Update" context "Site settings action" %}</button></div>- </div>- </form>+ </form>+ </div>{% endblock %}diff --git a/templates/order/order-details.html b/templates/order/order-details.htmlindex 5df9b0c024..cebf3a7c25 100644--- a/templates/order/order-details.html+++ b/templates/order/order-details.html@@ -52,7 +52,7 @@<p class="float-right">x {{ item_line.quantity }}</p></div><div class="col-md-6 col-12">- <p class="float-right">{% gross item_line.get_total %}</p>+ <p class="float-right">{% gross item_line.get_total html=True %}</p></div></div></div>@@ -67,7 +67,7 @@{% endif %}</div><div class="col-4">- <p class="float-right">{% gross item.shipping_price %}</p>+ <p class="float-right">{% gross item.shipping_price html=True %}</p></div></div>{% endif %}@@ -89,7 +89,7 @@</div></div><div class="col-4">- <p class="float-right"><strong>{% gross order.total %}</strong></p>+ <p class="float-right"><strong>{% gross order.total html=True %}</strong></p></div></div></div>diff --git a/templates/prices/widget.html b/templates/prices/widget.htmlindex 923e40bae7..356dcfb3c7 100644--- a/templates/prices/widget.html+++ b/templates/prices/widget.html@@ -1,2 +1,4 @@-<div class="input-with-suffix">{{ widget }}</div>-<div class="input-text-suffix">{{ currency }}</div>+<div class="input-with-suffix">+ {{ widget }}+ <div class="input-text-suffix">{{ currency }}</div>+</div>diff --git a/templates/userprofile/details.html b/templates/userprofile/details.htmlindex 0544edc18e..81e86cacf5 100644--- a/templates/userprofile/details.html+++ b/templates/userprofile/details.html@@ -55,7 +55,7 @@{{ order.created }}</div><div class="col-md-2 col-6">- <span class="float-md-right">{% gross order.get_total %}</span>+ <span class="float-md-right">{% gross order.get_total html=True %}</span></div><div class="col-md-4 hidden-sm-down">{% render_status order.status order.get_status_display %}@@ -85,7 +85,7 @@</div><div class="tab-pane" id="addresses" role="tabpanel"><div class="card-deck-wrapper userprofile__addresses">- <div class="row card-deck">+ <div class="row card-deck">{% for address in addresses %}<div class="col-md-6"><div class="card card-block">@@ -102,7 +102,7 @@{% if addresses|length == 0 %}<h3 class="text-sm-center">{% trans "You will see new addresses here after first successful checkout." %}</h3>{% endif %}-+</div></div></div>diff --git a/templates/weight_field_widget.html b/templates/weight_field_widget.htmlindex eb9793cf8b..9ff3227215 100644--- a/templates/weight_field_widget.html+++ b/templates/weight_field_widget.html@@ -1,2 +1,4 @@-<div class="input-with-suffix">{{ widget }}</div>-<div class="input-text-suffix">{{ unit }}</div>\ No newline at end of file+<div class="input-with-suffix">+ {{ widget }}+ <div class="input-text-suffix">{{ unit }}</div>+</div>