provide operations for showing selection criteria on reports

git-svn-id: svn://svn.cy55.de/Zope3/src/cybertools/trunk@3931 fd906abe-77d9-0310-91a1-e0d9ade77398
This commit is contained in:
helmutm 2010-08-02 15:03:37 +00:00
parent c22acae02d
commit 9e61ff0322

View file

@ -163,6 +163,18 @@ class LeafQueryCriteria(BaseQueryCriteria, Element):
#print '***', self.field.name, value, op, self.comparisonValue
return op(value, self.comparisonValue)
def showComparisonValue(self):
if self.field.fieldType == 'selection':
return ', '.join([v for v in self.comparisonValue])
return self.comparisonValue
def showOperator(self):
op = self.operator
for item in self.field.operators:
if item['token'] == op:
return item['label']
return op
def checkOnly(value, compValue):
if not value: