Skip to content

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

Implement side navigation, reorganize header bar

weronka18c645895998
diff --git a/saleor/static/img/dashboard-logo.svg b/saleor/static/img/dashboard-logo.svg
index e19f3e0991..8b1917254c 100644
--- a/saleor/static/img/dashboard-logo.svg
+++ b/saleor/static/img/dashboard-logo.svg
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.0" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
- viewBox="0 0 282.3 60.9" enable-background="new 0 0 282.3 60.9" xml:space="preserve">
-<path id="XMLID_124_" d="M267.7,37.7c6.1-2.8,10-9.2,10-16.7c0-5.7-2-10.1-6.2-14.1c-4.1-4-9.1-5.7-14.9-5.7h-27.2v15.9
+ viewBox="0 0 282.3 60.9" enable-background="new 0 0 282.3 60.9" height="30" xml:space="preserve">
+<path id="XMLID_124_" fill="white" stroke="white" d="M267.7,37.7c6.1-2.8,10-9.2,10-16.7c0-5.7-2-10.1-6.2-14.1c-4.1-4-9.1-5.7-14.9-5.7h-27.2v15.9
c-1-2.9-3.5-5.7-6.1-8.2C217,3,209.5,0,200.4,0s-16.5,3-22.9,8.9c-1.2,1.1-2.1,2.3-3.1,3.5V1.2h-43v44h-19v-44h-16v47.2L77.3,1.2
H62.6L48.4,35.8c-1.8-4.7-6-8.2-13.2-10.8c-3.7-1.4-8.4-2.8-10.4-3.2c-1-0.3-2-0.6-3-1c-1.8-0.8-2.4-1.7-2.4-3.4
c0-2.1,2.3-3.6,6.4-3.6c4.5,0,8,1.5,10.6,4.6l10.6-9C42.3,3.1,35,0,25.3,0c-5.8,0-10.8,1.5-14.9,4.6c-4.1,3.1-6.2,7.4-6.2,13
diff --git a/saleor/static/js/dashboard.js b/saleor/static/js/dashboard.js
index bf0dc1ca7f..8ed9f2795a 100644
--- a/saleor/static/js/dashboard.js
+++ b/saleor/static/js/dashboard.js
@@ -25,8 +25,43 @@ function openModal() {
}
$(document).ready(function() {
+ function openMenu(a) {
+ $('#main-nav').animate({
+ 'left': '250px'
+ },a)
+ if ($(window).width() < 1650 && $(window).width() > 991) {
+ $('main .container, .subheader .nav-wrapper').animate({
+ 'marginLeft': '250px'
+ },a)
+ }
+ $('#open-menu').addClass('hide');
+ $('#close-menu').removeClass('hide');
+ $('.menu-toggle').addClass('fixed');
+ $.cookie('openmenu', true);
+ }
+ $('#open-menu').click(function() {
+ openMenu(400)
+ })
+ $('#close-menu').click(function() {
+ $('#main-nav').animate({
+ 'left': '0'
+ })
+ if($(window).width() < 1650) {
+ $('main .container, .subheader .nav-wrapper').css({
+ 'margin-left': 'auto'
+ })
+ }
+ $('#close-menu').addClass('hide');
+ $('#open-menu').removeClass('hide');
+ $('.menu-toggle').removeClass('fixed')
+ $.cookie('openmenu', false)
+ })
+ if ($.cookie('openmenu') == 'true') {
+ openMenu(0)
+ } else {
+ $('#close-menu').click();
+ }
initSelects()
- $('.button-collapse').sideNav()
$('.modal-trigger').leanModal()
if (isTablet()) {
diff --git a/saleor/static/scss/dashboard.scss b/saleor/static/scss/dashboard.scss
index 87ce2e3abe..c547319f91 100644
--- a/saleor/static/scss/dashboard.scss
+++ b/saleor/static/scss/dashboard.scss
@@ -1,6 +1,9 @@
$font-size-action-icon: 18px;
-$header-height: 60px;
+$header-height: 64px;
+$navbar-height-mobile: 64px;
+$subheader-height: 48px;
$transition-duration: .2s;
+$placeholder-text-color: white;
$roboto-font-path: "~materialize-css/fonts/roboto/";
@import "~materialize-css/sass/materialize";
@@ -19,28 +22,34 @@ $roboto-font-path: "~materialize-css/fonts/roboto/";
url('~material-design-icons/iconfont/MaterialIcons-Regular.ttf') format('truetype');
}
-.header, main {
- @media (min-width: $medium-screen-up) {
- margin-left: 240px;
- }
-
+header {
.top-nav {
box-shadow: none;
- height: $header-height;
- margin-bottom: $gutter-width;
-
- .container {
- height: 100%;
+ line-height: 0;
+ .user-name {
+ padding: (($dropdown-item-height - 22) / 2) 16px;
}
-
- .header-button {
- float: left;
- margin-right: $gutter-width;
-
- @media (min-width: $medium-screen-up) {
- display: none;
+ .menu-toggle {
+ background-color: $primary-color;
+ transition: all 0.5s ease;
+ position: absolute;
+ width: 237px;
+ z-index: 999;
+ &.fixed {
+ position: fixed;
+ box-shadow: 2px 0px 5px 0px rgba(0, 0, 0, 0.20);
}
-
+ 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;
@@ -53,7 +62,6 @@ $roboto-font-path: "~materialize-css/fonts/roboto/";
line-height: $header-height/2;
position: relative;
top: $header-height/4;
-
i {
height: $header-height/2;
line-height: $header-height/2;
@@ -65,63 +73,94 @@ $roboto-font-path: "~materialize-css/fonts/roboto/";
right: 0;
white-space: nowrap;
}
+
+ .global-search {
+ margin-left: 250px;
+ width: 50%;
+ margin-top: $sidenav-padding/2;
+ input {
+ padding-left: $sidenav-padding;
+ display: inline-block;
+ width: 70%;
+ background-color: rgba(255, 255, 255, 0.2);
+ border-bottom: 0;
+ margin-bottom: 0;
+ border-radius: 4px;
+ &:focus, &:visited, &:active, &:hover {
+ box-shadow: none;
+ border-bottom: 0;
+ }
+ }
+ @media (max-width: $small-screen) {
+ float: right;
+ width: auto;
+ margin-top: $sidenav-padding;
+ input {
+ display: none;
+ }
+ }
+ button {
+ display: inline-block;
+ padding: 0;
+ }
+ .btn-flat:hover {
+ background-color: transparent;
+ }
+ i {
+ color: white;
+ margin-top: -1rem;
+ }
+ }
+ .logo {
+ img {
+ max-height: $header-height;
+ padding-top: $sidenav-padding
+ }
+ }
+ .right {
+ padding-right: $sidenav-padding;
+ }
}
.side-nav {
- padding-top: $header-height;
-
+ width: 250px;
+ margin-top: $header-height;
+ &-section {
+ p {
+ line-height: 1;
+ color: map-get($grey, darken-1);
+ margin-left: $gutter-width;
+ font-size: 85%;
+ }
+
+ border-bottom: 1px solid map-get($grey, lighten-2);
+ padding-top: $gutter-width / 2;
+ &#first{
+ border-top: 1px solid map-get($grey, lighten-2);
+ }
+ }
li {
display: block;
- padding: 0;
-
.body-home &.nav-home {
@extend .active;
}
-
- @each $submodule in (products, attributes, categories, orders, payments, customers, discounts, vouchers, sales) {
- .body-#{$submodule} &.subnav-#{$submodule} {
- @extend .active;
-
- a {
- background-color: map_get($materialize-red, lighten-2);
- }
- }
- }
-
- &.brand-logo {
- top: 0;
- width: 100%;
-
- a {
- display: block;
- height: $header-height;
- padding: 0;
- text-align: center;
-
- &:hover {
- background: none;
- }
-
- img {
- height: 100%;
- padding: 15px 0;
- }
- }
- }
}
}
}
-.main {
- @media (min-width: $large-screen-up) {
- margin-left: 240px;
+.subheader {
+ background-color: $primary-color-light;
+ height: $subheader-height;
+ margin-top: 0;
+ i {
+ font-size: $subheader-height/2;
+ line-height: $subheader-height;
+ color: white;
}
}
-.container {
- @media (min-width: $large-screen-up) {
- width: 85%;
- }
+.main {
+ margin-top: 1.5rem;
}
.modal-content {
diff --git a/saleor/static/scss/widget/_breadcrumbs.scss b/saleor/static/scss/widget/_breadcrumbs.scss
index 4ddbdd95b7..44c34cc13f 100644
--- a/saleor/static/scss/widget/_breadcrumbs.scss
+++ b/saleor/static/scss/widget/_breadcrumbs.scss
@@ -2,19 +2,37 @@
display: block;
float: left;
font-size: $h5-fontsize;
- line-height: $header-height;
+ line-height: $subheader-height;
white-space: nowrap;
+ margin-bottom: 0;
@media (max-width: $medium-screen) {
- width: calc(100% - 38px - 1.5rem);
overflow: hidden;
text-overflow: ellipsis;
}
-
+ &--history {
+ li {
+ &:before {
+ content: '\E5CC';
+ vertical-align: top;
+ display: inline-block;
+ font-family: 'Material Icons';
+ font-weight: normal;
+ font-style: normal;
+ font-size: 25px;
+ margin: 0 10px 0 8px;
+ -webkit-font-smoothing: antialiased;
+ }
+ &:first-child:before, &:nth-child(2):before {
+ display: none;
+ }
+ }
+ }
li {
display: none;
float: none;
- line-height: $header-height/2;
+ line-height: $subheader-height;
+ color: white;
@media (min-width: $medium-screen-up) {
display: inline-block;
@@ -24,29 +42,12 @@
display: inline-block;
}
- &:before {
- content: '\E5CC';
- color: rgba(255,255,255, .7);
- vertical-align: top;
- display: inline-block;
- font-family: 'Material Icons';
- font-weight: normal;
- font-style: normal;
- font-size: 25px;
- margin: 0 10px 0 8px;
- -webkit-font-smoothing: antialiased;
- }
-
- &:first-child:before {
- display: none;
- }
-
&:hover {
background: none;
}
a {
- color: map-get($materialize-red, lighten-4);
+ color: white;
display: inline-block;
font-size: $h5-fontsize;
padding: 0;
@@ -58,28 +59,18 @@
}
}
- &--with-menu {
- width: calc(100% - 38px - 1.5rem);
-
- @media (max-width: $medium-screen) {
- width: calc(100% - 76px - 3rem);
- }
- }
-
&--ellipsed {
&-item {
- @media (min-width: $large-screen) {
- display: inline-block;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- max-width: 14em;
- vertical-align: middle;
- }
+ display: inline-block;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ max-width: 14em;
}
}
}
.breadcrumbs {
@include breadcrumbs;
+ margin-top: 0;
}
diff --git a/templates/dashboard/base.html b/templates/dashboard/base.html
index dbed2b6486..dbd603bd7b 100644
--- a/templates/dashboard/base.html
+++ b/templates/dashboard/base.html
@@ -18,84 +18,79 @@
</head>
<body class="{% block body_class %}body-home{% endblock %}">
- <header class="header">
- <nav class="top-nav">
- <div class="container">
- <div class="nav-wrapper">
- {% block header_menu %}
- <a href="#" data-activates="side-menu" class="button-collapse header-button"><i class="material-icons">menu</i></a>
- {% endblock %}
- {% block breadcrumbs %}
- <ul class="breadcrumbs">
- <li>{% trans "Dashboard" %}</li>
- </ul>
- {% endblock %}
- {% block header_extra %}{% endblock %}
- </div>
- </div>
- <ul class="side-nav fixed" id="side-menu">
- <li class="brand-logo">
- <a href="{% url 'dashboard:index' %}">
- <img src="{% static "img/dashboard-logo.svg" %}" alt="Saleor">
- </a>
- </li>
- <li class="side-nav-user">
- <ul class="collapsible collapsible-accordion">
- <li>
- <a class="waves-effect waves-teal collapsible-header">
- <i class="material-icons">account_circle</i>{{ request.user }}
- </a>
- <div class="collapsible-body">
- <ul>
- <li><a href="/" target="_blank" class="waves-effect waves-teal">{% trans "Visit storefront" %}</a></li>
- <li><a href="{% url 'account_logout' %}" class="waves-effect waves-teal">{% trans "Log out" %}</a></li>
- </ul>
- </div>
- </li>
- </ul>
- </li>
- <li class="nav-home"><a href="{% url 'dashboard:index' %}">{% trans "Home" %}</a></li>
- <li>
- <ul class="collapsible collapsible-accordion" data-collapsible="accordion">
- <li>
- <a class="waves-effect waves-teal collapsible-header{% block menu_catalogue_class %}{% endblock %}">{% trans "Catalogue" %}</a>
- <div class="collapsible-body">
- <ul>
- <li class="subnav-products"><a href="{% url 'dashboard:product-list' %}">{% trans "Products" %}</a></li>
- <li class="subnav-attributes"><a href="{% url 'dashboard:product-attributes' %}">{% trans "Attributes" %}</a></li>
- <li class="subnav-categories"><a href="{% url 'dashboard:category-list' %}">{% trans "Categories" %}</a></li>
- </ul>
- </div>
- </li>
-
- <li>
- <a class="waves-effect waves-teal collapsible-header{% block menu_discounts_class %}{% endblock %}">{% trans "Discounts" %}</a>
- <div class="collapsible-body">
- <ul>
- <li class="subnav-sales"><a href="{% url 'dashboard:sale-list' %}">{% trans "Sales" %}</a></li>
- <li class="subnav-vouchers"><a href="{% url 'dashboard:voucher-list' %}">{% trans "Vouchers" %}</a></li>
- </ul>
- </div>
- </li>
-
- <li>
- <a class="waves-effect waves-teal collapsible-header{% block menu_sales_class %}{% endblock %}">{% trans "Sales" %}</a>
- <div class="collapsible-body">
- <ul>
- <li class="subnav-orders"><a href="{% url 'dashboard:orders' %}">{% trans "Orders" %}</a></li>
- <li class="subnav-customers"><a href="{% url 'dashboard:customers' %}">{% trans "Customers" %}</a></li>
- <li class="subnav-payments"><a href="{% url 'dashboard:payments' %}">{% trans "Payments" %}</a></li>
- </ul>
- </div>
- </li>
-
- <li class="{% block menu_delivery_class %}{% endblock %}"><a href="{% url 'dashboard:shipping-methods' %}">{% trans "Shipping methods" %}</a></li>
- </ul>
- </li>
+ <header>
+ <nav class="top-nav">
+ <div class="nav-wrapper">
+ <div class="right">
+ <ul id="user-action" class="dropdown-content">
+ <li class="user-name">{{ request.user }}</li>
+ <li class="divider"></li>
+ <li><a href="/" target="_blank" class="waves-effect waves-teal">{% trans "Visit storefront" %}</a></li>
+ <li><a href="{% url 'registration:logout' %}" class="waves-effect waves-teal">{% trans "Log out" %}</a></li>
</ul>
- </nav>
+ <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>
+ </div>
+ <ul class="side-nav" id="main-nav">
+ <li class="nav-home"><a href="{% url 'dashboard:index' %}">{% trans "Home" %}</a></li>
+ <li class="side-nav-section" id="first">
+ <p>Catalogue</p>
+ <ul>
+ <li class="{% block menu_products_class %}{% endblock %}"><a href="{% url 'dashboard:product-list' %}">{% trans "Products" %}</a></li>
+ <li class="{% block menu_attributes_class %}{% endblock %}"><a href="{% url 'dashboard:product-attributes' %}">{% trans "Attributes" %}</a></li>
+ <li class="{% block menu_categories_class %}{% endblock %}"><a href="{% url 'dashboard:category-list' %}">{% trans "Categories" %}</a></li>
+ </ul>
+ </li>
+ <li class="side-nav-section">
+ <p>Discounts</p>
+ <ul>
+ <li class="{% block menu_sales_class %}{% endblock %}"><a href="{% url 'dashboard:sale-list' %}">{% trans "Sales" %}</a></li>
+ <li class="{% block menu_vouchers_class %}{% endblock %}"><a href="{% url 'dashboard:voucher-list' %}">{% trans "Vouchers" %}</a></li>
+ </ul>
+ </li>
+ <li class="side-nav-section">
+ <p>Sales</p>
+ <ul>
+ <li class="{% block menu_orders_class %}{% endblock %}"><a href="{% url 'dashboard:orders' %}">{% trans "Orders" %}</a></li>
+ <li class="{% block menu_customers_class %}{% endblock %}"><a href="{% url 'dashboard:customers' %}">{% trans "Customers" %}</a></li>
+ <li class="{% block menu_payments_class %}{% endblock %}"><a href="{% url 'dashboard:payments' %}">{% trans "Payments" %}</a></li>
+ </ul>
+ </li>
+ <li class="{% block menu_delivery_class %}{% endblock %}"><a href="{% url 'dashboard:shipping-methods' %}">{% trans "Shipping methods" %}</a></li>
+ </ul>
+ <ul>
+ <li class="fixed menu-toggle">
+ <ul>
+ <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 "img/dashboard-logo.svg" %}" alt="Saleor">
+ </a></li>
+ </ul>
+ </li>
+ <li class="global-search">
+ <form method="get" action="{% url "search:dashboard-search" %}">
+ <input id="icon_prefix" type="text" class="validate" placeholder="Search" name="q" value="{% if query %}{{ query }}{% endif %}">
+ <button class="btn-flat" type="submit">
+ <i class="material-icons left ">search</i>
+ </button>
+ </form>
+ </li>
+ </ul>
+ </div>
+ </nav>
</header>
+ <div class="subheader top-nav">
+ <div class="nav-wrapper container">
+ {% block breadcrumbs %}
+ <ul class="breadcrumbs">
+ <li><a href="#">{% trans "Home" %}</a></li>
+ </ul>
+ {% endblock %}
+ {% block header_extra %}{% endblock %}
+ </div>
+ </div>
+
<main class="main">
<div class="container">
{% block content %}
diff --git a/templates/dashboard/category/detail.html b/templates/dashboard/category/detail.html
index 7409b2d122..9438991305 100644
--- a/templates/dashboard/category/detail.html
+++ b/templates/dashboard/category/detail.html
@@ -7,6 +7,8 @@
{% block body_class %}body-categories{% endblock %}
+{% block menu_categories_class %}active{% endblock %}
+
{% block page_title %}{% if category.pk %}{{ category }}{% else %}{% trans 'Add new category' %}{% endif %}{% endblock %}
{% block breadcrumbs %}
diff --git a/templates/dashboard/category/list.html b/templates/dashboard/category/list.html
index d3d206d452..a0cd3802bc 100644
--- a/templates/dashboard/category/list.html
+++ b/templates/dashboard/category/list.html
@@ -7,6 +7,8 @@
{% block body_class %}body-categories{% endblock %}
+{% block menu_categories_class %}active{% endblock %}
+
{% block header_menu %}
{% if root %}
{% if root.parent %}
@@ -30,7 +32,7 @@
{% if root %}
<a class="dropdown-button" href="#" data-activates="category-delete" data-constrainwidth="false">
- <i class="material-icons">more_vert</i>
+ <i class="material-icons">arrow_drop_down</i>
</a>
<ul id="category-delete" class="dropdown-content">
<li>
@@ -49,15 +51,15 @@
{% endblock %}
{% block breadcrumbs %}
- <ul class="breadcrumbs breadcrumbs--with-menu breadcrumbs--ellipsed">
- <li>
- {% if path %}
+ <ul class="breadcrumbs breadcrumbs--with-menu breadcrumbs--ellipsed breadcrumbs--history">
+ <li>
+ {% if path %}
<a href="{% url 'dashboard:category-list' %}" class="breadcrumbs--ellipsed-item">
- {% trans "Categories" %}
+ <i class="material-icons">keyboard_arrow_left</i>
</a>
{% else %}
<span class="breadcrumbs--ellipsed-item">{% trans "Categories" %}</span>
- {% endif %}
+ {% endif %}
</li>
{% if path %}
{% for node in path %}
diff --git a/templates/dashboard/customer/detail.html b/templates/dashboard/customer/detail.html
index 2946c33288..e8f49a0ccd 100644
--- a/templates/dashboard/customer/detail.html
+++ b/templates/dashboard/customer/detail.html
@@ -7,6 +7,8 @@
{% block body_class %}body-customers{% endblock %}
+{% block menu_customers_class %}active{% endblock %}
+
{% block header_menu %}
{% url "dashboard:customers" as url %}
{% include "dashboard/includes/_back-link.html" with url=url %}
@@ -14,7 +16,7 @@
{% block breadcrumbs %}
<ul class="breadcrumbs">
- <li><a href="{% url "dashboard:customers" %}">{% trans "Customers" %}</a></li>
+ <li><a href="{% url "dashboard:customers" %}"><i class="material-icons">first_page</i></a></li>
<li>{{ customer }}</li>
</ul>
{% endblock %}
diff --git a/templates/dashboard/customer/list.html b/templates/dashboard/customer/list.html
index c3c94aface..51e5af456b 100644
--- a/templates/dashboard/customer/list.html
+++ b/templates/dashboard/customer/list.html
@@ -7,6 +7,8 @@
{% block body_class %}body-customers{% endblock %}
+{% block menu_customers_class %}active{% endblock %}
+
{% block breadcrumbs %}
<ul class="breadcrumbs">
<li>{% trans "Customers" %}</li>
diff --git a/templates/dashboard/discount/sale_form.html b/templates/dashboard/discount/sale_form.html
index ff1cb716e7..41dac04c7a 100644
--- a/templates/dashboard/discount/sale_form.html
+++ b/templates/dashboard/discount/sale_form.html
@@ -8,6 +8,8 @@
{% block body_class %}body-sales{% endblock %}
+{% block menu_sales_class %}active{% endblock %}
+
{% block header_menu %}
{% url "dashboard:sale-list" as url %}
{% include "dashboard/includes/_back-link.html" with url=url %}
@@ -17,7 +19,7 @@
{% if sale.pk %}
<a class="dropdown-button" href="#" data-activates="sale-delete"
data-constrainwidth="false">
- <i class="material-icons">more_vert</i>
+ <i class="material-icons">arrow_drop_down</i>
</a>
<ul id="sale-delete" class="dropdown-content">
<li>
@@ -33,7 +35,7 @@
{% block breadcrumbs %}
<ul class="breadcrumbs breadcrumbs--with-menu">
<li><a href="{% url 'dashboard:sale-list' %}"
- class="breadcrumbs--ellipsed-item">{% trans "Sales" %}</a></li>
+ class="breadcrumbs--ellipsed-item"><i class="material-icons">first_page</i></a></li>
<li><span class="breadcrumbs--ellipsed-item">{% if sale.pk %}{{ sale }}{% else %}
{% trans 'Add new sale' %}{% endif %}</span></li>
</ul>
diff --git a/templates/dashboard/discount/sale_list.html b/templates/dashboard/discount/sale_list.html
index 191cf37686..2ca6027b64 100644
--- a/templates/dashboard/discount/sale_list.html
+++ b/templates/dashboard/discount/sale_list.html
@@ -7,6 +7,8 @@
{% block body_class %}body-sales{% endblock %}
+{% block menu_sales_class %}active{% endblock %}
+
{% block header_extra %}
<div class="fixed-action-btn">
<a class="btn-fab btn-floating btn-large waves-effect waves-light teal"
diff --git a/templates/dashboard/discount/voucher_form.html b/templates/dashboard/discount/voucher_form.html
index cb911828f5..100a837b70 100644
--- a/templates/dashboard/discount/voucher_form.html
+++ b/templates/dashboard/discount/voucher_form.html
@@ -8,6 +8,8 @@
{% block body_class %}body-vouchers{% endblock %}
+{% block menu_vouchers_class %}active{% endblock %}
+
{% block header_menu %}
{% url "dashboard:voucher-list" as url %}
{% include "dashboard/includes/_back-link.html" with url=url %}
@@ -17,7 +19,7 @@
{% if voucher.pk %}
<a class="dropdown-button" href="#" data-activates="voucher-delete"
data-constrainwidth="false">
- <i class="material-icons">more_vert</i>
+ <i class="material-icons">arrow_drop_down</i>
</a>
<ul id="voucher-delete" class="dropdown-content">
<li>
@@ -32,7 +34,7 @@
{% block breadcrumbs %}
<ul class="breadcrumbs breadcrumbs--with-menu">
<li><a href="{% url 'dashboard:voucher-list' %}"
- class="breadcrumbs--ellipsed-item">{% trans "Vouchers" %}</a></li>
+ class="breadcrumbs--ellipsed-item"><i class="material-icons">first_page</i></a></li>
<li><span class="breadcrumbs--ellipsed-item">{% if voucher.pk %}
{{ voucher }}{% else %}{% trans 'Add new voucher' %}{% endif %}</span></li>
</ul>
diff --git a/templates/dashboard/discount/voucher_list.html b/templates/dashboard/discount/voucher_list.html
index 3ff24a1b27..f3a7a9429e 100644
--- a/templates/dashboard/discount/voucher_list.html
+++ b/templates/dashboard/discount/voucher_list.html
@@ -7,6 +7,8 @@
{% block body_class %}body-vouchers{% endblock %}
+{% block menu_vouchers_class %}active{% endblock %}
+
{% block header_extra %}
<div class="fixed-action-btn">
<a class="btn-fab btn-floating btn-large waves-effect waves-light teal"
diff --git a/templates/dashboard/order/detail.html b/templates/dashboard/order/detail.html
index bdbf9f6a12..b041d3d40b 100644
--- a/templates/dashboard/order/detail.html
+++ b/templates/dashboard/order/detail.html
@@ -9,6 +9,8 @@
{% block body_class %}body-orders{% endblock %}
+{% block menu_orders_class %}active{% endblock %}
+
{% block header_menu %}
{% url "dashboard:orders" as url %}
{% include "dashboard/includes/_back-link.html" with url=url %}
@@ -17,7 +19,7 @@
{% block header_extra %}
{% if order.can_cancel %}
<a class="dropdown-button" href="#" data-activates="context-menu" data-constrainwidth="false">
- <i class="material-icons">more_vert</i>
+ <i class="material-icons">arrow_drop_down</i>
</a>
<ul id="context-menu" class="dropdown-content">
<li>
@@ -32,26 +34,24 @@
{% block breadcrumbs %}
<ul class="breadcrumbs">
- <li><a href="{% url "dashboard:orders" %}">{% trans "Orders" %}</a></li>
+ <li><a href="{% url "dashboard:orders" %}"><i class="material-icons">first_page</i></a></li>
<li>{{ order }}</li>
</ul>
{% endblock %}
-{% block menu_sales_class %} active{% endblock %}
-
{% block content %}
<div class="row">
<div class="col s12">
<ul class="tabs" role="tablist">
- <li role="presentation" class="tab">
+ <li role="presentation" class="tab col s4">
<a href="#order-details" role="tab" class="active">{% trans "Details" %}</a>
</li>
- <li role="presentation" class="tab">
+ <li role="presentation" class="tab col s4">
<a href="#payment-history" role="tab">{% trans "Payments" %}</a>
</li>
- <li role="presentation" class="tab">
+ <li role="presentation" class="tab col s4">
<a href="#order-history" role="tab">{% trans "History" %}</a>
</li>
</ul>
diff --git a/templates/dashboard/order/list.html b/templates/dashboard/order/list.html
index 80888e1af7..d4c8ca56df 100644
--- a/templates/dashboard/order/list.html
+++ b/templates/dashboard/order/list.html
@@ -7,6 +7,8 @@
{% block body_class %}body-orders{% endblock %}
+{% block menu_orders_class %}active{% endblock %}
+
{% block breadcrumbs %}
<ul class="breadcrumbs">
<li>{% trans "Orders" %}</li>
diff --git a/templates/dashboard/payments/detail.html b/templates/dashboard/payments/detail.html
index dfc2f0306b..6dd8303fc7 100644
--- a/templates/dashboard/payments/detail.html
+++ b/templates/dashboard/payments/detail.html
@@ -8,6 +8,8 @@
{% block body_class %}body-payments{% endblock %}
+{% block menu_payments_class %}active{% endblock %}
+
{% block header_menu %}
{% url "dashboard:payments" as url %}
{% include "dashboard/includes/_back-link.html" with url=url %}
@@ -15,7 +17,7 @@
{% block breadcrumbs %}
<ul class="breadcrumbs">
- <li><a href="{% url "dashboard:payments" %}">{% trans "Payments" %}</a></li>
+ <li><a href="{% url "dashboard:payments" %}"><i class="material-icons">first_page</i></a></li>
<li>#{{ payment.id }}</li>
</ul>
{% endblock %}
diff --git a/templates/dashboard/payments/list.html b/templates/dashboard/payments/list.html
index 979c8091c9..1b4f351f66 100644
--- a/templates/dashboard/payments/list.html
+++ b/templates/dashboard/payments/list.html
@@ -7,6 +7,8 @@
{% block body_class %}body-payments{% endblock %}
+{% block menu_payments_class %}active{% endblock %}
+
{% block breadcrumbs %}
<ul class="breadcrumbs">
<li>{% trans "Payments" %}</li>
diff --git a/templates/dashboard/product/attributes/form.html b/templates/dashboard/product/attributes/form.html
index 622627a4c3..0b7c5acd81 100644
--- a/templates/dashboard/product/attributes/form.html
+++ b/templates/dashboard/product/attributes/form.html
@@ -7,6 +7,8 @@
{% block body_class %}body-attributes{% endblock %}
+{% block menu_attributes_class %}active{% endblock %}
+
{% block header_menu %}
{% url "dashboard:product-attributes" as url %}
{% include "dashboard/includes/_back-link.html" with url=url %}
@@ -15,7 +17,7 @@
{% block header_extra %}
{% if attribute.pk %}
<a class="dropdown-button" href="#" data-activates="attribute-delete" data-constrainwidth="false">
- <i class="material-icons">more_vert</i>
+ <i class="material-icons">arrow_drop_down</i>
</a>
<ul id="attribute-delete" class="dropdown-content">
<li>
@@ -30,7 +32,7 @@
{% block breadcrumbs %}
<ul class="breadcrumbs breadcrumbs--with-menu">
- <li><a href="{% url 'dashboard:product-attributes' %}" class="breadcrumbs--ellipsed-item">{% trans "Attributes" %}</a></li>
+ <li><a href="{% url 'dashboard:product-attributes' %}" class="breadcrumbs--ellipsed-item"><i class="material-icons">first_page</i></a></li>
<li><span class="breadcrumbs--ellipsed-item">{% if attribute.pk %}{{ attribute }}{% else %}{% trans 'Add new attribute' %}{% endif %}</span></li>
</ul>
{% endblock %}
diff --git a/templates/dashboard/product/attributes/list.html b/templates/dashboard/product/attributes/list.html
index bdaa815949..54ead85723 100644
--- a/templates/dashboard/product/attributes/list.html
+++ b/templates/dashboard/product/attributes/list.html
@@ -6,6 +6,8 @@
{% block body_class %}body-attributes{% endblock %}
+{% block menu_attributes_class %}active{% endblock %}
+
{% block header_extra %}
<div class="fixed-action-btn">
<a class="btn-fab btn-floating btn-large waves-effect waves-light teal"
diff --git a/templates/dashboard/product/list.html b/templates/dashboard/product/list.html
index 80a11321d9..8f7af7feb5 100644
--- a/templates/dashboard/product/list.html
+++ b/templates/dashboard/product/list.html
@@ -8,6 +8,8 @@
{% block body_class %}body-products{% endblock %}
+{% block menu_products_class %}active{% endblock %}
+
{% block header_extra %}
<div class="fixed-action-btn">
{% if form.product_cls.1 %}
diff --git a/templates/dashboard/product/product_form.html b/templates/dashboard/product/product_form.html
index b04884fb44..2c5fe525cd 100644
--- a/templates/dashboard/product/product_form.html
+++ b/templates/dashboard/product/product_form.html
@@ -9,15 +9,24 @@
{% block body_class %}body-products{% endblock %}
+{% block menu_products_class %}active{% endblock %}
+
{% block header_menu %}
{% url "dashboard:product-list" as url %}
{% include "dashboard/includes/_back-link.html" with url=url %}
{% endblock %}
+{% block breadcrumbs %}
+ <ul class="breadcrumbs breadcrumbs--with-menu">
+ <li><a href="{% url "dashboard:product-list" %}" class="breadcrumb"><i class="material-icons">first_page</i></a></li>
+ <li><span class="breadcrumbs--ellipsed-item">{% if product.pk %}{{ product }}{% else %}{% trans 'Add new product' %}{% endif %}</span></li>
+ </ul>
+{% endblock %}
+
{% block header_extra %}
{% if product.pk %}
<a class="dropdown-button" href="#" data-activates="context-menu" data-constrainwidth="false">
- <i class="material-icons">more_vert</i>
+ <i class="material-icons">arrow_drop_down</i>
</a>
<ul id="context-menu" class="dropdown-content">
<li>
@@ -35,13 +44,6 @@
{% endif %}
{% endblock %}
-{% block breadcrumbs %}
- <ul class="breadcrumbs breadcrumbs--with-menu">
- <li><a href="{% url "dashboard:product-list" %}" class="breadcrumbs--ellipsed-item">{% trans "Products" %}</a></li>
- <li><span class="breadcrumbs--ellipsed-item">{% if product.pk %}{{ product }}{% else %}{% trans 'Add new product' %}{% endif %}</span></li>
- </ul>
-{% endblock %}
-
{% block menu_catalogue_class %} active{% endblock %}
{% block content %}
diff --git a/templates/dashboard/product/product_image_form.html b/templates/dashboard/product/product_image_form.html
index e86da3a867..f1f2b14715 100644
--- a/templates/dashboard/product/product_image_form.html
+++ b/templates/dashboard/product/product_image_form.html
@@ -13,14 +13,16 @@
{% block body_class %}body-store body-products{% endblock %}
+{% block menu_products_class %}active{% endblock %}
+
{% block header_menu %}
{% url "dashboard:product-update" pk=product.pk as url %}
{% include "dashboard/includes/_back-link.html" with url=url hash="#images" %}
{% endblock %}
{% block breadcrumbs %}
- <ul class="breadcrumbs">
- <li><a href="{% url "dashboard:product-list" %}">{% trans "Products" %}</a></li>
+ <ul class="breadcrumbs breadcrumbs--history">
+ <li><a href="{% url "dashboard:product-list" %}"><i class="material-icons">keyboard_arrow_left</i></a></li>
<li><a href="{% url "dashboard:product-update" pk=product.pk %}#images">{{ product }}</a></li>
{% if product_image.pk %}
<li>{{ product_image.image }}</li>
diff --git a/templates/dashboard/product/stock_form.html b/templates/dashboard/product/stock_form.html
index 548042bfcd..c0d3868e42 100644
--- a/templates/dashboard/product/stock_form.html
+++ b/templates/dashboard/product/stock_form.html
@@ -13,14 +13,16 @@
{% block body_class %}body-store body-products{% endblock %}
+{% block menu_products_class %}active{% endblock %}
+
{% block header_menu %}
{% url "dashboard:product-update" pk=product.pk as url %}
{% include "dashboard/includes/_back-link.html" with url=url hash="#stock" %}
{% endblock %}
{% block breadcrumbs %}
- <ul class="breadcrumbs breadcrumbs--with-menu">
- <li><a href="{% url "dashboard:product-list" %}" class="breadcrumbs--ellipsed-item">{% trans "Products" %}</a></li>
+ <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>
{% if stock.pk %}
<li><span class="breadcrumbs--ellipsed-item">{% trans "Stock" %} {{ stock.variant }}</span></li>
diff --git a/templates/dashboard/product/variant_form.html b/templates/dashboard/product/variant_form.html
index 1e0254c427..5bbf6c9d4f 100644
--- a/templates/dashboard/product/variant_form.html
+++ b/templates/dashboard/product/variant_form.html
@@ -18,8 +18,8 @@
{% endblock %}
{% block breadcrumbs %}
- <ul class="breadcrumbs breadcrumbs--with-menu">
- <li><a href="{% url "dashboard:product-list" %}" class="breadcrumbs--ellipsed-item">{% trans "Products" %}</a></li>
+ <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 %}#variants" class="breadcrumbs--ellipsed-item">{{ product }}</a></li>
{% if variant.pk %}
<li><span class="breadcrumbs--ellipsed-item">{% trans "Variant" %} {{ variant.sku }}{% if variant.name %} ({{ variant.name }}){% endif %}</span></li>
diff --git a/templates/dashboard/shipping/method_form.html b/templates/dashboard/shipping/method_form.html
index aa72cb8f90..7fb78d78f4 100644
--- a/templates/dashboard/shipping/method_form.html
+++ b/templates/dashboard/shipping/method_form.html
@@ -25,7 +25,7 @@
{% block breadcrumbs %}
<ul class="breadcrumbs breadcrumbs--with-menu">
<li><a href="{% url 'dashboard:shipping-methods' %}"
- class="breadcrumbs--ellipsed-item">{% trans "Shipping methods" %}</a>
+ class="breadcrumbs--ellipsed-item"><i class="material-icons">first_page</i></a>
</li>
<li>
{% if shipping_method.pk %}