main
Bob Mottram 2020-10-05 12:40:59 +00:00
parent 94c2bd819e
commit a7c94a006a
1 changed files with 9 additions and 7 deletions

View File

@ -5342,14 +5342,16 @@ def htmlNewswire(newswire: str) -> str:
"""
htmlStr = ''
for dateStr, item in newswire.items():
if len(item) == 2:
htmlStr += '<p class="newswireItem">' + \
'<a href="' + item[1] + '">' + item[0] + '</a>'
elif len(item) > 2:
# if the item is to be moderated then show it in a different style
shown = False
if len(item) > 2:
if item[2].startswith('moderate'):
htmlStr += '<p class="newswireItemModerate">' + \
'<a href="' + item[1] + '">' + item[0] + '</a>'
else:
shown = True
if not shown:
# unmoderated item
htmlStr += '<p class="newswireItem">' + \
'<a href="' + item[1] + '">' + item[0] + '</a>'
htmlStr += ' <label class="newswireDate">'