mirror of https://gitlab.com/bashrc2/epicyon
Fix remove button on wanted items
parent
e919cd0387
commit
753a42d508
|
@ -161,8 +161,8 @@ def _htmlSharesResult(baseDir: str,
|
|||
searchStrLowerList: [], currPage: int, ctr: int,
|
||||
callingDomain: str, httpPrefix: str, domainFull: str,
|
||||
contactNickname: str, actor: str,
|
||||
resultsExist: bool, searchStrLower: str,
|
||||
translate: {}) -> (bool, int, int, str):
|
||||
resultsExist: bool, searchStrLower: str, translate: {},
|
||||
sharesFileType: str) -> (bool, int, int, str):
|
||||
"""Result for shared items search
|
||||
"""
|
||||
sharedItemsForm = ''
|
||||
|
@ -177,7 +177,7 @@ def _htmlSharesResult(baseDir: str,
|
|||
htmlSearchResultShare(baseDir, sharedItem, translate,
|
||||
httpPrefix, domainFull,
|
||||
contactNickname,
|
||||
name, actor)
|
||||
name, actor, sharesFileType)
|
||||
if not resultsExist and currPage > 1:
|
||||
# show the previous page button
|
||||
sharedItemsForm += \
|
||||
|
@ -259,7 +259,8 @@ def htmlSearchSharedItems(cssCache: {}, translate: {},
|
|||
domainFull,
|
||||
contactNickname,
|
||||
actor, resultsExist,
|
||||
searchStrLower, translate)
|
||||
searchStrLower, translate,
|
||||
sharesFileType)
|
||||
sharedItemsForm += resultStr
|
||||
|
||||
if currPage > pageNumber:
|
||||
|
@ -296,7 +297,8 @@ def htmlSearchSharedItems(cssCache: {}, translate: {},
|
|||
domainFull,
|
||||
contactNickname,
|
||||
actor, resultsExist,
|
||||
searchStrLower, translate)
|
||||
searchStrLower, translate,
|
||||
sharesFileType)
|
||||
sharedItemsForm += resultStr
|
||||
|
||||
if currPage > pageNumber:
|
||||
|
|
|
@ -1273,7 +1273,7 @@ def editTextArea(label: str, name: str, value: str = "",
|
|||
def htmlSearchResultShare(baseDir: str, sharedItem: {}, translate: {},
|
||||
httpPrefix: str, domainFull: str,
|
||||
contactNickname: str, itemID: str,
|
||||
actor: str) -> str:
|
||||
actor: str, sharesFileType: str) -> str:
|
||||
"""Returns the html for an individual shared item
|
||||
"""
|
||||
sharedItemsForm = '<div class="container">\n'
|
||||
|
@ -1334,10 +1334,16 @@ def htmlSearchResultShare(baseDir: str, sharedItem: {}, translate: {},
|
|||
showRemoveButton = True
|
||||
|
||||
if showRemoveButton:
|
||||
sharedItemsForm += \
|
||||
' <a href="' + actor + '?rmshare=' + \
|
||||
itemID + '"><button class="button">' + \
|
||||
translate['Remove'] + '</button></a>\n'
|
||||
if sharesFileType == 'shares':
|
||||
sharedItemsForm += \
|
||||
' <a href="' + actor + '?rmshare=' + \
|
||||
itemID + '"><button class="button">' + \
|
||||
translate['Remove'] + '</button></a>\n'
|
||||
else:
|
||||
sharedItemsForm += \
|
||||
' <a href="' + actor + '?rmwanted=' + \
|
||||
itemID + '"><button class="button">' + \
|
||||
translate['Remove'] + '</button></a>\n'
|
||||
sharedItemsForm += '</p></div>\n'
|
||||
return sharedItemsForm
|
||||
|
||||
|
@ -1412,7 +1418,7 @@ def htmlShowShare(baseDir: str, domain: str, nickname: str,
|
|||
shareStr += \
|
||||
htmlSearchResultShare(baseDir, sharedItem, translate, httpPrefix,
|
||||
domainFull, contactNickname, itemID,
|
||||
actor)
|
||||
actor, sharesFileType)
|
||||
|
||||
cssFilename = baseDir + '/epicyon-profile.css'
|
||||
if os.path.isfile(baseDir + '/epicyon.css'):
|
||||
|
|
Loading…
Reference in New Issue