Skip to content

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

Rename ProductAttribtue to Attribute in templates

Pacu2a2a2bf57e286
diff --git a/saleor/graphql/product/mutations/attributes.py b/saleor/graphql/product/mutations/attributes.py
index e024279307..082a7d4e26 100644
--- a/saleor/graphql/product/mutations/attributes.py
+++ b/saleor/graphql/product/mutations/attributes.py
@@ -11,7 +11,7 @@ class AttributesInput(graphene.InputObjectType):
required=True, description='Name displayed in the interface.')
-class AttributeValueInput(graphene.InputObjectType):
+class AttributeValueCreateInput(graphene.InputObjectType):
attribute = graphene.ID(
required=False,
description='Attribute to which value will be assigned.',
@@ -75,7 +75,7 @@ class AttributeDelete(ModelDeleteMutation):
class AttributeValueCreate(ModelMutation):
class Arguments:
- input = AttributeValueInput(
+ input = AttributeValueCreateInput(
required=True,
description='Fields required to create an attribute choice value.')
diff --git a/templates/dashboard/base.html b/templates/dashboard/base.html
index c773614949..b869f81987 100644
--- a/templates/dashboard/base.html
+++ b/templates/dashboard/base.html
@@ -189,7 +189,7 @@
</a>
</li>
<li class="{% block menu_attributes_class %}{% endblock %}">
- <a href="{% url 'dashboard:product-attributes' %}">
+ <a href="{% url 'dashboard:attributes' %}">
{% trans "Attributes" context "Dashboard attributes list" %}
</a>
</li>
diff --git a/templates/dashboard/product/product_attribute/detail.html b/templates/dashboard/product/attribute/detail.html
similarity index 79%
rename from templates/dashboard/product/product_attribute/detail.html
rename to templates/dashboard/product/attribute/detail.html
index 3b1621a25a..54c936047b 100644
--- a/templates/dashboard/product/product_attribute/detail.html
+++ b/templates/dashboard/product/attribute/detail.html
@@ -14,12 +14,12 @@
{% block breadcrumbs %}
<ul class="breadcrumbs breadcrumbs--history">
<li>
- <a href="{% url 'dashboard:product-attributes' %}" class="breadcrumbs--ellipsed-item">
+ <a href="{% url 'dashboard:attributes' %}" class="breadcrumbs--ellipsed-item">
{% trans "Attributes" context "Attribute detail breadcrumbs" %}
</a>
</li>
<li class="back-mobile">
- <a href="{% url 'dashboard:product-attributes' %}">
+ <a href="{% url 'dashboard:attributes' %}">
<svg data-src="{% static "dashboard/images/arrow-left.svg" %}" fill="#fff" width="20px" height="20px" />
</a>
</li>
@@ -44,10 +44,10 @@
</span>
</div>
<div class="card-action">
- <a class="btn-flat waves-effect" href="{% url "dashboard:product-attribute-update" attribute.pk %}">
+ <a class="btn-flat waves-effect" href="{% url "dashboard:attribute-update" attribute.pk %}">
{% trans "Edit attribute" context "Attribute detail action" %}
</a>
- <a class="btn-flat waves-effect modal-trigger-custom" href="#base-modal" data-href="{% url 'dashboard:product-attribute-delete' pk=attribute.pk %}">
+ <a class="btn-flat waves-effect modal-trigger-custom" href="#base-modal" data-href="{% url 'dashboard:attribute-delete' pk=attribute.pk %}">
{% trans "Remove attribute" context "Attribute detail action" %}
</a>
</div>
@@ -59,7 +59,7 @@
<span class="card-title">{% trans "Attribute values" %}</span>
</div>
<div class="data-table-header-action">
- <a href="{% url 'dashboard:product-attribute-value-add' attribute_pk=attribute.pk %}" class="btn-flat waves-effect">
+ <a href="{% url 'dashboard:attribute-value-add' attribute_pk=attribute.pk %}" class="btn-flat waves-effect">
{% trans "Add" %}
</a>
</div>
@@ -73,7 +73,7 @@
<th></th>
</tr>
</thead>
- <tbody class="sortable-items" data-post-url="{% url 'dashboard:product-attribute-values-reorder' attribute_pk=attribute.pk %}" data-post-name="ordered_values">
+ <tbody class="sortable-items" data-post-url="{% url 'dashboard:attribute-values-reorder' attribute_pk=attribute.pk %}" data-post-name="ordered_values">
{% for value in values %}
<tr class="sortable-item" data-id="{{ value.pk }}">
<td class="data-table-icon ignore-link sortable__drag-area">
@@ -83,10 +83,10 @@
{{ value.name }}
</td>
<td class="right-align">
- <a href="{% url 'dashboard:product-attribute-value-update' attribute_pk=attribute.pk value_pk=value.pk %}" class="btn-flat waves-effect">
+ <a href="{% url 'dashboard:attribute-value-update' attribute_pk=attribute.pk value_pk=value.pk %}" class="btn-flat waves-effect">
{% trans 'Edit' context 'Attribute choice value edit action' %}
</a>
- <a class="btn-flat waves-effect modal-trigger-custom" href="#base-modal" data-href="{% url 'dashboard:product-attribute-value-delete' attribute_pk=attribute.pk value_pk=value.pk %}">
+ <a class="btn-flat waves-effect modal-trigger-custom" href="#base-modal" data-href="{% url 'dashboard:attribute-value-delete' attribute_pk=attribute.pk value_pk=value.pk %}">
{% trans 'Remove' context 'Attribute choice value edit action' %}
</a>
</td>
diff --git a/templates/dashboard/product/product_attribute/form.html b/templates/dashboard/product/attribute/form.html
similarity index 83%
rename from templates/dashboard/product/product_attribute/form.html
rename to templates/dashboard/product/attribute/form.html
index 2d4cb1b2a3..f61f6e9df0 100644
--- a/templates/dashboard/product/product_attribute/form.html
+++ b/templates/dashboard/product/attribute/form.html
@@ -17,7 +17,7 @@
{% block menu_attributes_class %}active{% endblock %}
{% block header_menu %}
- {% url "dashboard:product-attributes" as url %}
+ {% url "dashboard:attributes" as url %}
{% include "dashboard/includes/_back_link.html" with url=url %}
{% endblock %}
@@ -25,18 +25,18 @@
{% block breadcrumbs %}
<ul class="breadcrumbs breadcrumbs--history">
<li>
- <a href="{% url 'dashboard:product-attributes' %}" class="breadcrumbs--ellipsed-item">
+ <a href="{% url 'dashboard:attributes' %}" class="breadcrumbs--ellipsed-item">
{% trans "Attributes" context "Dashboard attributes list" %}
</a>
</li>
<li class="back-mobile">
- <a href="{% url 'dashboard:product-attributes' %}">
+ <a href="{% url 'dashboard:attributes' %}">
<svg data-src="{% static "dashboard/images/arrow-left.svg" %}" fill="#fff" width="20px" height="20px" />
</a>
</li>
{% if attribute.pk %}
<li>
- <a href="{% url 'dashboard:product-attribute-details' attribute.pk %}" class="breadcrumbs--ellipsed-item">
+ <a href="{% url 'dashboard:attribute-details' attribute.pk %}" class="breadcrumbs--ellipsed-item">
{{ attribute }}
</a>
</li>
@@ -73,14 +73,14 @@
</div>
<div class="card-action right-align">
{% if attribute.pk %}
- <a href="{% url 'dashboard:product-attribute-details' attribute.pk %}" class="btn-flat waves-effect">
+ <a href="{% url 'dashboard:attribute-details' attribute.pk %}" class="btn-flat waves-effect">
{% trans "Cancel" context "Dashboard cancel action" %}
</a>
<button type="submit" class="btn waves-effect">
{% trans "Save" context "Dashboard update action" %}
</button>
{% else %}
- <a href="{% url 'dashboard:product-attributes' %}" class="btn-flat waves-effect">
+ <a href="{% url 'dashboard:attributes' %}" class="btn-flat waves-effect">
{% trans "Cancel" context "Dashboard cancel action" %}
</a>
<button type="submit" class="btn waves-effect">
diff --git a/templates/dashboard/product/product_attribute/list.html b/templates/dashboard/product/attribute/list.html
similarity index 92%
rename from templates/dashboard/product/product_attribute/list.html
rename to templates/dashboard/product/attribute/list.html
index 841d4e08e3..89f8069479 100644
--- a/templates/dashboard/product/product_attribute/list.html
+++ b/templates/dashboard/product/attribute/list.html
@@ -14,7 +14,7 @@
{% block header_extra %}
<div class="btn-fab-fixed">
- <a class="btn-fab-default waves-effect waves-light" href="{% url 'dashboard:product-attribute-add' %}" title="{% trans "Add attribute" context "Attribute list add button text" %}">
+ <a class="btn-fab-default waves-effect waves-light" href="{% url 'dashboard:attribute-add' %}" title="{% trans "Add attribute" context "Attribute list add button text" %}">
<svg data-src="{% static "dashboard/images/add.svg" %}" />
</a>
</div>
@@ -48,7 +48,7 @@
</thead>
<tbody>
{% for pk, name, values in attributes %}
- <tr data-action-go="{% url 'dashboard:product-attribute-details' pk=pk %}">
+ <tr data-action-go="{% url 'dashboard:attribute-details' pk=pk %}">
<td>
{{ name }}
</td>
diff --git a/templates/dashboard/product/product_attribute/modal/attribute_confirm_delete.html b/templates/dashboard/product/attribute/modal/attribute_confirm_delete.html
similarity index 91%
rename from templates/dashboard/product/product_attribute/modal/attribute_confirm_delete.html
rename to templates/dashboard/product/attribute/modal/attribute_confirm_delete.html
index 4e0d05f036..d4517ff763 100644
--- a/templates/dashboard/product/product_attribute/modal/attribute_confirm_delete.html
+++ b/templates/dashboard/product/attribute/modal/attribute_confirm_delete.html
@@ -5,7 +5,7 @@
{% block form_class %}{% endblock %}
{% block action_url %}
-{% url "dashboard:product-attribute-delete" pk=attribute.pk %}
+{% url "dashboard:attribute-delete" pk=attribute.pk %}
{% endblock %}
{% block title %}
diff --git a/templates/dashboard/product/product_attribute/values/form.html b/templates/dashboard/product/attribute/values/form.html
similarity index 85%
rename from templates/dashboard/product/product_attribute/values/form.html
rename to templates/dashboard/product/attribute/values/form.html
index 0384d8d55e..7016478fe1 100644
--- a/templates/dashboard/product/product_attribute/values/form.html
+++ b/templates/dashboard/product/attribute/values/form.html
@@ -17,7 +17,7 @@
{% block menu_attributes_class %}active{% endblock %}
{% block header_menu %}
- {% url "dashboard:product-attributes" as url %}
+ {% url "dashboard:attributes" as url %}
{% include "dashboard/includes/_back_link.html" with url=url %}
{% endblock %}
@@ -25,18 +25,18 @@
{% block breadcrumbs %}
<ul class="breadcrumbs breadcrumbs--history">
<li>
- <a href="{% url 'dashboard:product-attributes' %}" class="breadcrumbs--ellipsed-item">
+ <a href="{% url 'dashboard:attributes' %}" class="breadcrumbs--ellipsed-item">
{% trans "Attributes" context "Dashboard attributes list" %}
</a>
</li>
<li class="back-mobile">
- <a href="{% url 'dashboard:product-attributes' %}">
+ <a href="{% url 'dashboard:attributes' %}">
<svg data-src="{% static "dashboard/images/arrow-left.svg" %}" fill="#fff" width="20px" height="20px" />
</a>
</li>
{% if attribute.pk %}
<li>
- <a href="{% url 'dashboard:product-attribute-details' attribute.pk %}" class="breadcrumbs--ellipsed-item">
+ <a href="{% url 'dashboard:attribute-details' attribute.pk %}" class="breadcrumbs--ellipsed-item">
{{ attribute }}
</a>
</li>
@@ -74,7 +74,7 @@
</div>
</div>
<div class="card-action right-align">
- <a href="{% url 'dashboard:product-attribute-details' pk=attribute.pk %}" class="btn-flat waves-effect">
+ <a href="{% url 'dashboard:attribute-details' pk=attribute.pk %}" class="btn-flat waves-effect">
{% trans "Cancel" context "Dashboard cancel action" %}
</a>
{% if value.pk %}
diff --git a/templates/dashboard/product/product_attribute/values/modal/confirm_delete.html b/templates/dashboard/product/attribute/values/modal/confirm_delete.html
similarity index 87%
rename from templates/dashboard/product/product_attribute/values/modal/confirm_delete.html
rename to templates/dashboard/product/attribute/values/modal/confirm_delete.html
index d18837b9b0..12953f9ec5 100644
--- a/templates/dashboard/product/product_attribute/values/modal/confirm_delete.html
+++ b/templates/dashboard/product/attribute/values/modal/confirm_delete.html
@@ -5,7 +5,7 @@
{% block form_class %}{% endblock %}
{% block action_url %}
-{% url "dashboard:product-attribute-value-delete" attribute_pk=attribute_pk value_pk=value.pk %}
+{% url "dashboard:attribute-value-delete" attribute_pk=attribute_pk value_pk=value.pk %}
{% endblock %}
{% block title %}
diff --git a/templates/dashboard/product/product_attribute/zero_page.html b/templates/dashboard/product/attribute/zero_page.html
similarity index 100%
rename from templates/dashboard/product/product_attribute/zero_page.html
rename to templates/dashboard/product/attribute/zero_page.html
diff --git a/templates/dashboard/sites/authorization_keys/form.html b/templates/dashboard/sites/authorization_keys/form.html
index f3cffd16e8..2f3f4bbb57 100644
--- a/templates/dashboard/sites/authorization_keys/form.html
+++ b/templates/dashboard/sites/authorization_keys/form.html
@@ -30,7 +30,7 @@
</a>
</li>
<li class="back-mobile">
- <a href="{% url 'dashboard:product-attributes' %}">
+ <a href="{% url 'dashboard:attributes' %}">
<svg data-src="{% static "dashboard/images/arrow-left.svg" %}" fill="#fff" width="20px" height="20px" />
</a>
</li>