limit single number search to documents
This commit is contained in:
parent
ca0c69af5d
commit
7868deb46e
|
@ -124,14 +124,15 @@ class SimpleSearchView(BrowserView):
|
||||||
try:
|
try:
|
||||||
int(search_query)
|
int(search_query)
|
||||||
except ValueError:
|
except ValueError:
|
||||||
kwargs = {'SearchableText': search_query}
|
c = catalog(
|
||||||
else:
|
|
||||||
kwargs = {'nodoc': search_query}
|
|
||||||
c = catalog(
|
|
||||||
portal_type=['tabellio.documents.dossier',
|
portal_type=['tabellio.documents.dossier',
|
||||||
'tabellio.documents.document',
|
'tabellio.documents.document',
|
||||||
'tabellio.documents.question'],
|
'tabellio.documents.question'],
|
||||||
**kwargs)
|
SearchableText=search_query)
|
||||||
|
else:
|
||||||
|
c = catalog(
|
||||||
|
portal_type=['tabellio.documents.document'],
|
||||||
|
nodos=search_query)
|
||||||
if sorton == 'session':
|
if sorton == 'session':
|
||||||
cmpf = cmpfunctions.Cmp().cmp_session
|
cmpf = cmpfunctions.Cmp().cmp_session
|
||||||
elif sorton == 'type':
|
elif sorton == 'type':
|
||||||
|
|
Reference in New Issue