# Bazaar merge directive format 2 (Bazaar 0.90)
# revision_id: paulb@jeremy-20150209122647-h0fazgnl1jdye0ah
# target_branch: http://bazaar.launchpad.net/~jwt/+junk/wikilistorg/
# testament_sha1: 92a06bd7ab3529024cc695008f0eb839e00da229
# timestamp: 2015-02-09 13:36:09 +0100
# base_revision_id: jwt@onjapan.net-20150209105456-bfxvj8wdfr0824zb
# 
# Begin patch
=== modified file 'mailman.py'
--- mailman.py	2015-02-09 10:54:56 +0000
+++ mailman.py	2015-02-09 12:26:47 +0000
@@ -8,12 +8,29 @@
     @license: GNU GPL, see COPYING for details.
 """
 
+from MoinMoin.Page import Page
 from MoinMoin.theme import ThemeBase
 
 class Theme(ThemeBase):
 
     name = "mailman"
 
+    space_links = [
+        ('COM/Home', 'Community'),
+        ('DEV/Home', 'Development'),
+        ('DOC/Home', 'Documentation'),
+        ('SEC/Home', 'Security'),
+        ]
+
+    faq_links = [
+        ('DOC/1 Introduction - What is GNU Mailman?', 'Intro to GNU Mailman'),
+        ('DOC/2 Help for mailing list members', 'Mailing list members'),
+        ('DOC/3 List administrator tasks', 'List administrator tasks'),
+        ('DOC/4 Site administrator tasks', 'Site administrator tasks'),
+        ('DOC/5 Downloading and installing Mailman', 'Downloading and installing'),
+        ('DOC/6 Integration issues (with mail or web servers)', 'Integrating with mail and web servers'),
+    ]
+
     def html_head(self, d):
         # add favicon
         return ThemeBase.html_head(self, d) + '<link rel="shortcut icon" href="%s/mailman/img/favicon.ico">' % (self.cfg.url_prefix_static)
@@ -26,30 +43,32 @@
     def spaces(self):
         """ shortcuts to Spaces
         """
-        html = [
-            u'<ul id="spaces">',
-            u'<li><a href="/COM">Community</a></li>',
-            u'<li><a href="/DEV">Development</a></li>',
-            u'<li><a href="/DOC">Documentation</a></li>',
-            u'<li><a href="/SEC">Security</a></li>',
-            u'</ul>',
-        ]
-        return u'\n'.join(html)
+        return self.sidebar_list("spaces", self.space_links)
 
     def faq(self):
         """ shortcuts to FAQs
         """
-        html = [
-            u'<ul id="faqs">',
-            u'<li><a href="/DOC/1%20Introduction%20-%20What%20is%20GNU%20Mailman%3F">Intro to GNU Mailman</a></li>',
-            u'<li><a href="/DOC/2%20Help%20for%20mailing%20list%20members">Mailing list members</a></li>',
-            u'<li><a href="/DOC/3%20List%20administrator%20tasks">List administrator tasks</a></li>',
-            u'<li><a href="/DOC/4%20Site%20administrator%20tasks">Site administrator tasks</a></li>',
-            u'<li><a href="/DOC/5%20Downloading%20and%20installing%20Mailman">Downloading and installing</a></li>',
-            u'<li><a href="/DOC/6%20Integration%20issues%20%28with%20mail%20or%20web%20servers%29">Integrating with mail and web servers</a></li>',
-            u'</ul>',
-        ]
-        return u'\n'.join(html)
+        return self.sidebar_list("faqs", self.faq_links)
+
+    def sidebar_list(self, list_id, links):
+        """ shortcuts in a list for the given links
+        """
+        request = self.request
+        fmt = request.formatter
+
+        html = []
+        append = html.append
+
+        append(fmt.bullet_list(on=1, id=list_id))
+
+        for pagename, label in links:
+            page = Page(request, pagename)
+            append(fmt.listitem(on=1))
+            append(page.link_to(request, label))
+            append(fmt.listitem(on=0))
+
+        append(fmt.bullet_list(on=0))
+        return u''.join(html)
 
     def sidebar(self, d):
         """ list.org-like sidebar

# Begin bundle
IyBCYXphYXIgcmV2aXNpb24gYnVuZGxlIHY0CiMKQlpoOTFBWSZTWW+9fKgAAmBfgERQUOf//97n
y4q////wUAWO4rt3uo9717czewekQCUUyCT0aBG1NpNlMj1D1PKYCeoaNGgACUgjCMjFU8ap6mj1
GEADQYjQNGAglCaEnkJPSn6pvVHtSYhp+qbU0ANAGhtQNAkSEEj9U9TFPU9I0080kHpA9I09QMgA
AJJARo0JkEaZpFA02p6nqHommNQAB6jUREz2FXYvthlrhdGb9sa4MXDAOe83a6qgXHj4UwchbC6C
sookcuqVMaYYa3bOnIhJEJJYCL8v2w6+Ftoh1JBdjTVPC7Qa+C8zPgrG0tPxx1G7WcdVaXfD7L11
6O7zsmL4KthwX9UuiW+zf2M9eJsq2sSrIXnZro3j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