Mercurial > moin > 1.9
changeset 3000:344e33587519
do not show 2 editor links in edit_bar if text editor is forced by admin (port from 1.6)
author | Thomas Waldmann <tw AT waldmann-edv DOT de> |
---|---|
date | Sun, 06 Jan 2008 17:36:13 +0100 |
parents | e94b940f3a84 |
children | ed3e2b220dec |
files | MoinMoin/theme/__init__.py |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/MoinMoin/theme/__init__.py Sun Jan 06 17:32:33 2008 +0100 +++ b/MoinMoin/theme/__init__.py Sun Jan 06 17:36:13 2008 +0100 @@ -1117,8 +1117,12 @@ """ Return whether the gui editor / converter can work for that page. The GUI editor currently only works for wiki format. + For simplicity, we also tell it does not work if the admin forces the text editor. """ - return page.pi['format'] == 'wiki' + is_wiki = page.pi['format'] == 'wiki' + gui_disallowed = self.cfg.editor_force and self.cfg.editor_default == 'text' + return is_wiki and not gui_disallowed + def editorLink(self, page): """ Return a link to the editor