Skip to content
This repository has been archived by the owner on Dec 17, 2020. It is now read-only.

Commit

Permalink
Don't expose the IContentsSearch interface in the zec.contents.interf…
Browse files Browse the repository at this point in the history
…ace API

this is just specific to the existing form and not reusable.
Only forms have to define it's own search pattern and the required fields.
  • Loading branch information
projekt01 committed Apr 12, 2008
1 parent d678c2b commit 35934fb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 15 deletions.
6 changes: 5 additions & 1 deletion src/z3c/contents/browser.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,11 @@ def safeGetAttr(obj, attr, default):
class ContentsSearchForm(form.Form):

template = getPageTemplate()
fields = field.Fields(interfaces.IContentsSearch)
fields = field.Fields(field.Field(
zope.schema.TextLine(
title=_(u'Search'),
description=_('Search term'),
default=u''), 'searchterm'))
prefix = 'search'
table = None
ignoreContext = True
Expand Down
14 changes: 0 additions & 14 deletions src/z3c/contents/interfaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,6 @@ class IContentsPage(interfaces.ITable):
"""Container management page."""


class IContentsSearch(zope.interface.Interface):
"""We would like to provide a search field for searching within the
container.
Possible addition here could be a choice field to search within specific
columns.
"""

searchterm = zope.schema.TextLine(
title=_(u'Search'),
description=_('Search term'),
default=u'')


class ISearch(zope.interface.Interface):
"""
Search support for containers.
Expand Down

0 comments on commit 35934fb

Please sign in to comment.