Show page numbers

main
Bob Mottram 2021-09-24 18:32:23 +01:00
parent 772a1ea02e
commit c60f3a335b
1 changed files with 5 additions and 2 deletions

View File

@ -399,7 +399,6 @@ def _pageNumberButtons(usersPath: str, boxName: str, pageNumber: int) -> str:
"""Shows selactable page numbers at the bottom of the screen
"""
pagesWidth = 4
pagesStr = '<center>'
minPageNumber = pageNumber - pagesWidth
if minPageNumber < 1:
minPageNumber = 1
@ -414,7 +413,7 @@ def _pageNumberButtons(usersPath: str, boxName: str, pageNumber: int) -> str:
numStr += \
'<a href="' + usersPath + '/' + boxName + '?page=' + \
str(page) + '" class="pageslist">' + pageStr + '</a>'
pagesStr += '</center>'
pagesStr += '<center>' + numStr + '</center>'
return pagesStr
@ -1065,6 +1064,8 @@ def _htmlSharesTimeline(translate: {}, pageNumber: int, itemsPerPage: int,
timelineStr = ''
if pageNumber > 1:
timelineStr += \
_pageNumberButtons(actor, 'tl' + sharesFileType, pageNumber)
timelineStr += \
' <center>\n' + \
' <a href="' + actor + '/tl' + sharesFileType + '?page=' + \
@ -1113,6 +1114,8 @@ def _htmlSharesTimeline(translate: {}, pageNumber: int, itemsPerPage: int,
'icons/pagedown.png" title="' + translate['Page down'] + \
'" alt="' + translate['Page down'] + '"></a>\n' + \
' </center>\n'
timelineStr += \
_pageNumberButtons(actor, 'tl' + sharesFileType, pageNumber)
return timelineStr