Add 'discontinued' flag to product view
Also, don't render product description as link if it's empty
This commit is contained in:
parent
2002031e41
commit
b3599d8241
2 changed files with 3 additions and 1 deletions
|
@ -82,7 +82,7 @@ class DescriptionFieldRenderer(fa.TextFieldRenderer):
|
|||
description = self.raw_value
|
||||
if description is None:
|
||||
return ''
|
||||
if kwargs.get('link'):
|
||||
if kwargs.get('link') and description:
|
||||
product = self.field.parent.model
|
||||
description = tags.link_to(description, kwargs['link'](product))
|
||||
return description
|
||||
|
@ -314,6 +314,7 @@ class ProductsView(MasterView):
|
|||
fs.not_for_sale,
|
||||
fs.ingredients,
|
||||
fs.notes,
|
||||
fs.discontinued,
|
||||
fs.deleted,
|
||||
fs.last_sold,
|
||||
])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue