From 64b8404ff8c0dd63f8414d882aeab2e74df63a90 Mon Sep 17 00:00:00 2001 From: Yoshinori Okuji <yo@nexedi.com> Date: Wed, 4 Aug 2004 11:43:47 +0000 Subject: [PATCH] Initial import. git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@1315 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5/skins/erp5_core/listDict.py | 26 ++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100755 product/ERP5/skins/erp5_core/listDict.py diff --git a/product/ERP5/skins/erp5_core/listDict.py b/product/ERP5/skins/erp5_core/listDict.py new file mode 100755 index 0000000000..014458780c --- /dev/null +++ b/product/ERP5/skins/erp5_core/listDict.py @@ -0,0 +1,26 @@ +## Script (Python) "listDict" +##bind container=container +##bind context=context +##bind namespace= +##bind script=script +##bind subpath=traverse_subpath +##parameters= +##title= +## +ret = '<html><body><table width=100%>\n' + +dict = context.showDict().items() +dict.sort() +i = 0 +for k,v in dict: + if (i % 2) == 0: + c = '#88dddd' + else: + c = '#dddd88' + i += 1 + ret += '<tr bgcolor="%s"><td >%s</td><td>%s</td></tr>\n' % (c, k, repr(v)) + +ret += '</table></body></html>\n' + +return ret + -- 2.30.9