main
Bob Mottram 2020-12-01 10:01:11 +00:00
parent 8161af2795
commit 2a93d6ee64
1 changed files with 8 additions and 9 deletions

View File

@ -316,6 +316,7 @@ def getEditIconHtml(baseDir: str, nickname: str, domainFull: str,
if '/statuses/' in postId: if '/statuses/' in postId:
if isBlogPost(postJsonObject): if isBlogPost(postJsonObject):
editBlogPostStr = translate['Edit blog post']
if not isNewsPost(postJsonObject): if not isNewsPost(postJsonObject):
editStr += \ editStr += \
' ' + \ ' ' + \
@ -324,10 +325,9 @@ def getEditIconHtml(baseDir: str, nickname: str, domainFull: str,
'/tlblogs?editblogpost=' + \ '/tlblogs?editblogpost=' + \
postId.split('/statuses/')[1] + \ postId.split('/statuses/')[1] + \
'?actor=' + actorNickname + \ '?actor=' + actorNickname + \
'" title="' + translate['Edit blog post'] + '">' + \ '" title="' + editBlogPostStr + '">' + \
'<img loading="lazy" title="' + \ '<img loading="lazy" title="' + \
translate['Edit blog post'] + '" alt="' + \ editBlogPostStr + '" alt="' + editBlogPostStr + \
translate['Edit blog post'] + \
' |" src="/' + iconsPath + '/edit.png"/></a>\n' ' |" src="/' + iconsPath + '/edit.png"/></a>\n'
else: else:
editStr += \ editStr += \
@ -336,22 +336,21 @@ def getEditIconHtml(baseDir: str, nickname: str, domainFull: str,
nickname + '/editnewspost=' + \ nickname + '/editnewspost=' + \
postId.split('/statuses/')[1] + \ postId.split('/statuses/')[1] + \
'?actor=' + actorNickname + \ '?actor=' + actorNickname + \
'" title="' + translate['Edit blog post'] + '">' + \ '" title="' + editBlogPostStr + '">' + \
'<img loading="lazy" title="' + \ '<img loading="lazy" title="' + \
translate['Edit blog post'] + '" alt="' + \ editBlogPostStr + '" alt="' + editBlogPostStr + \
translate['Edit blog post'] + \
' |" src="/' + iconsPath + '/edit.png"/></a>\n' ' |" src="/' + iconsPath + '/edit.png"/></a>\n'
elif isEvent: elif isEvent:
editEventStr = translate['Edit event']
editStr += \ editStr += \
' ' + \ ' ' + \
'<a class="imageAnchor" href="/users/' + nickname + \ '<a class="imageAnchor" href="/users/' + nickname + \
'/tlblogs?editeventpost=' + \ '/tlblogs?editeventpost=' + \
postId.split('/statuses/')[1] + \ postId.split('/statuses/')[1] + \
'?actor=' + actorNickname + \ '?actor=' + actorNickname + \
'" title="' + translate['Edit event'] + '">' + \ '" title="' + editEventStr + '">' + \
'<img loading="lazy" title="' + \ '<img loading="lazy" title="' + \
translate['Edit event'] + '" alt="' + \ editEventStr + '" alt="' + editEventStr + \
translate['Edit event'] + \
' |" src="/' + iconsPath + '/edit.png"/></a>\n' ' |" src="/' + iconsPath + '/edit.png"/></a>\n'
return editStr return editStr