Don't show quantity for single items

main
Bob Mottram 2021-07-27 21:31:14 +01:00
parent 51ff7f8126
commit 65ee4a6cee
2 changed files with 8 additions and 6 deletions

View File

@ -137,9 +137,10 @@ def _htmlSearchResultShare(sharedItem: {}, translate: {},
'" alt="Item image"></a>\n'
sharedItemsForm += '<p>' + sharedItem['summary'] + '</p>\n<p>'
if sharedItem.get('itemQty'):
sharedItemsForm += \
'<b>' + translate['Quantity'] + \
':</b> ' + str(sharedItem['itemQty']) + '<br>'
if sharedItem['itemQty'] > 1:
sharedItemsForm += \
'<b>' + translate['Quantity'] + \
':</b> ' + str(sharedItem['itemQty']) + '<br>'
sharedItemsForm += \
'<b>' + translate['Type'] + ':</b> ' + sharedItem['itemType'] + '<br>'
sharedItemsForm += \

View File

@ -826,9 +826,10 @@ def htmlIndividualShare(actor: str, item: {}, translate: {},
'" alt="' + translate['Item image'] + '">\n</a>\n'
profileStr += '<p>' + item['summary'] + '</p>\n<p>'
if item.get('itemQty'):
profileStr += \
'<b>' + translate['Quantity'] + ':</b> ' + \
str(item['itemQty']) + '<br>'
if item['itemQty'] > 1:
profileStr += \
'<b>' + translate['Quantity'] + ':</b> ' + \
str(item['itemQty']) + '<br>'
profileStr += \
'<b>' + translate['Type'] + ':</b> ' + item['itemType'] + '<br>'
profileStr += \