[Checkins] SVN: Products.CMFDefault/trunk/Products/CMFDefault/browser/search/ Copyrights and docstrings added.
Charlie Clark
charlie at begeistert.org
Thu Oct 7 06:07:42 EDT 2010
Log message for revision 117328:
Copyrights and docstrings added.
Changed:
U Products.CMFDefault/trunk/Products/CMFDefault/browser/search/interfaces.py
U Products.CMFDefault/trunk/Products/CMFDefault/browser/search/search.py
U Products.CMFDefault/trunk/Products/CMFDefault/browser/search/vocab.py
-=-
Modified: Products.CMFDefault/trunk/Products/CMFDefault/browser/search/interfaces.py
===================================================================
--- Products.CMFDefault/trunk/Products/CMFDefault/browser/search/interfaces.py 2010-10-07 09:43:13 UTC (rev 117327)
+++ Products.CMFDefault/trunk/Products/CMFDefault/browser/search/interfaces.py 2010-10-07 10:07:41 UTC (rev 117328)
@@ -1,3 +1,16 @@
+##############################################################################
+#
+# Copyright (c) 2010 Zope Foundation and Contributors.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+"""Search Form Schema"""
from datetime import date
@@ -70,4 +83,3 @@
u"exactly.")),
required=False
)
-
Modified: Products.CMFDefault/trunk/Products/CMFDefault/browser/search/search.py
===================================================================
--- Products.CMFDefault/trunk/Products/CMFDefault/browser/search/search.py 2010-10-07 09:43:13 UTC (rev 117327)
+++ Products.CMFDefault/trunk/Products/CMFDefault/browser/search/search.py 2010-10-07 10:07:41 UTC (rev 117328)
@@ -10,6 +10,18 @@
# FOR A PARTICULAR PURPOSE.
#
##############################################################################
+##############################################################################
+#
+# Copyright (c) 2010 Zope Foundation and Contributors.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
"""Search views"""
from zope.interface import Interface
@@ -25,6 +37,7 @@
from interfaces import ISearchSchema
class Search(EditFormBase):
+ """Portal Search Form"""
template = ViewPageTemplateFile("search.pt")
form_fields = form.FormFields(ISearchSchema)
@@ -47,4 +60,4 @@
return self._getTool('portal_types')
def handle_search(self, action, data):
- pass
\ No newline at end of file
+ pass
Modified: Products.CMFDefault/trunk/Products/CMFDefault/browser/search/vocab.py
===================================================================
--- Products.CMFDefault/trunk/Products/CMFDefault/browser/search/vocab.py 2010-10-07 09:43:13 UTC (rev 117327)
+++ Products.CMFDefault/trunk/Products/CMFDefault/browser/search/vocab.py 2010-10-07 10:07:41 UTC (rev 117328)
@@ -1,3 +1,16 @@
+##############################################################################
+#
+# Copyright (c) 2010 Zope Foundation and Contributors.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+##############################################################################
+"""Vocabularies for portal search form"""
from datetime import date, timedelta
@@ -9,18 +22,21 @@
from Products.CMFCore.utils import MessageFactory as _
def status_vocab(context):
+ """Provides a list of workflow states"""
catalog = getToolByName(context, 'portal_catalog')
values = [((u'--any--'), "None")]
values += [(v, v) for v in catalog.uniqueValuesFor('review_state')]
return SimpleVocabulary.fromItems(values)
def subject_vocab(context):
+ """Provides a list of subject keywords"""
catalog = getToolByName(context, 'portal_catalog')
values = [((u'--any--'), "None")]
values += [(v, v) for v in catalog.uniqueValuesFor('Subject')]
return SimpleVocabulary.fromItems(values)
def date_vocab(context):
+ """Provides a list of dates for searching with"""
mtool = getToolByName(context, 'portal_membership')
dates = [SimpleTerm(date(1970, 1, 1), date(1970, 1, 1), 'Ever')]
if not mtool.isAnonymousUser():
@@ -51,6 +67,7 @@
return SimpleVocabulary(dates)
def type_vocab(context):
+ """Provides a list of portal types"""
ttool = getToolByName(context, 'portal_types')
types = ttool.listTypeInfo()
terms = [SimpleTerm(None, None, '--any--')]
More information about the checkins
mailing list