[Erp5-report] r7060 - /erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal...
nobody at svn.erp5.org
nobody at svn.erp5.org
Wed May 3 14:41:59 CEST 2006
Author: jerome
Date: Wed May 3 14:41:54 2006
New Revision: 7060
URL: http://svn.erp5.org?rev=7060&view=rev
Log:
Fix undefined name error (from Bartek Gorny)
Modified:
erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_FormatDate.xml
Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_FormatDate.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_FormatDate.xml?rev=7060&r1=7059&r2=7060&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_FormatDate.xml (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_FormatDate.xml Wed May 3 14:41:54 2006
@@ -68,30 +68,29 @@
<key> <string>_body</string> </key>
<value> <string>""" Format the date according to current user preferences."""\n
\n
-if not date :\n
+if not date:\n
return \'\'\n
\n
-try :\n
+try:\n
order = context.getPortalObject().portal_preferences.getPreferredDateOrder()\n
-except AttributeError :\n
+except AttributeError:\n
order = \'ymd\'\n
\n
y = date.year()\n
m = date.month()\n
d = date.day()\n
\n
-result = "%04d/%02d/%02d" % (y, m, d)\n
-if order == \'ymd\':\n
+if order == \'dmy\':\n
+ result = "%02d/%02d/%04d" % (d, m, y)\n
+elif order == \'mdy\':\n
+ result = "%02d/%02d/%04d" % (m, d, y)\n
+else: # ymd is default\n
result = "%04d/%02d/%02d" % (y, m, d)\n
-elif order == \'dmy\':\n
- result = "%02d/%02d/%04d" % (d, m, y)\n
-elif input_order == \'mdy\':\n
- result = "%02d/%02d/%04d" % (m, d, y)\n
\n
-if hour_minute or seconds : \n
- if seconds :\n
+if hour_minute or seconds:\n
+ if seconds:\n
hour_minute_text = "%02dh%02dmn%02ds" % (date.hour(), date.minute(), date.second())\n
- else : \n
+ else:\n
hour_minute_text = "%02dh%02dmn" % (date.hour(), date.minute())\n
result = context.Base_translateString("${date} at ${hour_minute_text}", \n
mapping = {\'date\' : result, \'hour_minute_text\' : hour_minute_text })\n
@@ -148,14 +147,13 @@
<string>hour_minute</string>
<string>seconds</string>
<string>_getattr_</string>
-<string>context</string>
+ <string>context</string>
<string>order</string>
<string>AttributeError</string>
<string>y</string>
<string>m</string>
<string>d</string>
<string>result</string>
- <string>input_order</string>
<string>hour_minute_text</string>
</tuple>
</value>
More information about the Erp5-report
mailing list