changeset 349:33cb55aaa955

CollectLists: keyword align introduced
author Reimar Bauer <rb.proj AT googlemail DOT com>
date Tue, 03 Feb 2009 19:03:28 +0100
parents d3547d33dd32
children 2eda7e0194e5
files data/plugin/macro/CollectLists.py
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/data/plugin/macro/CollectLists.py	Tue Feb 03 18:47:27 2009 +0100
+++ b/data/plugin/macro/CollectLists.py	Tue Feb 03 19:03:28 2009 +0100
@@ -27,6 +27,7 @@
 Dependencies = ["pages"]
 
 def macro_CollectLists(macro, pagename=unicode,
+                      align=("left", "center", "right"),
                       column_heading=u'', template=u'',
                       transpose=False,
                       filter_pattern=u'.*',
@@ -75,7 +76,7 @@
 
     data = TupleDataset()
     data.columns = []
-    data.columns.extend([Column(pagename.strip('/'), label=pagename.strip('/'), align='center')])
+    data.columns.extend([Column(pagename.strip('/'), label=pagename.strip('/'), align=align)])
 
     if transpose:
         data.addRow([pagename.strip('/')] + column_heading_keys)
@@ -105,7 +106,7 @@
         if tmp_string and search_result:
             data.addRow([link] + row)
         if transpose:
-            data.columns.extend([Column(link, label=link, align='center')])
+            data.columns.extend([Column(link, label=link, align=align)])
 
     if transpose:
         data.data = map(None, zip(*data.data))
@@ -118,7 +119,7 @@
                 if key in filtercols:
                     data.columns.append(Column(key, autofilter=(key in filtercols)))
                 else:
-                    data.columns.extend([Column(key, label=key, align='center')])
+                    data.columns.extend([Column(key, label=key, align=align)])
 
     table = DataBrowserWidget(request)
     table.setData(data)