Counting items

main
Bob Mottram 2019-11-17 15:38:46 +00:00
parent 939f6da220
commit 9e72ec29ac
1 changed files with 2 additions and 2 deletions

View File

@ -2559,7 +2559,6 @@ def htmlTimeline(translate: {},pageNumber: int, \
for item in timelineJson['orderedItems']: for item in timelineJson['orderedItems']:
if item['type']=='Create' or item['type']=='Announce': if item['type']=='Create' or item['type']=='Announce':
#avatarUrl=getPersonAvatarUrl(baseDir,item['actor'],personCache) #avatarUrl=getPersonAvatarUrl(baseDir,item['actor'],personCache)
itemCtr+=1
currTlStr= \ currTlStr= \
individualPostAsHtml(iconsDir,translate,pageNumber, \ individualPostAsHtml(iconsDir,translate,pageNumber, \
baseDir,session,wfRequest,personCache, \ baseDir,session,wfRequest,personCache, \
@ -2571,12 +2570,13 @@ def htmlTimeline(translate: {},pageNumber: int, \
manuallyApproveFollowers,False,True) manuallyApproveFollowers,False,True)
if currTlStr: if currTlStr:
itemCtr+=1
tlStr+=currTlStr tlStr+=currTlStr
if boxName=='tlmedia': if boxName=='tlmedia':
tlStr+='</div>\n' tlStr+='</div>\n'
# page down arrow # page down arrow
if itemCtr>1: if itemCtr>int(itemsPerPage/2):
tlStr+='<center><a href="'+actor+'/'+boxName+'?page='+str(pageNumber+1)+'"><img loading="lazy" class="pageicon" src="/'+iconsDir+'/pagedown.png" title="'+translate['Page down']+'" alt="'+translate['Page down']+'"></a></center>' tlStr+='<center><a href="'+actor+'/'+boxName+'?page='+str(pageNumber+1)+'"><img loading="lazy" class="pageicon" src="/'+iconsDir+'/pagedown.png" title="'+translate['Page down']+'" alt="'+translate['Page down']+'"></a></center>'
tlStr+=htmlFooter() tlStr+=htmlFooter()
return tlStr return tlStr