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