changeset 335:e574cc401e89

fixed MoinMoinBugs/IncorrectlyPlacedFootnote. All footnotes are now shown at the very bottom. There is a continuing numbering of all footnotes including the ones on included pages imported from: moin--main--1.5--patch-339
author Florian Festi <Florian.Festi@trick.informatik.uni-stuttgart.de>
date Mon, 19 Dec 2005 08:21:45 +0000
parents 259b384a7ce7
children c39981463fb2
files MoinMoin/Page.py MoinMoin/macro/Include.py docs/CHANGES
diffstat 3 files changed, 7 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/Page.py	Sun Dec 18 20:53:16 2005 +0000
+++ b/MoinMoin/Page.py	Mon Dec 19 08:21:45 2005 +0000
@@ -929,6 +929,7 @@
         @keyword content_id: set the id of the enclosing div
         @keyword count_hit: if 1, add an event to the log
         @keyword send_missing_page: if 1, assume that page to be sent is MissingPage
+        @keyword omit_footnotes: if True, do not send footnotes (used by include macro)
         """
         from MoinMoin import i18n
         request.clock.start('send_page')
@@ -941,9 +942,10 @@
         else:
             media = 'screen'
         content_only = keywords.get('content_only', 0)
+        omit_footnotes = keywords.get('omit_footnotes', 0)
         content_id = keywords.get('content_id', 'content')
         do_cache = keywords.get('do_cache', 1)
-        send_missing_page = keywords.get('send_missing_page', 0)        
+        send_missing_page = keywords.get('send_missing_page', 0)
         self.hilite_re = (keywords.get('hilite_re') or
                           request.form.get('highlight', [None])[0])
         if msg is None: msg = ""
@@ -1212,7 +1214,7 @@
                                    start_line=pi_lines)
 
             # check for pending footnotes
-            if getattr(request, 'footnotes', None):
+            if getattr(request, 'footnotes', None) and not omit_footnotes:
                 from MoinMoin.macro.FootNote import emit_footnotes
                 request.write(emit_footnotes(request, self.formatter))
 
--- a/MoinMoin/macro/Include.py	Sun Dec 18 20:53:16 2005 +0000
+++ b/MoinMoin/macro/Include.py	Mon Dec 19 08:21:45 2005 +0000
@@ -218,7 +218,8 @@
         request.redirect(strfile)
         try:
             cid = request.makeUniqueID("Include_%s" % wikiutil.quoteWikinameURL(inc_page.page_name))
-            inc_page.send_page(request, content_only=1, content_id=cid)
+            inc_page.send_page(request, content_only=1, content_id=cid,
+                               omit_footnotes=True)
             result.append(strfile.getvalue())
         finally:
             request.redirect()
--- a/docs/CHANGES	Sun Dec 18 20:53:16 2005 +0000
+++ b/docs/CHANGES	Mon Dec 19 08:21:45 2005 +0000
@@ -37,7 +37,7 @@
       markup
     * fixed invalid HTML in FootNotes
     * fixed HTML source in EditorBackup after canceling GUI editor
-
+    * Footnotes of included pages are not shown at the bottom of the including page.
 Version 1.5.0beta6:
   Authentication:
     * Added SSO module for PHP based apps. Currently supported: eGroupware 1.2.