Add publish button

main
Bob Mottram 2020-10-16 13:52:03 +01:00
parent 0735ceceb2
commit 3b430d6780
16 changed files with 43 additions and 20 deletions

View File

@ -309,5 +309,6 @@
"Edit News Post": "تحرير منشور الأخبار",
"A list of editor nicknames. One per line.": "قائمة بأسماء المحرر. واحد في كل سطر.",
"Site Editors": "محررو الموقع",
"Allow news posts": "السماح بنشر الأخبار"
"Allow news posts": "السماح بنشر الأخبار",
"Publish": "ينشر"
}

View File

@ -309,5 +309,6 @@
"Edit News Post": "Edita la publicació de notícies",
"A list of editor nicknames. One per line.": "Una llista de sobrenoms de l'editor. Un per línia.",
"Site Editors": "Editors de llocs",
"Allow news posts": "Permet publicacions de notícies"
"Allow news posts": "Permet publicacions de notícies",
"Publish": "Publica"
}

View File

@ -309,5 +309,6 @@
"Edit News Post": "Golygu News News",
"A list of editor nicknames. One per line.": "Rhestr o lysenwau golygydd. Un i bob llinell.",
"Site Editors": "Golygyddion Safle",
"Allow news posts": "Caniatáu swyddi newyddion"
"Allow news posts": "Caniatáu swyddi newyddion",
"Publish": "Cyhoeddi"
}

View File

@ -309,5 +309,6 @@
"Edit News Post": "Nachrichtenbeitrag bearbeiten",
"A list of editor nicknames. One per line.": "Eine Liste der Editor-Spitznamen. Eine pro Zeile.",
"Site Editors": "Site-Editoren",
"Allow news posts": "Nachrichtenbeiträge zulassen"
"Allow news posts": "Nachrichtenbeiträge zulassen",
"Publish": "Veröffentlichen"
}

View File

@ -309,5 +309,6 @@
"Edit News Post": "Edit News Post",
"A list of editor nicknames. One per line.": "A list of editor nicknames. One per line.",
"Site Editors": "Site Editors",
"Allow news posts": "Allow news posts"
"Allow news posts": "Allow news posts",
"Publish": "Publish"
}

View File

@ -309,5 +309,6 @@
"Edit News Post": "Editar publicación de noticias",
"A list of editor nicknames. One per line.": "Una lista de apodos de los editores. Uno por línea.",
"Site Editors": "Editores del sitio",
"Allow news posts": "Permitir publicaciones de noticias"
"Allow news posts": "Permitir publicaciones de noticias",
"Publish": "Publicar"
}

View File

@ -309,5 +309,6 @@
"Edit News Post": "Modifier l'article d'actualité",
"A list of editor nicknames. One per line.": "Une liste de surnoms d'éditeur. Un par ligne.",
"Site Editors": "Éditeurs du site",
"Allow news posts": "Autoriser les articles d'actualité"
"Allow news posts": "Autoriser les articles d'actualité",
"Publish": "Publier"
}

View File

@ -309,5 +309,6 @@
"Edit News Post": "Cuir News Post in eagar",
"A list of editor nicknames. One per line.": "Liosta leasainmneacha eagarthóra. Ceann in aghaidh na líne.",
"Site Editors": "Eagarthóirí Suímh",
"Allow news posts": "Ceadaigh poist nuachta"
"Allow news posts": "Ceadaigh poist nuachta",
"Publish": "Fhoilsiú"
}

View File

@ -309,5 +309,6 @@
"Edit News Post": "समाचार पोस्ट संपादित करें",
"A list of editor nicknames. One per line.": "संपादक उपनामों की एक सूची। प्रति पंक्ति एक।",
"Site Editors": "साइट संपादकों",
"Allow news posts": "समाचार पोस्ट की अनुमति दें"
"Allow news posts": "समाचार पोस्ट की अनुमति दें",
"Publish": "प्रकाशित करना"
}

View File

@ -309,5 +309,6 @@
"Edit News Post": "Modifica post di notizie",
"A list of editor nicknames. One per line.": "Un elenco di soprannomi dell'editor. Uno per riga.",
"Site Editors": "Editori del sito",
"Allow news posts": "Consenti post di notizie"
"Allow news posts": "Consenti post di notizie",
"Publish": "Pubblicare"
}

