--- /home/federico/1-6-65a475a9e47b/MoinMoin/PageEditor.py 2007-12-13 01:44:45.000000000 +0200
+++ PageEditor.py 2007-12-13 14:19:57.000000000 +0200
@@ -264,10 +264,12 @@
# Get the text body for the editor field.
# TODO: what about deleted pages? show the text of the last revision or use the template?
+ # XXX: Sort Out
+ msgs = ""
if preview is not None:
raw_body = self.get_raw_body()
if use_draft:
- request.write(_("[Content loaded from draft]", formatted=False), '<br>')
+ msgs = (_("[Content loaded from draft]<br>", formatted=False))
elif self.exists():
# If the page exists, we get the text from the page.
# TODO: maybe warn if template argument was ignored because the page exists?
@@ -278,11 +280,11 @@
if request.user.may.read(template_page):
raw_body = Page(request, template_page).get_raw_body()
if raw_body:
- request.write(_("[Content of new page loaded from %s]", formatted=False) % (template_page,), '<br>')
+ msgs = (_("[Content of new page loaded from %s]<br>", formatted=False) % (template_page))
else:
- request.write(_("[Template %s not found]", formatted=False) % (template_page,), '<br>')
+ msgs = (_("[Template %s not found]<br>", formatted=False) % (template_page))
else:
- request.write(_("[You may not read %s]", formatted=False) % (template_page,), '<br>')
+ msgs = (_("[You may not read %s]<br>", formatted=False) % (template_page))
# Make backup on previews - but not for new empty pages
if not use_draft and preview and raw_body:
@@ -301,11 +303,10 @@
draft_message = _(u"'''<<BR>>Your draft based on revision %(draft_rev)d (saved %(draft_timestamp_str)s) can be loaded instead of the current revision %(page_rev)d by using the load draft button - in case you lost your last edit somehow without saving it.''' A draft gets saved for you when you do a preview, cancel an edit or unsuccessfully save.", formatted=True, percent=True) % locals()
# Setup status message
- status = [kw.get('msg', ''), conflict_msg, edit_lock_message, draft_message]
+ status = [msgs, kw.get('msg', ''), conflict_msg, edit_lock_message, draft_message]
status = [msg for msg in status if msg]
status = ' '.join(status)
status = Status(request, content=status)
-
request.theme.send_title(
title % {'pagename': self.split_title(), },
page=self,