Saleor Core: the high performance, composable, headless commerce API.
Python cartcheckoutcommercecomposablee-commerceecommercegraphqlheadlessheadless-commercemultichannelomsorder-managementpaymentspimpythonshopshopping-cartstore
Move 'is_hidden' column after 'description'
michale8a1e4771545
diff --git a/saleor/dashboard/category/filters.py b/saleor/dashboard/category/filters.pyindex 55d922d815..d116d2f5df 100644--- a/saleor/dashboard/category/filters.py+++ b/saleor/dashboard/category/filters.py@@ -20,15 +20,16 @@ IS_HIDDEN_CHOICES = (class CategoryFilter(SortedFilterSet):name = CharFilter(- label=pgettext_lazy('Product list filter label', 'Name'),+ label=pgettext_lazy('Category list filter label', 'Name'),lookup_expr='icontains')is_hidden = ChoiceFilter(- label=pgettext_lazy('Product list filter label', 'Is published'),+ label=pgettext_lazy(+ 'Category list filter label', 'Is hidden in site navigation'),choices=IS_HIDDEN_CHOICES,empty_label=pgettext_lazy('Filter empty choice label', 'All'),widget=forms.Select)sort_by = OrderingFilter(- label=pgettext_lazy('Product list sorting filter label', 'Sort by'),+ label=pgettext_lazy('Category list sorting filter label', 'Sort by'),fields=SORT_BY_FIELDS.keys(),field_labels=SORT_BY_FIELDS)diff --git a/templates/dashboard/category/detail.html b/templates/dashboard/category/detail.htmlindex da9f8d27da..2d43587847 100644--- a/templates/dashboard/category/detail.html+++ b/templates/dashboard/category/detail.html@@ -140,18 +140,18 @@{% trans "Name" context "Category list table header name" %}</a></th>- {% get_sort_by_toggle 'is_hidden' as toggle %}- <th class="{% if toggle.is_active %}active{% endif %}">+ {% get_sort_by_toggle 'description' as toggle %}+ <th class="wide {% if toggle.is_active %}active{% endif %}"><a href="{{ toggle.url }}"><svg data-src="{{ toggle.sorting_icon }}" />- {% trans "Is hidden" context "Category list table header hidden" %}+ {% trans "Description" context "Category list table header description" %}</a></th>- {% get_sort_by_toggle 'description' as toggle %}- <th class="wide {% if toggle.is_active %}active{% endif %}">+ {% get_sort_by_toggle 'is_hidden' as toggle %}+ <th class="{% if toggle.is_active %}active{% endif %}"><a href="{{ toggle.url }}"><svg data-src="{{ toggle.sorting_icon }}" />- {% trans "Description" context "Category list table header description" %}+ {% trans "Is hidden" context "Category list table header hidden" %}</a></th><th></th>@@ -163,6 +163,13 @@<td>{{ node.name }}</td>+ <td class="nowrap">+ {% if node.description %}+ {{ node.description|truncatewords:10 }}+ {% else %}+ + {% endif %}+ </td><td>{% if node.is_hidden %}<span>@@ -172,13 +179,6 @@-{% endif %}</td>- <td class="nowrap">- {% if node.description %}- {{ node.description|truncatewords:10 }}- {% else %}- - {% endif %}- </td>{% if perms.product.edit_category %}<td class="right-align ignore-link"><a href="{% url 'dashboard:category-edit' root_pk=node.pk %}" class="btn btn-flat">diff --git a/templates/dashboard/category/list.html b/templates/dashboard/category/list.htmlindex 01cb582de9..dfcc2c2659 100644--- a/templates/dashboard/category/list.html+++ b/templates/dashboard/category/list.html@@ -57,18 +57,18 @@{% trans "Name" context "Category list table header name" %}</a></th>- {% get_sort_by_toggle 'is_hidden' as toggle %}- <th class="{% if toggle.is_active %}active{% endif %}">+ {% get_sort_by_toggle 'description' as toggle %}+ <th class="wide {% if toggle.is_active %}active{% endif %}"><a href="{{ toggle.url }}"><svg data-src="{{ toggle.sorting_icon }}" />- {% trans "Is hidden" context "Category list table header hidden" %}+ {% trans "Description" context "Category list table header description" %}</a></th>- {% get_sort_by_toggle 'description' as toggle %}- <th class="wide {% if toggle.is_active %}active{% endif %}">+ {% get_sort_by_toggle 'is_hidden' as toggle %}+ <th class="{% if toggle.is_active %}active{% endif %}"><a href="{{ toggle.url }}"><svg data-src="{{ toggle.sorting_icon }}" />- {% trans "Description" context "Category list table header description" %}+ {% trans "Is hidden" context "Category list table header hidden" %}</a></th></thead>@@ -78,6 +78,13 @@<td>{{ node.name }}</td>+ <td class="nowrap">+ {% if node.description %}+ {{ node.description|truncatewords:10 }}+ {% else %}+ + {% endif %}+ </td><td>{% if node.is_hidden %}<span>@@ -87,13 +94,6 @@-{% endif %}</td>- <td class="nowrap">- {% if node.description %}- {{ node.description|truncatewords:10 }}- {% else %}- - {% endif %}- </td></tr>{% endfor %}</tbody>