Improve List Sorting UI (#4215)

Improve product list UI (allow move between categories, more useful columns and links)
and hide "move up/down" arrows in lists by default if drag-drop is available
This commit is contained in:
Mira
2024-06-25 12:54:11 +02:00
committed by GitHub
parent 043e2eb9cf
commit a73c4ad937
11 changed files with 176 additions and 75 deletions

View File

@@ -122,6 +122,16 @@ class ItemCategory(LoggedModel):
return _('{category} (Add-On products)').format(category=str(name))
return str(name)
def get_category_type_display(self):
if self.is_addon:
return _('Add-On products')
else:
return None
@property
def category_type(self):
return 'addon' if self.is_addon else 'normal'
def delete(self, *args, **kwargs):
super().delete(*args, **kwargs)
if self.event: