propose to do a full text search if not result were found (#1055)
parent
569f2b9e89
commit
f3b88bf17e
|
@ -28,10 +28,10 @@
|
|||
page_batch python:Batch(list(page_results), b_size, int(b_page_start), orphan=1, b_start_str='b_page_start');
|
||||
doc_batch python:Batch(list(doc_results), b_size, int(b_doc_start), orphan=1, b_start_str='b_doc_start');
|
||||
event_batch python:Batch(list(event_results), b_size, int(b_event_start), orphan=1, b_start_str='b_event_start');
|
||||
searchable_text python: request.form.get('SearchableText');
|
||||
">
|
||||
<form method="get" action="search2">
|
||||
<input name="SearchableText" type="text"
|
||||
tal:attributes="value python: request.form.get('SearchableText')"/>
|
||||
<input name="SearchableText" type="text" tal:attributes="value searchable_text"/>
|
||||
<input type="submit" class="submit-widget" value="Recherche"/>
|
||||
</form>
|
||||
|
||||
|
@ -71,6 +71,25 @@
|
|||
|
||||
</div>
|
||||
|
||||
<div id="docs-results" tal:condition="python:len(doc_results) == 0 and searchable_text">
|
||||
<h2 id="b_doc_start">Documents et dossiers</h2>
|
||||
<div class="resultsinfobox">
|
||||
<span>Nombre de résultats : <span tal:replace="python:len(doc_results)"/></span>
|
||||
<a class="button" tal:attributes="href view/docdos_form_url">Filtre avancé</a>
|
||||
</div>
|
||||
|
||||
<p>
|
||||
Aucun document n'a été trouvé lors d'une recherche simple, il est possible
|
||||
d'effectuer la recherche dans les textes des documents, cela peut prendre
|
||||
quelques dizaines de secondes.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<a tal:attributes="href string:${view/docdos_form_url}?document.widgets.sort_on:list=Session&document.widgets.search_type_is_document=1&document.widgets.text=${searchable_text}">Recherche appronfondie dans les textes</a>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="docs-results" tal:condition="python:len(doc_results)">
|
||||
<h2 id="b_doc_start">Documents et dossiers</h2>
|
||||
<div class="resultsinfobox">
|
||||
|
|
Reference in New Issue