Skip to content

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

Add updates in templates

michala9396b20cf46
diff --git a/templates/dashboard/category/list.html b/templates/dashboard/category/list.html
index 09e5ae58e6..2ea58a93f7 100644
--- a/templates/dashboard/category/list.html
+++ b/templates/dashboard/category/list.html
@@ -24,29 +24,31 @@
{% endblock %}
{% block header_extra %}
- <div class="fixed-action-btn">
- <a class="btn-fab btn-floating btn-large waves-effect waves-light teal"
- title="{% trans "Add category" context "Category list add button text" %}"
- href="{% if root %}{% url 'dashboard:category-add' root_pk=root.pk %}{% else %}{% url 'dashboard:category-add' %}{% endif %}">
- <svg data-src="{% static "dashboard/images/add.svg" %}" />
- </a>
- </div>
- {% if root %}
- <a class="dropdown-button right" href="#" data-activates="category-delete" data-constrainwidth="false">
- <svg data-src="{% static "dashboard/images/more_vert.svg" %}" height="24" width="24" />
- </a>
- <ul id="category-delete" class="dropdown-content">
- <li>
- <a class="modal-trigger-custom" data-href="{% url 'dashboard:category-edit' root_pk=root.pk %}" href="#base-modal">
- {% trans "Edit category" context "Dashboard edit action" %}
- </a>
- </li>
- <li>
- <a class="modal-trigger-custom" data-href="{% url 'dashboard:category-delete' pk=root.pk %}" href="#base-modal">
- {% trans "Remove category" context "Category list action link" %}
- </a>
- </li>
- </ul>
+ {% if perms.product.edit_category %}
+ <div class="fixed-action-btn">
+ <a class="btn-fab btn-floating btn-large waves-effect waves-light teal"
+ title="{% trans "Add category" context "Category list add button text" %}"
+ href="{% if root %}{% url 'dashboard:category-add' root_pk=root.pk %}{% else %}{% url 'dashboard:category-add' %}{% endif %}">
+ <svg data-src="{% static "dashboard/images/add.svg" %}" />
+ </a>
+ </div>
+ {% if root %}
+ <a class="dropdown-button right" href="#" data-activates="category-delete" data-constrainwidth="false">
+ <svg data-src="{% static "dashboard/images/more_vert.svg" %}" height="24" width="24" />
+ </a>
+ <ul id="category-delete" class="dropdown-content">
+ <li>
+ <a class="modal-trigger-custom" data-href="{% url 'dashboard:category-edit' root_pk=root.pk %}" href="#base-modal">
+ {% trans "Edit category" context "Dashboard edit action" %}
+ </a>
+ </li>
+ <li>
+ <a class="modal-trigger-custom" data-href="{% url 'dashboard:category-delete' pk=root.pk %}" href="#base-modal">
+ {% trans "Remove category" context "Category list action link" %}
+ </a>
+ </li>
+ </ul>
+ {% endif %}
{% endif %}
{% endblock %}