mirror of https://gitlab.com/bashrc2/epicyon
Less verbose date link
parent
92bac79367
commit
20d3a93be8
|
@ -5344,6 +5344,8 @@ def htmlNewswire(newswire: str, nickname: str, moderator: bool) -> str:
|
||||||
"""
|
"""
|
||||||
htmlStr = ''
|
htmlStr = ''
|
||||||
for dateStr, item in newswire.items():
|
for dateStr, item in newswire.items():
|
||||||
|
dateStrLink = dateStr.replace(' ', 'T')
|
||||||
|
dateStrLink = dateStrLink.replace('+00:00', '')
|
||||||
if 'vote:' + nickname in item[2]:
|
if 'vote:' + nickname in item[2]:
|
||||||
htmlStr += '<p class="newswireItemApproved">' + \
|
htmlStr += '<p class="newswireItemApproved">' + \
|
||||||
'<a href="' + item[1] + '">' + item[0] + '</a>'
|
'<a href="' + item[1] + '">' + item[0] + '</a>'
|
||||||
|
@ -5351,9 +5353,9 @@ def htmlNewswire(newswire: str, nickname: str, moderator: bool) -> str:
|
||||||
htmlStr += \
|
htmlStr += \
|
||||||
' ' + \
|
' ' + \
|
||||||
'<a href="/users/' + nickname + \
|
'<a href="/users/' + nickname + \
|
||||||
'/newswireunvote=' + dateStr.replace(' ', 'T') + '">' + \
|
'/newswireunvote=' + dateStrLink + '">' + \
|
||||||
'<label class="newswireDateApproved">'
|
'<label class="newswireDateApproved">'
|
||||||
htmlStr += dateStr.replace('+00:00', '') + '</label></a></p>'
|
htmlStr += dateStr + '</label></a></p>'
|
||||||
else:
|
else:
|
||||||
htmlStr += ' <label class="newswireDateApproved">'
|
htmlStr += ' <label class="newswireDateApproved">'
|
||||||
htmlStr += dateStr.replace('+00:00', '') + '</label></p>'
|
htmlStr += dateStr.replace('+00:00', '') + '</label></p>'
|
||||||
|
@ -5364,7 +5366,7 @@ def htmlNewswire(newswire: str, nickname: str, moderator: bool) -> str:
|
||||||
htmlStr += \
|
htmlStr += \
|
||||||
' ' + \
|
' ' + \
|
||||||
'<a href="/users/' + nickname + \
|
'<a href="/users/' + nickname + \
|
||||||
'/newswirevote=' + dateStr.replace(' ', 'T') + '">' + \
|
'/newswirevote=' + dateStrLink + '">' + \
|
||||||
'<label class="newswireDate">'
|
'<label class="newswireDate">'
|
||||||
htmlStr += dateStr.replace('+00:00', '') + '</label></a></p>'
|
htmlStr += dateStr.replace('+00:00', '') + '</label></a></p>'
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue