Bugfix webdav. CF bug #1071431 sur launchpad.net.
[Plinn.git] / skins / content / dateCriterionResolvedDescription.py
1 ##parameters=
2 items = context.getCriteriaItems()
3 if items :
4 from Products.Plinn.utils import translate
5 _ = lambda msg: translate(msg, context)
6
7 rec = items[0][1]
8
9 query = rec['query']
10 range = rec['range']
11
12 strftime = lambda d : d.strftime(context.locale_date_fmt())
13
14 if range == 'max' :
15 return _("search from the beginning of the world until %s") % strftime(query)
16 elif range == 'min' :
17 return _("search from %s and the end of the world") % strftime(query)
18 elif range == 'min:max' :
19 return _("search between %s and %s") % (strftime(query[0]), strftime(query[1]))
20 else :
21 return context.Description()