diff MoinMoin/macro/WantedPages.py @ 1347:b65614f8a393

use page.link_to(_raw) more often
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sun, 20 Aug 2006 16:59:51 +0200
parents 4eb66637ccd0
children fdb726f0f34f
line wrap: on
line diff
--- a/MoinMoin/macro/WantedPages.py	Sun Aug 20 15:51:08 2006 +0200
+++ b/MoinMoin/macro/WantedPages.py	Sun Aug 20 16:59:51 2006 +0200
@@ -23,13 +23,9 @@
 
     # Control bar - filter the list of pages
     # TODO: we should make this a widget and use on all page listing pages
-    controlbar = '''<div class="controlbar">
-<a href="%(qpagename)s?allpages=%(allpages)d">%(label)s</a>
-</div>''' % {
-        'qpagename': wikiutil.quoteWikinameURL(macro.formatter.page.page_name),
-        'allpages': not allpages,
-        'label': (_('Include system pages'), _('Exclude system pages'))[allpages],
-    }
+    label = (_('Include system pages'), _('Exclude system pages'))[allpages]
+    page = macro.formatter.page
+    controlbar = '<div class="controlbar">%s</div>' % page.link_to(request, label, querystr={'allpages': '%d' % allpages and '0' or '1'})
 
     # Get page dict readable by current user
     pages = request.rootpage.getPageDict()