Less verbose date link

merge-requests/8/head
Bob Mottram 2020-10-06 20:32:31 +01:00
parent 92bac79367
commit 20d3a93be8
1 changed files with 5 additions and 3 deletions

View File

@ -5344,6 +5344,8 @@ def htmlNewswire(newswire: str, nickname: str, moderator: bool) -> str:
"""
htmlStr = ''
for dateStr, item in newswire.items():
dateStrLink = dateStr.replace(' ', 'T')
dateStrLink = dateStrLink.replace('+00:00', '')
if 'vote:' + nickname in item[2]:
htmlStr += '<p class="newswireItemApproved">' + \
'<a href="' + item[1] + '">' + item[0] + '</a>'
@ -5351,9 +5353,9 @@ def htmlNewswire(newswire: str, nickname: str, moderator: bool) -> str:
htmlStr += \
' ' + \
'<a href="/users/' + nickname + \
'/newswireunvote=' + dateStr.replace(' ', 'T') + '">' + \
'/newswireunvote=' + dateStrLink + '">' + \
'<label class="newswireDateApproved">'
htmlStr += dateStr.replace('+00:00', '') + '</label></a></p>'
htmlStr += dateStr + '</label></a></p>'
else:
htmlStr += ' <label class="newswireDateApproved">'
htmlStr += dateStr.replace('+00:00', '') + '</label></p>'
@ -5364,7 +5366,7 @@ def htmlNewswire(newswire: str, nickname: str, moderator: bool) -> str:
htmlStr += \
' ' + \
'<a href="/users/' + nickname + \
'/newswirevote=' + dateStr.replace(' ', 'T') + '">' + \
'/newswirevote=' + dateStrLink + '">' + \
'<label class="newswireDate">'
htmlStr += dateStr.replace('+00:00', '') + '</label></a></p>'
else: