Commit 68491dc9 authored by Jérome Perrin's avatar Jérome Perrin

Make DateTime's columns a bit larger

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@14165 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 19f94456
...@@ -68,7 +68,9 @@ ...@@ -68,7 +68,9 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string># if REQUEST.other contains ${form_id}/${listbox_id}/ListBox_getColumnWithDict\n <value> <string>from DateTime import DateTime\n
\n
# if REQUEST.other contains ${form_id}/${listbox_id}/ListBox_getColumnWithDict\n
# magic key, this will be used as column width, instead of calculating.\n # magic key, this will be used as column width, instead of calculating.\n
if listbox is not None:\n if listbox is not None:\n
cache = context.REQUEST.other.get(\n cache = context.REQUEST.other.get(\n
...@@ -151,7 +153,9 @@ for listboxline in listboxline_list:\n ...@@ -151,7 +153,9 @@ for listboxline in listboxline_list:\n
col_count = 0\n col_count = 0\n
for column_id, column_property in listboxline.getColumnItemList():\n for column_id, column_property in listboxline.getColumnItemList():\n
if isinstance(column_property, number):\n if isinstance(column_property, number):\n
string_property = "%s++++++" % (column_property)\n string_property = "%s+++" % (column_property)\n
elif isinstance(column_property, DateTime):\n
string_property = column_property.strftime(\'%Y/%m/%d++\')\n
else:\n else:\n
string_property = str(column_property or \'\')\n string_property = str(column_property or \'\')\n
if listboxline.isStatLine():\n if listboxline.isStatLine():\n
...@@ -224,6 +228,7 @@ return result\n ...@@ -224,6 +228,7 @@ return result\n
<string>frame_width</string> <string>frame_width</string>
<string>section_width</string> <string>section_width</string>
<string>listbox</string> <string>listbox</string>
<string>DateTime</string>
<string>None</string> <string>None</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string> <string>context</string>
......
26 28
\ No newline at end of file \ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment