diff MoinMoin/apps/admin/views.py @ 92:5ff01f07c67c

admin/interwikihelp view (replaces InterWiki macro)
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Mon, 07 Mar 2011 20:40:19 +0100
parents 2e0766600e8f
children 990fdbe2d52c
line wrap: on
line diff
--- a/MoinMoin/apps/admin/views.py	Mon Mar 07 20:19:03 2011 +0100
+++ b/MoinMoin/apps/admin/views.py	Mon Mar 07 20:40:19 2011 +0100
@@ -1,4 +1,4 @@
-# Copyright: 2008-2011 MoinMoin:ThomasWaldmann
+# Copyright: 2007-2011 MoinMoin:ThomasWaldmann
 # Copyright: 2001-2003 Juergen Hermann <jh@web.de>
 # Copyright: 2008 MoinMoin:JohannesBerg
 # Copyright: 2009 MoinMoin:EugeneSyromyatnikov
@@ -209,3 +209,15 @@
                            headings=headings,
                            rows=rows)
 
+@admin.route('/interwikihelp', methods=['GET', ])
+def interwikihelp():
+    """display a table with list of known interwiki names / urls"""
+    headings = [_('InterWiki name'),
+                _('URL'),
+               ]
+    rows = sorted(app.cfg.interwiki_map.items())
+    return render_template('admin/interwikihelp.html',
+                           item_name="+admin/interwikihelp",
+                           headings=headings,
+                           rows=rows)
+