From 9e61ff0322af7d8861e9f726e0b21264bee2ec72 Mon Sep 17 00:00:00 2001 From: helmutm Date: Mon, 2 Aug 2010 15:03:37 +0000 Subject: [PATCH] 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 --- composer/report/base.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/composer/report/base.py b/composer/report/base.py index dab60e4..1e119db 100644 --- a/composer/report/base.py +++ b/composer/report/base.py @@ -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: