forked from indymedia/epicyon
Adapt to changes from recent merges ['tlfeatures']
- Also tweak some display textalt-html-css
parent
66a96015cd
commit
5d34e0d4be
|
@ -115,17 +115,19 @@ def headerButtonsTimeline(defaultTimeline: str,
|
||||||
'highlightLabel': newReply}
|
'highlightLabel': newReply}
|
||||||
))
|
))
|
||||||
|
|
||||||
if (defaultTimeline == 'tlnews' and boxName in userPages) \
|
if (defaultTimeline == 'tlfeatures' and boxName in userPages) \
|
||||||
or (not defaultTimeline == 'tlnews' and not minimal):
|
or (not defaultTimeline == 'tlfeatures' and not minimal):
|
||||||
activeButtonList.append(('tlnews',
|
activeButtonList.append(('tlnews',
|
||||||
{'pageRef': '/tlnews',
|
{'pageRef': '/tlnews',
|
||||||
'translateText': 'News'}
|
'translateText': 'News'}
|
||||||
))
|
))
|
||||||
# The following translationText should be 'Article' for News instances
|
|
||||||
activeButtonList.append(('tlblogs',
|
activeButtonList.append(('tlblogs',
|
||||||
{'pageRef': '/tlblogs',
|
{'pageRef': '/tlblogs',
|
||||||
'translateText': 'Blogs'}
|
'translateText': 'Blogs'}
|
||||||
))
|
))
|
||||||
|
# The blog translation text should be 'Article' for News instances
|
||||||
|
if defaultTimeline == 'tlfeatures':
|
||||||
|
activeButtonList[-1][1]['translateText'] = 'Article'
|
||||||
activeButtonList.append(('tlmedia',
|
activeButtonList.append(('tlmedia',
|
||||||
{'pageRef': '/tlmedia',
|
{'pageRef': '/tlmedia',
|
||||||
'translateText': 'Media'}
|
'translateText': 'Media'}
|
||||||
|
@ -151,7 +153,7 @@ def headerButtonsTimeline(defaultTimeline: str,
|
||||||
))
|
))
|
||||||
|
|
||||||
# Single out the "instance-type" button, and move to front of list
|
# Single out the "instance-type" button, and move to front of list
|
||||||
# NOTE: Current instance types are: 'tlblogs', 'tlmedia', 'tlnews'
|
# NOTE: Current instance types are: 'tlblogs', 'tlmedia', 'tlfeatures'
|
||||||
for i, (name, config) in enumerate(activeButtonList):
|
for i, (name, config) in enumerate(activeButtonList):
|
||||||
if name == defaultTimeline:
|
if name == defaultTimeline:
|
||||||
tmp = activeButtonList.pop(i)
|
tmp = activeButtonList.pop(i)
|
||||||
|
@ -162,7 +164,7 @@ def headerButtonsTimeline(defaultTimeline: str,
|
||||||
# start of headericons list
|
# start of headericons list
|
||||||
|
|
||||||
# Override iconsAsButtons setting for News instance
|
# Override iconsAsButtons setting for News instance
|
||||||
if defaultTimeline == 'tlnews':
|
if defaultTimeline == 'tlfeatures':
|
||||||
iconsAsButtons = True
|
iconsAsButtons = True
|
||||||
|
|
||||||
# Only append to iconList if necessary
|
# Only append to iconList if necessary
|
||||||
|
@ -224,7 +226,7 @@ def headerButtonsTimeline(defaultTimeline: str,
|
||||||
))
|
))
|
||||||
activeButtonList.append(('links',
|
activeButtonList.append(('links',
|
||||||
{'pageRef': '/linksmobile',
|
{'pageRef': '/linksmobile',
|
||||||
'translateText': 'Edit Links',
|
'translateText': 'Links',
|
||||||
'class': 'mobile-view',
|
'class': 'mobile-view',
|
||||||
'iconClass': 'icon-links'}
|
'iconClass': 'icon-links'}
|
||||||
))
|
))
|
||||||
|
@ -236,7 +238,7 @@ def headerButtonsTimeline(defaultTimeline: str,
|
||||||
{'pageRef': '/newdm',
|
{'pageRef': '/newdm',
|
||||||
'translateText': 'Create a new DM'}
|
'translateText': 'Create a new DM'}
|
||||||
))
|
))
|
||||||
elif boxName == 'tlblogs' or boxName == 'tlnews':
|
elif boxName == 'tlblogs' or boxName == 'tlfeatures':
|
||||||
activeButtonList.append(('newblog',
|
activeButtonList.append(('newblog',
|
||||||
{'pageRef': '/newblog',
|
{'pageRef': '/newblog',
|
||||||
'translateText': 'Create a new post'}
|
'translateText': 'Create a new post'}
|
||||||
|
@ -272,7 +274,7 @@ def headerButtonsTimeline(defaultTimeline: str,
|
||||||
))
|
))
|
||||||
|
|
||||||
# TODO: Less hacky solution - or make sure "settings" button has an icon
|
# TODO: Less hacky solution - or make sure "settings" button has an icon
|
||||||
if defaultTimeline == 'tlnews':
|
if defaultTimeline == 'tlfeatures':
|
||||||
activeButtonList.append(('editprofile',
|
activeButtonList.append(('editprofile',
|
||||||
{'pageRef': '/editprofile',
|
{'pageRef': '/editprofile',
|
||||||
'translateText': 'Settings'}
|
'translateText': 'Settings'}
|
||||||
|
@ -367,13 +369,12 @@ def headerButtonsTimeline(defaultTimeline: str,
|
||||||
def headerNewsTabs(boxName: str,
|
def headerNewsTabs(boxName: str,
|
||||||
translate: {},
|
translate: {},
|
||||||
usersPath: str,
|
usersPath: str,
|
||||||
moderator: bool,
|
|
||||||
baseDir: str,
|
baseDir: str,
|
||||||
userPages: []) -> str:
|
userPages: []) -> str:
|
||||||
navTabList = []
|
navTabList = []
|
||||||
|
|
||||||
navTabList.append(('tlnews',
|
navTabList.append(('tlfeatures',
|
||||||
{'pageRef': '/tlnews',
|
{'pageRef': '/tlfeatures',
|
||||||
'translateText': 'Features'}
|
'translateText': 'Features'}
|
||||||
))
|
))
|
||||||
navTabList.append(('newswiremobile',
|
navTabList.append(('newswiremobile',
|
||||||
|
|
Loading…
Reference in New Issue