mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-14 13:33:14 +00:00
New Adv Search
This commit is contained in:
@@ -602,177 +602,141 @@
|
||||
<input onclick="reset_adv_search();" type="button" value="{% trans 'Re-initialiser' %}" class="input-button"/>
|
||||
</div>
|
||||
<div>
|
||||
<table>
|
||||
<tr>
|
||||
<td>
|
||||
<label>
|
||||
{% trans 'Chercher tous les mots' %}
|
||||
</label>
|
||||
</td>
|
||||
<td>
|
||||
<input style="width:150px;" name="query_all" type="text" value="" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<label>
|
||||
{% trans 'Cette expression exacte' %}
|
||||
</label>
|
||||
</td>
|
||||
<td>
|
||||
<input style="width:150px;" name="query_exact" type="text" value="" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<label>
|
||||
{% trans 'Au moins un des mots suivants' %}
|
||||
</label>
|
||||
</td>
|
||||
<td>
|
||||
<input style="width:150px;" name="query_or" type="text" value="" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<label>
|
||||
{% trans 'Aucun des mots suivants' %}
|
||||
</label>
|
||||
</td>
|
||||
<td>
|
||||
<input style="width:150px;" name="query_none" type="text" value="" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div>
|
||||
<div class="sbasglob ui-corner-all">
|
||||
<div style="text-align:center;margin:0 10px;">
|
||||
<input class="input-button" type="button"
|
||||
value="{% trans 'boutton:: selectionner toutes les bases' %}" onclick="checkBases(true);"/>
|
||||
<input class="input-button" type="button"
|
||||
value="{% trans 'boutton:: selectionner aucune base' %}" onclick="checkBases(false);"/>
|
||||
</div>
|
||||
{{_self.bas_list(module_prod, search_datas)}}
|
||||
</div>
|
||||
<div id="sbasfiltercont" class="ui-corner-all">
|
||||
<div>
|
||||
{% if registry.get('GV_sphinx') %}
|
||||
{% trans 'Trier par ' %}
|
||||
<select name="sort">
|
||||
<option value="relevance">{% trans 'pertinence'%}</option>
|
||||
<option value="created_on">{% trans 'date dajout'%}</option>
|
||||
<option value="random">{% trans 'aleatoire'%}</option>
|
||||
</select>
|
||||
<select name="ord">
|
||||
<option value="desc">{% trans 'descendant'%}</option>
|
||||
<option value="asc">{% trans 'ascendant'%}</option>
|
||||
</select>
|
||||
<input type="checkbox" checked="checked" name="stemme" /> {% trans 'rechercher par stemme' %}
|
||||
{% else %}
|
||||
{% trans 'Trier par ' %}
|
||||
<select name="sort">
|
||||
<option value=""></option>
|
||||
{% for field_id, field in search_datas['fields'] %}
|
||||
{% if field['type'] == 'date' %}
|
||||
<option class="field_switch field_{{field['sbas']|implode(' field_')}}" value="{{field_id}}">{{field['fieldname']}}</option>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</select>
|
||||
<select name="ord">
|
||||
<option value="desc">{% trans 'descendant'%}</option>
|
||||
<option value="asc">{% trans 'ascendant'%}</option>
|
||||
</select>
|
||||
<input type="hidden" name="ord" id="searchOrd" value="PHRASEA_ORDER_DESC" />
|
||||
{% endif %}
|
||||
<div class="field_filter">
|
||||
<div>
|
||||
{% trans 'Les termes apparaissent dans le(s) champs' %}
|
||||
<table style="widtg:100%;table-layout:fixed;">
|
||||
<tr>
|
||||
<td style="width:50%;vertical-align:top;">
|
||||
<div class="sbasglob ui-corner-all">
|
||||
<div style="text-align:center;margin:0 10px;">
|
||||
<input class="input-button" type="button"
|
||||
value="{% trans 'boutton:: selectionner toutes les bases' %}" onclick="checkBases(true);"/>
|
||||
<input class="input-button" type="button"
|
||||
value="{% trans 'boutton:: selectionner aucune base' %}" onclick="checkBases(false);"/>
|
||||
</div>
|
||||
{{_self.bas_list(module_prod, search_datas)}}
|
||||
</div>
|
||||
<select size="8" multiple onchange="checkFilters(true);" name="fields[]" style="vertical-align:middle;width:100%;">
|
||||
<option value="phraseanet--all--fields">{% trans 'rechercher dans tous les champs' %}</option>
|
||||
{% for field_id, field in search_datas['fields'] %}
|
||||
{% if field['type'] != 'date' %}
|
||||
<option class="field_switch field_{{field['sbas']|implode(' field_')}}" value="{{field_id}}">{{field['fieldname']}}</option>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
{% set status_length = search_status|length %}
|
||||
{% if status_length > 0 %}
|
||||
|
||||
<div style="margin:5px 0;">
|
||||
<hr/>
|
||||
</div>
|
||||
<div class="status_filter">
|
||||
|
||||
<div>
|
||||
{% trans 'Status des documents a rechercher' %}
|
||||
</div>
|
||||
<table>
|
||||
{% for n, stat in search_status %}
|
||||
{% for s in stat %}
|
||||
<tr>
|
||||
<td>
|
||||
{% if s['imgoff'] %}
|
||||
<img src="{{s['imgoff']}}" title="{{s['labeloff']}}" />
|
||||
{% endif %}
|
||||
<input onchange="checkFilters(true);" class="field_switch field_{{s['sbas']|implode('field_')}}"
|
||||
type="checkbox" value="{{s['sbas']|implode(' field_')}}"
|
||||
n="{{n}}" name="status[{{n}}][off][]"/><label>{{s['labeloff']}}</label>
|
||||
</td>
|
||||
<td>
|
||||
{% if s['imgoff'] %}
|
||||
<img src="{{s['imgon']}}" title="{{s['labelon']}}" />
|
||||
{% endif %}
|
||||
<input onchange="checkFilters(true);" class="field_switch field_{{s['sbas']|implode('field_')}}"
|
||||
type="checkbox" value="{{s['sbas']|implode(' field_')}}"
|
||||
n="{{n}}" name="status[{{n}}][on][]"/><label>{{s['labelon']}}</label>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
</table>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% set dates_length = search_datas['dates']|length %}
|
||||
{% if dates_length > 0 %}
|
||||
<div style="margin:5px 0;">
|
||||
<hr/>
|
||||
</div>
|
||||
<div class="date_filter">
|
||||
<div>{% trans 'Rechercher dans un champ date' %}</div>
|
||||
<table>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<select name="datefield">
|
||||
{% for field_id, field in search_datas['dates'] %}
|
||||
<option onchange="checkFilters(true);"
|
||||
class="field_switch field_{{field['sbas']|implode(' field_')}}" value="{{field_id}}">{{field['fieldname']}}</option>
|
||||
{% endfor %}
|
||||
<option value="{{search_datas['dates']|array_keys|implode('|')}}" selected="selected">
|
||||
{% trans 'rechercher dans tous les champs' %}
|
||||
</option>
|
||||
</td>
|
||||
<td style="width:50%;vertical-align:top;">
|
||||
<div id="sbasfiltercont" class="ui-corner-all">
|
||||
<div>
|
||||
{% if registry.get('GV_sphinx') %}
|
||||
{% trans 'Trier par ' %}
|
||||
<select name="sort">
|
||||
<option value="relevance">{% trans 'pertinence'%}</option>
|
||||
<option value="created_on">{% trans 'date dajout'%}</option>
|
||||
<option value="random">{% trans 'aleatoire'%}</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{% trans 'phraseanet::time:: de' %}
|
||||
<input onchange="checkFilters(true);" class="datepicker" type="text" name="datemin">
|
||||
</td>
|
||||
<td>
|
||||
{% trans 'phraseanet::time:: a' %}
|
||||
<input onchange="checkFilters(true);" class="datepicker" type="text" name="datemax">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<select name="ord">
|
||||
<option value="desc">{% trans 'descendant'%}</option>
|
||||
<option value="asc">{% trans 'ascendant'%}</option>
|
||||
</select>
|
||||
<input type="checkbox" checked="checked" name="stemme" /> {% trans 'rechercher par stemme' %}
|
||||
{% else %}
|
||||
{% trans 'Trier par ' %}
|
||||
<select name="sort">
|
||||
<option value=""></option>
|
||||
{% for field_id, field in search_datas['fields'] %}
|
||||
{% if field['type'] == 'date' %}
|
||||
<option class="field_switch field_{{field['sbas']|implode(' field_')}}" value="{{field_id}}">{{field['fieldname']}}</option>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</select>
|
||||
<select name="ord">
|
||||
<option value="desc">{% trans 'descendant'%}</option>
|
||||
<option value="asc">{% trans 'ascendant'%}</option>
|
||||
</select>
|
||||
<input type="hidden" name="ord" id="searchOrd" value="PHRASEA_ORDER_DESC" />
|
||||
{% endif %}
|
||||
<div class="field_filter">
|
||||
<div>
|
||||
{% trans 'Les termes apparaissent dans le(s) champs' %}
|
||||
</div>
|
||||
<select size="8" multiple onchange="checkFilters(true);" name="fields[]" style="vertical-align:middle;width:100%;">
|
||||
<option value="phraseanet--all--fields">{% trans 'rechercher dans tous les champs' %}</option>
|
||||
{% for field_id, field in search_datas['fields'] %}
|
||||
{% if field['type'] != 'date' %}
|
||||
<option class="field_switch field_{{field['sbas']|implode(' field_')}}" value="{{field_id}}">{{field['fieldname']}}</option>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
{% set status_length = search_status|length %}
|
||||
{% if status_length > 0 %}
|
||||
|
||||
<div style="margin:5px 0;">
|
||||
<hr/>
|
||||
</div>
|
||||
<div class="status_filter">
|
||||
|
||||
<div>
|
||||
{% trans 'Status des documents a rechercher' %}
|
||||
</div>
|
||||
<table>
|
||||
{% for n, stat in search_status %}
|
||||
{% for s in stat %}
|
||||
<tr>
|
||||
<td>
|
||||
{% if s['imgoff'] %}
|
||||
<img src="{{s['imgoff']}}" title="{{s['labeloff']}}" />
|
||||
{% endif %}
|
||||
<input onchange="checkFilters(true);" class="field_switch field_{{s['sbas']|implode('field_')}}"
|
||||
type="checkbox" value="{{s['sbas']|implode(' field_')}}"
|
||||
n="{{n}}" name="status[{{n}}][off][]"/><label>{{s['labeloff']}}</label>
|
||||
</td>
|
||||
<td>
|
||||
{% if s['imgoff'] %}
|
||||
<img src="{{s['imgon']}}" title="{{s['labelon']}}" />
|
||||
{% endif %}
|
||||
<input onchange="checkFilters(true);" class="field_switch field_{{s['sbas']|implode('field_')}}"
|
||||
type="checkbox" value="{{s['sbas']|implode(' field_')}}"
|
||||
n="{{n}}" name="status[{{n}}][on][]"/><label>{{s['labelon']}}</label>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
</table>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% set dates_length = search_datas['dates']|length %}
|
||||
{% if dates_length > 0 %}
|
||||
<div style="margin:5px 0;">
|
||||
<hr/>
|
||||
</div>
|
||||
<div class="date_filter">
|
||||
<div>{% trans 'Rechercher dans un champ date' %}</div>
|
||||
<table>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<select name="datefield">
|
||||
{% for field_id, field in search_datas['dates'] %}
|
||||
<option onchange="checkFilters(true);"
|
||||
class="field_switch field_{{field['sbas']|implode(' field_')}}" value="{{field_id}}">{{field['fieldname']}}</option>
|
||||
{% endfor %}
|
||||
<option value="{{search_datas['dates']|array_keys|implode('|')}}" selected="selected">
|
||||
{% trans 'rechercher dans tous les champs' %}
|
||||
</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{% trans 'phraseanet::time:: de' %}
|
||||
<input onchange="checkFilters(true);" class="datepicker" type="text" name="datemin">
|
||||
</td>
|
||||
<td>
|
||||
{% trans 'phraseanet::time:: a' %}
|
||||
<input onchange="checkFilters(true);" class="datepicker" type="text" name="datemax">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
Reference in New Issue
Block a user