Optional location

main
Bob Mottram 2021-07-27 20:23:55 +01:00
parent 82f51299b7
commit f9012cd948
2 changed files with 9 additions and 6 deletions

View File

@ -108,6 +108,7 @@ def _matchSharedItem(searchStrLowerList: [],
"""
for searchSubstr in searchStrLowerList:
searchSubstr = searchSubstr.strip()
if sharedItem.get('location'):
if searchSubstr in sharedItem['location'].lower():
return True
elif searchSubstr in sharedItem['summary'].lower():
@ -143,6 +144,7 @@ def _htmlSearchResultShare(sharedItem: {}, translate: {},
'<b>' + translate['Type'] + ':</b> ' + sharedItem['itemType'] + ' '
sharedItemsForm += \
'<b>' + translate['Category'] + ':</b> ' + sharedItem['category'] + ' '
if sharedItem.get('location'):
sharedItemsForm += \
'<b>' + translate['Location'] + ':</b> ' + sharedItem['location']
if sharedItem.get('itemPrice') and \

View File

@ -833,6 +833,7 @@ def htmlIndividualShare(actor: str, item: {}, translate: {},
'<b>' + translate['Type'] + ':</b> ' + item['itemType'] + ' '
profileStr += \
'<b>' + translate['Category'] + ':</b> ' + item['category'] + ' '
if item.get('location'):
profileStr += \
'<b>' + translate['Location'] + ':</b> ' + item['location']
if item.get('itemPrice') and item.get('itemCurrency'):