View File

@ -309,5 +309,6 @@
"Edit News Post": "ニュース投稿を編集する",
"A list of editor nicknames. One per line.": "編集者のニックネームのリスト。 1行に1つ。",
"Site Editors": "サイト編集者",
"Allow news posts": "ニュース投稿を許可する"
"Allow news posts": "ニュース投稿を許可する",
"Publish": "公開する"
}

View File

@ -305,5 +305,6 @@
"Edit News Post": "Edit News Post",
"A list of editor nicknames. One per line.": "A list of editor nicknames. One per line.",
"Site Editors": "Site Editors",
"Allow news posts": "Allow news posts"
"Allow news posts": "Allow news posts",
"Publish": "Publish"
}

View File

@ -309,5 +309,6 @@
"Edit News Post": "Editar Postagem de Notícias",
"A list of editor nicknames. One per line.": "Uma lista de apelidos de editores. Um por linha.",
"Site Editors": "Editores do site",
"Allow news posts": "Permitir postagens de notícias"
"Allow news posts": "Permitir postagens de notícias",
"Publish": "Publicar"
}

View File

@ -309,5 +309,6 @@
"Edit News Post": "Редактировать новость",
"A list of editor nicknames. One per line.": "Список ников редакторов. По одному на строку.",
"Site Editors": "Редакторы сайта",
"Allow news posts": "Разрешить публикации новостей"
"Allow news posts": "Разрешить публикации новостей",
"Publish": "Публиковать"
}

View File

@ -309,5 +309,6 @@
"Edit News Post": "编辑新闻帖子",
"A list of editor nicknames. One per line.": "编辑者昵称列表。 每行一个。",
"Site Editors": "网站编辑",
"Allow news posts": "允许新闻发布"
"Allow news posts": "允许新闻发布",
"Publish": "发布"
}

View File

@ -3568,7 +3568,7 @@ def htmlProfile(defaultTimeline: str,
httpPrefix, translate,
iconsDir, False, False,
newswire, False,
False, None)
False, None, False)
profileFooterStr += ' </td>\n'
profileFooterStr += ' </tr>\n'
profileFooterStr += ' </tbody>\n'
@ -5589,7 +5589,7 @@ def votesIndicator(totalVotes: int, positiveVoting: bool) -> str:
return totalVotesStr
def htmlNewswire(newswire: str, nickname: str, moderator: bool,
def htmlNewswire(newswire: {}, nickname: str, moderator: bool,
translate: {}, positiveVoting: bool, iconsDir: str) -> str:
"""Converts a newswire dict into html
"""
@ -5660,7 +5660,8 @@ def getRightColumnContent(baseDir: str, nickname: str, domainFull: str,
httpPrefix: str, translate: {},
iconsDir: str, moderator: bool, editor: bool,
newswire: {}, positiveVoting: bool,
showBackButton: bool, timelinePath: str) -> str:
showBackButton: bool, timelinePath: str,
showPublishButton: bool) -> str:
"""Returns html content for the right column
"""
htmlStr = ''
@ -5703,6 +5704,13 @@ def getRightColumnContent(baseDir: str, nickname: str, domainFull: str,
'<button class="cancelbtn">' + \
translate['Go Back'] + '</button></a>\n'
if showPublishButton:
htmlStr += \
' <a href="' + \
'/users/' + nickname + '/newblog">' + \
'<button class="button">' + \
translate['Publish'] + '</button></a>\n'
if editor:
if os.path.isfile(baseDir + '/accounts/newswiremoderation.txt'):
# show the edit icon highlighted
@ -5820,7 +5828,7 @@ def htmlNewswireMobile(baseDir: str, nickname: str,
httpPrefix, translate,
iconsDir, moderator, editor,
newswire, positiveVoting,
True, timelinePath)
True, timelinePath, True)
htmlStr += htmlFooter()
return htmlStr
@ -6507,7 +6515,7 @@ def htmlTimeline(defaultTimeline: str,
httpPrefix, translate, iconsDir,
moderator, editor,
newswire, positiveVoting,
False, None)
False, None, True)
tlStr += ' <td valign="top" class="col-right">' + \
rightColumnStr + ' </td>\n'
tlStr += ' </tr>\n'