Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Move actions to context menu
Krzysztof Białogłowiczc5bb946cadba
diff --git a/saleor/static/scss/dashboard/components/_nav.scss b/saleor/static/scss/dashboard/components/_nav.scssindex fcc58e6375..dbdaaeeb54 100644--- a/saleor/static/scss/dashboard/components/_nav.scss+++ b/saleor/static/scss/dashboard/components/_nav.scss@@ -159,11 +159,18 @@ header {height: $subheader-height;margin-top: 0;.container {+ width: auto;+ max-width: none;margin: 0 40px;transition: margin .1s;@media (min-width: $large-screen) {margin-left: 272px;}+ .dropdown-button {+ i {+ padding-right: 10px;+ }+ }}i {font-size: $subheader-height/2;diff --git a/templates/dashboard/category/list.html b/templates/dashboard/category/list.htmlindex 1c0e8f670b..7afe487f13 100644--- a/templates/dashboard/category/list.html+++ b/templates/dashboard/category/list.html@@ -33,8 +33,8 @@</div>{% if root %}- <a class="dropdown-button" href="#" data-activates="category-delete" data-constrainwidth="false">- <i class="material-icons">arrow_drop_down</i>+ <a class="dropdown-button right" href="#" data-activates="category-delete" data-constrainwidth="false">+ <i class="material-icons">more_vert</i></a><ul id="category-delete" class="dropdown-content"><li>diff --git a/templates/dashboard/discount/sale_form.html b/templates/dashboard/discount/sale_form.htmlindex 3e40b16b15..aa7c079d40 100644--- a/templates/dashboard/discount/sale_form.html+++ b/templates/dashboard/discount/sale_form.html@@ -17,9 +17,9 @@{% block header_extra %}{% if sale.pk %}- <a class="dropdown-button" href="#" data-activates="sale-delete"+ <a class="dropdown-button right" href="#" data-activates="sale-delete"data-constrainwidth="false">- <i class="material-icons">arrow_drop_down</i>+ <i class="material-icons">more_vert</i></a><ul id="sale-delete" class="dropdown-content"><li>diff --git a/templates/dashboard/discount/voucher_form.html b/templates/dashboard/discount/voucher_form.htmlindex 4d98d47da6..7b7ef18947 100644--- a/templates/dashboard/discount/voucher_form.html+++ b/templates/dashboard/discount/voucher_form.html@@ -17,9 +17,9 @@{% block header_extra %}{% if voucher.pk %}- <a class="dropdown-button" href="#" data-activates="voucher-delete"+ <a class="dropdown-button right" href="#" data-activates="voucher-delete"data-constrainwidth="false">- <i class="material-icons">arrow_drop_down</i>+ <i class="material-icons">more_vert</i></a><ul id="voucher-delete" class="dropdown-content"><li>diff --git a/templates/dashboard/order/detail.html b/templates/dashboard/order/detail.htmlindex 26d31b0aaf..3b087ba58c 100644--- a/templates/dashboard/order/detail.html+++ b/templates/dashboard/order/detail.html@@ -19,8 +19,8 @@{% block header_extra %}{% if order.can_cancel %}- <a class="dropdown-button" href="#" data-activates="context-menu" data-constrainwidth="false">- <i class="material-icons">arrow_drop_down</i>+ <a class="dropdown-button right" href="#" data-activates="context-menu" data-constrainwidth="false">+ <i class="material-icons">more_vert</i></a><ul id="context-menu" class="dropdown-content"><li>diff --git a/templates/dashboard/product/attributes/form.html b/templates/dashboard/product/attributes/form.htmlindex b7e6067976..8e13edfcbf 100644--- a/templates/dashboard/product/attributes/form.html+++ b/templates/dashboard/product/attributes/form.html@@ -17,8 +17,8 @@{% block header_extra %}{% if attribute.pk %}- <a class="dropdown-button" href="#" data-activates="attribute-delete" data-constrainwidth="false">- <i class="material-icons">arrow_drop_down</i>+ <a class="dropdown-button right" href="#" data-activates="attribute-delete" data-constrainwidth="false">+ <i class="material-icons">more_vert</i></a><ul id="attribute-delete" class="dropdown-content"><li>diff --git a/templates/dashboard/product/product_class_form.html b/templates/dashboard/product/product_class_form.htmlindex bbe3be2035..674acba6da 100644--- a/templates/dashboard/product/product_class_form.html+++ b/templates/dashboard/product/product_class_form.html@@ -32,8 +32,8 @@{% block header_extra %}{% if product_class.pk %}- <a class="dropdown-button" href="#" data-activates="context-menu" data-constrainwidth="false">- <i class="material-icons">arrow_drop_down</i>+ <a class="dropdown-button right" href="#" data-activates="context-menu" data-constrainwidth="false">+ <i class="material-icons">more_vert</i></a><ul id="context-menu" class="dropdown-content"><li>diff --git a/templates/dashboard/product/product_form.html b/templates/dashboard/product/product_form.htmlindex da3a3809b8..bdb6f22f05 100644--- a/templates/dashboard/product/product_form.html+++ b/templates/dashboard/product/product_form.html@@ -34,8 +34,8 @@{% block header_extra %}{% if product.pk %}- <a class="dropdown-button" href="#" data-activates="context-menu" data-constrainwidth="false">- <i class="material-icons">arrow_drop_down</i>+ <a class="dropdown-button right" href="#" data-activates="context-menu" data-constrainwidth="false">+ <i class="material-icons">more_vert</i></a><ul id="context-menu" class="dropdown-content"><li>@@ -53,6 +53,8 @@{% endif %}{% endblock %}++{% block menu_catalogue_class %} active{% endblock %}{% block content %}diff --git a/templates/dashboard/product/stock_locations/form.html b/templates/dashboard/product/stock_locations/form.htmlindex 231c4d0034..356f5a113d 100644--- a/templates/dashboard/product/stock_locations/form.html+++ b/templates/dashboard/product/stock_locations/form.html@@ -12,7 +12,7 @@{% block header_extra %}{% if location.pk %}- <a class="dropdown-button" href="#" data-activates="attribute-delete" data-constrainwidth="false">+ <a class="dropdown-button right" href="#" data-activates="attribute-delete" data-constrainwidth="false"><i class="material-icons">more_vert</i></a><ul id="attribute-delete" class="dropdown-content">diff --git a/templates/dashboard/shipping/method_form.html b/templates/dashboard/shipping/method_form.htmlindex 7bcc9ad364..fcbad75eaa 100644--- a/templates/dashboard/shipping/method_form.html+++ b/templates/dashboard/shipping/method_form.html@@ -40,6 +40,19 @@</ul>{% endblock %}+{% block header_extra %}+ {% if shipping_method.pk %}+ <a class="dropdown-button right" href="#" data-activates="context-menu" data-constrainwidth="false">+ <i class="material-icons">more_vert</i>+ </a>+ <ul id="context-menu" class="dropdown-content">+ <li>+ <a href="{% url 'dashboard:shipping-method-delete' pk=shipping_method.pk %}">{% trans "Delete shipping method" context "Shipping method form action" %}</a>+ </li>+ </ul>+ {% endif %}+{% endblock %}+{% block menu_shipping_class %} active{% endblock %}{% block content %}@@ -90,7 +103,6 @@<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 %}