Skip to content

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

Group menu items

Paweł Kowalewskia7e97f4b7d57
diff --git a/saleor/dashboard/templates/dashboard/base.html b/saleor/dashboard/templates/dashboard/base.html
index 73ba0e4727..4c3c539de5 100644
--- a/saleor/dashboard/templates/dashboard/base.html
+++ b/saleor/dashboard/templates/dashboard/base.html
@@ -41,7 +41,6 @@
<div class="collapsible-body">
<ul>
<li><a href="/" class="waves-effect waves-teal">{% trans "Visit storefront" %}</a></li>
- <li class="divider"></li>
<li><a href="{% url 'registration:logout' %}" class="waves-effect waves-teal">{% trans "Log out" %}</a></li>
</ul>
</div>
@@ -53,13 +52,35 @@
<img src="{% static "img/dashboard-logo.svg" %}" alt="Saleor">
</a>
</li>
- <li class="nav-home"><a href="{% url 'dashboard:index' %}" class="waves-effect waves-teal">Home</a></li>
- <li class="nav-orders"><a href="{% url 'dashboard:orders' %}" class="waves-effect waves-teal">Orders</a></li>
- <li class="nav-products"><a href="{% url 'dashboard:products' %}" class="waves-effect waves-teal">Products</a></li>
- <li class="nav-attributes"><a href="{% url 'dashboard:product-attributes' %}" class="waves-effect waves-teal">Attributes</a></li>
- <li class="nav-categories"><a href="{% url 'dashboard:categories' %}" class="waves-effect waves-teal">Categories</a></li>
- <li class="nav-customers"><a href="{% url 'dashboard:customers' %}" class="waves-effect waves-teal">Customers</a></li>
- <li class="nav-payments"><a href="{% url 'dashboard:payments' %}" class="waves-effect waves-teal">Payments</a></li>
+ <li class="nav-home"><a href="{% url 'dashboard:index' %}">Home</a></li>
+ <li class="nav-store">
+ <ul class="collapsible collapsible-accordion">
+ <li>
+ <a class="waves-effect waves-teal collapsible-header">{% trans "Store" %}</a>
+ <div class="collapsible-body">
+ <ul>
+ <li class="subnav-products"><a href="{% url 'dashboard:products' %}">{% 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:categories' %}">{% trans "Categories" %}</a></li>
+ </ul>
+ </div>
+ </li>
+ </ul>
+ </li>
+ <li class="nav-orders">
+ <ul class="collapsible collapsible-accordion">
+ <li>
+ <a class="waves-effect waves-teal collapsible-header">{% trans "Orders" %}</a>
+ <div class="collapsible-body">
+ <ul>
+ <li class="subnav-order-list"><a href="{% url 'dashboard:orders' %}">{% trans "List" %}</a></li>
+ <li class="subnav-attributes"><a href="{% url 'dashboard:payments' %}">{% trans "Payments" %}</a></li>
+ <li class="subnav-categories"><a href="{% url 'dashboard:customers' %}">{% trans "Customers" %}</a></li>
+ </ul>
+ </div>
+ </li>
+ </ul>
+ </li>
</ul>
</nav>
</header>
diff --git a/saleor/dashboard/templates/dashboard/product/attributes/list.html b/saleor/dashboard/templates/dashboard/product/attributes/list.html
index e4077887df..1a740933b5 100644
--- a/saleor/dashboard/templates/dashboard/product/attributes/list.html
+++ b/saleor/dashboard/templates/dashboard/product/attributes/list.html
@@ -4,8 +4,10 @@
{% block title %}{% trans "Attributes" %} - {{ block.super }}{% endblock %}
+{% block body_class %}body-store body-attributes{% endblock %}
+
{% block breadcrumbs %}
- <ul class="breadcrumbs breadcrumbs--with-menu">
+ <ul class="breadcrumbs">
<li>{% trans "Attributes" %}</li>
</ul>
{% endblock %}
diff --git a/saleor/dashboard/templates/dashboard/product/list.html b/saleor/dashboard/templates/dashboard/product/list.html
index 0584f975b7..e34bf10ee1 100644
--- a/saleor/dashboard/templates/dashboard/product/list.html
+++ b/saleor/dashboard/templates/dashboard/product/list.html
@@ -6,7 +6,7 @@
{% block title %}{% trans "Products" %} - {{ block.super }}{% endblock %}
-{% block body_class %}body-products{% endblock %}
+{% block body_class %}body-store body-products{% endblock %}
{% block header_extra %}
<div class="fixed-action-btn">
diff --git a/saleor/dashboard/templates/dashboard/product/product_form.html b/saleor/dashboard/templates/dashboard/product/product_form.html
index e8bfa15333..cd5c0714aa 100644
--- a/saleor/dashboard/templates/dashboard/product/product_form.html
+++ b/saleor/dashboard/templates/dashboard/product/product_form.html
@@ -6,7 +6,7 @@
{% block title %}{{ title }} - {% trans "Products" %} - {{ block.super }}{% endblock %}
-{% block body_class %}body-products{% endblock %}
+{% block body_class %}body-store body-products{% endblock %}
{% block page_title %}{{ title }}{% endblock %}
@@ -183,7 +183,6 @@
<th>{% trans "SKU" %}</th>
<th class="right-align">{% trans "Quantity" %}</th>
<th>{% trans "Location" %}</th>
- <th class="right-align">{% trans "Price" %}</th>
</tr>
</thead>
@@ -200,11 +199,6 @@
</a></td>
<td class="right-align">{{ item.quantity }}</td>
<td>{{ item.location }}</td>
- <td class="right-align">
- {% if item.cost_price %}
- {% gross item.cost_price %}
- {% endif %}
- </td>
</tr>
{% endfor %}
</tbody>
diff --git a/saleor/dashboard/templates/dashboard/product/product_image_form.html b/saleor/dashboard/templates/dashboard/product/product_image_form.html
index 301c884d79..f505812029 100644
--- a/saleor/dashboard/templates/dashboard/product/product_image_form.html
+++ b/saleor/dashboard/templates/dashboard/product/product_image_form.html
@@ -6,10 +6,10 @@
{% block title %}{{ title }} - {% trans "Images" %} - {{ block.super }}{% endblock %}
{% block breadcrumbs %}
- <ul class="breadcrumbs breadcrumbs--with-menu">
+ <ul class="breadcrumbs">
<li><a href="{% url "dashboard:products" %}">{% trans "Products" %}</a></li>
- <li><a href="{% url "dashboard:product-update" pk=product.pk %}"><i class="mdi-navigation-chevron-right"></i>{{ product }}</a></li>
- <li><i class="mdi-navigation-chevron-right"></i> {{ title }}</li>
+ <li><a href="{% url "dashboard:product-update" pk=product.pk %}">{{ product }}</a></li>
+ <li>{{ title }}</li>
</ul>
{% endblock %}
diff --git a/saleor/dashboard/templates/dashboard/product/stock_form.html b/saleor/dashboard/templates/dashboard/product/stock_form.html
index 3ef2f20e9d..520b69cc49 100644
--- a/saleor/dashboard/templates/dashboard/product/stock_form.html
+++ b/saleor/dashboard/templates/dashboard/product/stock_form.html
@@ -5,7 +5,7 @@
{% block title %}{{ title }} - {% trans "Stock" %} - {{ block.super }}{% endblock %}
-{% block body_class %}body-products{% endblock %}
+{% block body_class %}body-store body-products{% endblock %}
{% block page_title %}{{ title }}{% endblock %}
@@ -23,15 +23,14 @@
{% endblock %}
{% block content %}
- <form method="post" id="product-form" enctype="multipart/form-data">
+ <form method="post" id="form-stock" enctype="multipart/form-data">
<div class="row">
- <div class="col l8 offset-l2">
- <div class="row">
- {% csrf_token %}
- {{ form|materializecss }}
- <input type="hidden" name="success_url" value="{% url 'dashboard:product-update' pk=product.pk %}#stock">
- </div>
- </div>
+ {% csrf_token %}
+ {{ form.variant|materializecss:"s12 m8 l6 offset-l2" }}
+ {{ form.quantity|materializecss:"s12 m4 l2" }}
+ {{ form.location|materializecss:"s12 m6 l4 offset-l2" }}
+ {{ form.cost_price|materializecss:"s12 m6 l4" }}
+ <input type="hidden" name="success_url" value="{% url 'dashboard:product-update' pk=product.pk %}#stock">
</div>
<div class="row">
diff --git a/saleor/dashboard/templates/dashboard/product/variant_form.html b/saleor/dashboard/templates/dashboard/product/variant_form.html
index fad52aaa21..c28a231140 100644
--- a/saleor/dashboard/templates/dashboard/product/variant_form.html
+++ b/saleor/dashboard/templates/dashboard/product/variant_form.html
@@ -5,7 +5,7 @@
{% block title %}{{ title }} - {% trans "Variants" %} - {{ block.super }}{% endblock %}
-{% block body_class %}body-products{% endblock %}
+{% block body_class %}body-store body-products{% endblock %}
{% block page_title %}{{ title }}{% endblock %}
diff --git a/saleor/static/scss/_app.scss b/saleor/static/scss/_app.scss
index 7171fc05f2..a039d1f399 100644
--- a/saleor/static/scss/_app.scss
+++ b/saleor/static/scss/_app.scss
@@ -72,12 +72,22 @@ $header-height: 60px;
content: none;
}
- @each $module in (home, orders, products, categories, customers, paymentss) {
+ @each $module in (home, orders, store) {
.body-#{$module} &.nav-#{$module} {
@extend .active;
}
}
+ @each $submodule in (products, attributes, categories, order-list, payments, customers) {
+ .body-#{$submodule} &.subnav-#{$submodule} {
+ @extend .active;
+
+ a {
+ background-color: map_get($materialize-red, lighten-2);
+ }
+ }
+ }
+
&.brand-logo {
top: 0;
width: 100%;
@@ -123,15 +133,38 @@ $header-height: 60px;
ul ul {
li {
a {
- background: map-get($grey, lighten-5);
- height: 52px;
line-height: 52px;
- padding-left: 30px;
}
}
}
}
+ ul ul {
+ li {
+ a {
+ background: map-get($grey, lighten-5);
+ height: 52px;
+ line-height: 52px;
+ padding-left: 30px;
+ transition: background-color .2s;
+
+ &:hover, &:focus {
+ background-color: #ddd;
+ }
+ }
+ }
+ }
+
+ .collapsible-header {
+ margin: 0;
+ }
+
+ .collapsible-body {
+ a {
+ margin: 0;
+ }
+ }
+
i {
display: inline-block;
float: none;
diff --git a/saleor/static/scss/widget/_form.scss b/saleor/static/scss/widget/_form.scss
index 99191d9a21..1d01d02937 100644
--- a/saleor/static/scss/widget/_form.scss
+++ b/saleor/static/scss/widget/_form.scss
@@ -1,5 +1,7 @@
@mixin form {
.select-wrapper {
+ margin-top: -3px;
+
&.invalid {
input {
@extend .invalid;
@@ -9,6 +11,7 @@
label {
@extend .active;
+ display: block;
&.optional {
&:before {
@@ -55,6 +58,12 @@
@extend %input-lg;
}
}
+
+ &#form-stock {
+ #id_quantity {
+ @extend %input-lg;
+ }
+ }
}
form {