mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-24 10:23:17 +00:00
New Adv Search
This commit is contained in:
@@ -240,11 +240,11 @@
|
|||||||
<span id="basket_menu_trigger" style="cursor:pointer;padding:3px;font-size:12px;">▼</span>
|
<span id="basket_menu_trigger" style="cursor:pointer;padding:3px;font-size:12px;">▼</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<!--<li>
|
||||||
<a href="#adv_search" class="adv_search">
|
<a href="#adv_search" class="adv_search">
|
||||||
{% trans 'recherche' %}
|
{% trans 'recherche' %}
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>-->
|
||||||
{% if GV_thesaurus %}
|
{% if GV_thesaurus %}
|
||||||
<li>
|
<li>
|
||||||
<a href="#proposals">
|
<a href="#proposals">
|
||||||
@@ -262,7 +262,7 @@
|
|||||||
{% import 'prod/WorkZone/Macros.twig' as WorkZoneMacros %}
|
{% import 'prod/WorkZone/Macros.twig' as WorkZoneMacros %}
|
||||||
{{WorkZoneMacros.make_bloc(WorkZone)}}
|
{{WorkZoneMacros.make_bloc(WorkZone)}}
|
||||||
</div>
|
</div>
|
||||||
<div id="adv_search">
|
<!--<div id="adv_search">
|
||||||
<div>
|
<div>
|
||||||
<input onclick="reset_adv_search();" type="button" value="{% trans 'Re-initialiser' %}" class="input-button"/>
|
<input onclick="reset_adv_search();" type="button" value="{% trans 'Re-initialiser' %}" class="input-button"/>
|
||||||
</div>
|
</div>
|
||||||
@@ -441,7 +441,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>-->
|
||||||
{% if GV_thesaurus %}
|
{% if GV_thesaurus %}
|
||||||
<div id="proposals" class="PNB ui-tabs-panel ui-tabs-hide" style="top:30px;"
|
<div id="proposals" class="PNB ui-tabs-panel ui-tabs-hide" style="top:30px;"
|
||||||
ondblclick="return(thesau_dblclickThesaurus(event));" onclick="return(thesau_clickThesaurus(event));">
|
ondblclick="return(thesau_dblclickThesaurus(event));" onclick="return(thesau_clickThesaurus(event));">
|
||||||
@@ -565,10 +565,13 @@
|
|||||||
<div class="PNB" id="rightFrame" style="left:auto;width:{{w2}}%;">
|
<div class="PNB" id="rightFrame" style="left:auto;width:{{w2}}%;">
|
||||||
|
|
||||||
<div id="headBlock" class="PNB" style="height:60px;bottom:auto;">
|
<div id="headBlock" class="PNB" style="height:60px;bottom:auto;">
|
||||||
<div id="alternateTrigger" class="PNB">
|
<form name="phrasea_query" class="phrasea_query" style="margin:15px 20px 0 0;padding:0;" onsubmit="newSearch();return false;">
|
||||||
<form style="margin:15px 20px;padding:0;" onsubmit="newSearch();return false;">
|
<input autocomplete="off" class="search query" id="EDIT_query" name="query" type="text" name="qry" value="{{user.getPrefs('start_page_query')}}">
|
||||||
<input autocomplete="off" class="search" id="EDIT_query" type="text" name="qry" value="{{user.getPrefs('start_page_query')}}">
|
|
||||||
<input id="search_submit" type="submit" value="{% trans 'boutton::rechercher' %}" class="input-button" />
|
<a href="#" class="adv_trigger adv_search_button">
|
||||||
|
<img src="/skins/icons/settings.png" title="{% trans 'Advanced Search' %}"/>
|
||||||
|
</a>
|
||||||
|
<button>{% trans 'boutton::rechercher' %}</button>
|
||||||
{% if GV_multiAndReport %}
|
{% if GV_multiAndReport %}
|
||||||
<input type="radio" value="0" class="mode_type_doc_reg checkbox" name="search_type" {% if GV_defaultQuery_type == 0 %}checked="checked"{% endif %} id="mode_type_doc"/><label for="mode_type_doc">{% trans 'phraseanet::type:: documents' %}</label>
|
<input type="radio" value="0" class="mode_type_doc_reg checkbox" name="search_type" {% if GV_defaultQuery_type == 0 %}checked="checked"{% endif %} id="mode_type_doc"/><label for="mode_type_doc">{% trans 'phraseanet::type:: documents' %}</label>
|
||||||
<input type="radio" value="1" class="mode_type_doc_reg checkbox" name="search_type" {% if GV_defaultQuery_type != 0 %}checked="checked"{% endif %} id="mode_type_reg"/><label for="mode_type_reg">{% trans 'phraseanet::type:: reportages' %}</label>
|
<input type="radio" value="1" class="mode_type_doc_reg checkbox" name="search_type" {% if GV_defaultQuery_type != 0 %}checked="checked"{% endif %} id="mode_type_reg"/><label for="mode_type_reg">{% trans 'phraseanet::type:: reportages' %}</label>
|
||||||
@@ -583,11 +586,199 @@
|
|||||||
<option value="document">{% trans 'Document' %}</option>
|
<option value="document">{% trans 'Document' %}</option>
|
||||||
<option value="flash">{% trans 'Flash' %}</option>
|
<option value="flash">{% trans 'Flash' %}</option>
|
||||||
</select>
|
</select>
|
||||||
<a href="#" onclick="lookBox(this,event);return false;">{% trans 'Preferences' %} </a>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="adv_options" style="display:none;">
|
||||||
|
|
||||||
|
|
||||||
|
<div>
|
||||||
|
<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' %}
|
||||||
|
</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>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
<a href="#" class="adv_trigger adv_search_button">{% trans 'Advanced Search' %} </a>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
|
||||||
<div id="alternateSearch" class="PNB" style="z-index:510;">
|
<div id="alternateSearch" class="PNB" style="z-index:510;">
|
||||||
<ul class="PNB" style="height:30px;">
|
<ul class="PNB" style="height:30px;">
|
||||||
<li><a href="#bases-queries">{% trans 'recherche :: Bases' %}</a></li>
|
<li><a href="#bases-queries">{% trans 'recherche :: Bases' %}</a></li>
|
||||||
@@ -623,7 +814,7 @@
|
|||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>-->
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div id="idFrameT" class="PNB ui-corner-top" style="top:70px;">
|
<div id="idFrameT" class="PNB ui-corner-top" style="top:70px;">
|
||||||
|
|||||||
@@ -438,7 +438,7 @@ function T_search(menuItem, menu, cmenu, e, label)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$("#EDIT_query").val(v);
|
$('form[name="phrasea_query"] input[name="query"]').val(v);
|
||||||
checkFilters();
|
checkFilters();
|
||||||
newSearch();
|
newSearch();
|
||||||
}
|
}
|
||||||
@@ -711,7 +711,7 @@ function doThesSearch(type, sbid, term, field)
|
|||||||
v = '*:"' + term.replace("(", "[").replace(")", "]") + '"';
|
v = '*:"' + term.replace("(", "[").replace(")", "]") + '"';
|
||||||
else
|
else
|
||||||
v = '"' + term + '" IN ' + field;
|
v = '"' + term + '" IN ' + field;
|
||||||
$("#EDIT_query").val(v);
|
$('form[name="phrasea_query"] input[name="query"]').val(v);
|
||||||
checkFilters();
|
checkFilters();
|
||||||
newSearch();
|
newSearch();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user