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
|
@ -59,6 +59,7 @@
|
|||
${render_field_readonly(form.fieldset.special_order)}
|
||||
${render_field_readonly(form.fieldset.organic)}
|
||||
${render_field_readonly(form.fieldset.not_for_sale)}
|
||||
${render_field_readonly(form.fieldset.discontinued)}
|
||||
${render_field_readonly(form.fieldset.deleted)}
|
||||
</%def>
|
||||
|
||||
|
|
|
@ -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…
Reference in a new issue