forked from indymedia/epicyon
Adapt to changes from recent merges ['tlfeatures']
parent
bd0c75ed7b
commit
66a96015cd
|
@ -125,6 +125,8 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str,
|
|||
if timeDiff > 100:
|
||||
print('TIMELINE TIMING ' + boxName + ' 3 = ' + str(timeDiff))
|
||||
|
||||
# NOTE: This uses a variant function for multiple CSS files
|
||||
# TODO: Figure out a better approach
|
||||
tlStr = htmlHeaderWithExternalStyles(cssFiles)
|
||||
|
||||
# benchmark 4
|
||||
|
@ -134,9 +136,9 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str,
|
|||
|
||||
_logTimelineTiming(enableTimingLog, timelineStartTime, boxName, '4')
|
||||
|
||||
# if this is a news instance and we are viewing the news timeline
|
||||
# if this is a 'News' instance and we are viewing the features timeline
|
||||
newsHeader = False
|
||||
if defaultTimeline == 'tlfeatures' and boxName == 'tlfeatures':
|
||||
if defaultTimeline == 'tlfeatures':# and boxName == 'tlfeatures':
|
||||
newsHeader = True
|
||||
|
||||
# Banner and "profile toggle" link
|
||||
|
@ -153,8 +155,8 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str,
|
|||
else:
|
||||
# TODO: News instances should ignore personalised banners
|
||||
# Currently uses the 'news' actor banner - as it remains unchanged
|
||||
tlStr += (f"\t<a class=\"timeline-banner hidden-text\" href=\"/tlnews\">"
|
||||
f"{translate['News']}</a>\n"
|
||||
tlStr += (f"\t<a class=\"timeline-banner hidden-text\" href=\"/users/{nickname}/tlfeatures\">"
|
||||
f"{translate['Features']}</a>\n"
|
||||
f"\t<div class=\"title\">\n"
|
||||
f"\t\t<span>#IndymediaBack</span>\n"
|
||||
f"\t</div>\n")
|
||||
|
@ -164,14 +166,15 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str,
|
|||
|
||||
|
||||
# Certain Epciyon pages should only be accessible via the 'User' page for News instances
|
||||
# TODO: The 'new...' pages appear to require handling elsewhere
|
||||
userPages = ['inbox', 'outbox', 'dm', 'tlreplies', 'tlblogs', 'tlmedia', 'tlshares', \
|
||||
'tlsaves', 'tlevents', 'tlbookmarks', 'moderation', 'search', \
|
||||
'followers', 'newfollowers']
|
||||
'followers', 'newfollowers', 'newdm', 'newpost', 'newblog', 'newevent']
|
||||
|
||||
# Full row "navbar"
|
||||
if defaultTimeline == 'tlnews':
|
||||
if defaultTimeline == 'tlfeatures':
|
||||
# Show "tab" links instead of standard "buttons"
|
||||
tlStr += headerNewsTabs(boxName, translate, usersPath, moderator, baseDir, userPages)
|
||||
tlStr += headerNewsTabs(boxName, translate, usersPath, baseDir, userPages)
|
||||
|
||||
# Close banner div
|
||||
tlStr += '</div>\n'
|
||||
|
@ -187,15 +190,18 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str,
|
|||
manuallyApproveFollowers,
|
||||
baseDir, nickname,
|
||||
domain, timelineStartTime,
|
||||
iconsAsButtons)
|
||||
iconsAsButtons, userPages)
|
||||
else:
|
||||
# Close banner div
|
||||
tlStr += '</div>\n'
|
||||
|
||||
# start the timeline
|
||||
tlStr += '<div class="timeline">\n'
|
||||
|
||||
domainFull = getFullDomain(domain, port)
|
||||
|
||||
# Only show standard "buttons" on 'inbox' page
|
||||
if defaultTimeline == 'tlnews' and boxName in userPages:
|
||||
# For 'News' instances, only show standard "buttons" on "user" pages
|
||||
if defaultTimeline == 'tlfeatures' and boxName in userPages:
|
||||
tlStr += \
|
||||
headerButtonsTimeline(defaultTimeline, boxName, pageNumber,
|
||||
translate, usersPath,
|
||||
|
@ -218,7 +224,7 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str,
|
|||
# center column containing posts
|
||||
tlStr += ' <div class="section main">\n'
|
||||
|
||||
if not defaultTimeline == 'tlnews' and not fullWidthTimelineButtonHeader:
|
||||
if not defaultTimeline == 'tlfeatures' and not fullWidthTimelineButtonHeader:
|
||||
tlStr += \
|
||||
headerButtonsTimeline(defaultTimeline, boxName, pageNumber,
|
||||
translate, usersPath,
|
||||
|
@ -226,7 +232,7 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str,
|
|||
manuallyApproveFollowers,
|
||||
baseDir, nickname,
|
||||
domain, timelineStartTime,
|
||||
iconsAsButtons)
|
||||
iconsAsButtons, userPages)
|
||||
|
||||
# second row of buttons for moderator actions
|
||||
if moderator and boxName == 'moderation':
|
||||
|
@ -399,7 +405,7 @@ def htmlTimeline(cssCache: {}, defaultTimeline: str,
|
|||
# end of column-center
|
||||
tlStr += ' </div>\n'
|
||||
|
||||
if defaultTimeline == 'tlnews' and boxName not in userPages:
|
||||
if defaultTimeline == 'tlfeatures' and boxName not in userPages:
|
||||
# right column
|
||||
rightColumnStr = getRightColumnContent(baseDir, nickname, domainFull,
|
||||
httpPrefix, translate, iconsPath,
|
||||
|
|
Loading…
Reference in New Issue