Commit c00685e9 authored by Vincent Pelletier's avatar Vincent Pelletier

Add a new method to Operator interface.

  This allows setting different renderings for SQL and SearchText.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@25814 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent eccba80d
...@@ -66,6 +66,11 @@ class IOperator(Interface): ...@@ -66,6 +66,11 @@ class IOperator(Interface):
def getOperator(): def getOperator():
""" """
Accessor for operator's text representation. Accessor for operator's SQL representation.
"""
def getSearchTextOperator():
"""
Accessor for operator's SearchText representation.
""" """
...@@ -100,12 +100,18 @@ class OperatorBase(object): ...@@ -100,12 +100,18 @@ class OperatorBase(object):
__implements__ = IOperator __implements__ = IOperator
def __init__(self, operator): def __init__(self, operator, operator_search_text=None):
self.operator = operator self.operator = operator
if operator_search_text is None:
operator_search_text = operator
self.operator_search_text = operator_search_text
def getOperator(self): def getOperator(self):
return self.operator return self.operator
def getOperatorSearchText(self):
return self.operator_search_text
@profiler_decorator @profiler_decorator
def _render(self, column, value): def _render(self, column, value):
""" """
......
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