Don't show follow button for new actor

main
Bob Mottram 2020-11-20 12:14:22 +00:00
parent 4c13bcf9d8
commit 6693403433
1 changed files with 23 additions and 19 deletions

View File

@ -225,6 +225,13 @@ def htmlProfileAfterSearch(cssCache: {},
profileDescriptionShort, profileDescriptionShort,
avatarUrl, imageUrl) avatarUrl, imageUrl)
domainFull = domain
if port:
if port != 80 and port != 443:
domainFull = domain + ':' + str(port)
# only show follow and view buttons if this is not the news actor
if not (searchNickname == 'news' and searchDomainFull == domainFull):
profileStr += '<div class="container">\n' profileStr += '<div class="container">\n'
profileStr += ' <form method="POST" action="' + \ profileStr += ' <form method="POST" action="' + \
backUrl + '/followconfirm">\n' backUrl + '/followconfirm">\n'
@ -232,9 +239,6 @@ def htmlProfileAfterSearch(cssCache: {},
profileStr += \ profileStr += \
' <input type="hidden" name="actor" value="' + \ ' <input type="hidden" name="actor" value="' + \
personUrl + '">\n' personUrl + '">\n'
# profileStr += \
# ' <a href="' + backUrl + '"><button class="button">' + \
# translate['Go Back'] + '</button></a>\n'
profileStr += \ profileStr += \
' <button type="submit" class="button" name="submitYes">' + \ ' <button type="submit" class="button" name="submitYes">' + \
translate['Follow'] + '</button>\n' translate['Follow'] + '</button>\n'