mirror of
				https://github.com/searxng/searxng
				synced 2024-01-01 19:24:07 +01:00 
			
		
		
		
	[fix] add search language and time range filter to suggestions - fixes #1314
This commit is contained in:
		
							parent
							
								
									9b9b5e9625
								
							
						
					
					
						commit
						6278538890
					
				
					 1 changed files with 12 additions and 0 deletions
				
			
		|  | @ -43,6 +43,12 @@ | |||
|                 <div class="panel-body"> | ||||
|                     {% for suggestion in suggestions %} | ||||
|                     <form method="{{ method or 'POST' }}" action="{{ url_for('index') }}" role="navigation" class="form-inline pull-{% if rtl %}right{% else %}left{% endif %} suggestion_item"> | ||||
|                         {% if current_language != 'all' %} | ||||
|                         <input type="hidden" name="language" value="{{ current_language }}"> | ||||
|                         {% endif %} | ||||
|                         {% if time_range %} | ||||
|                         <input type="hidden" name="time_range" value="{{ time_range }}"> | ||||
|                         {% endif %} | ||||
|                         <input type="hidden" name="q" value="{{ suggestion.url }}"> | ||||
|                         <button type="submit" class="btn btn-default btn-xs">{{ suggestion.title }}</button> | ||||
|                     </form> | ||||
|  | @ -87,6 +93,12 @@ | |||
|                     <span class="result_header text-muted form-inline pull-left suggestion_item">{{ _('Try searching for:') }}</span> | ||||
|                     {% for correction in corrections -%} | ||||
|                         <form method="{{ method or 'POST' }}" action="{{ url_for('index') }}" role="navigation" class="form-inline pull-left suggestion_item">{{- "" -}} | ||||
|                             {% if current_language != 'all' %} | ||||
|                             <input type="hidden" name="language" value="{{ current_language }}"> | ||||
|                             {% endif %} | ||||
|                             {% if time_range %} | ||||
|                             <input type="hidden" name="time_range" value="{{ time_range }}"> | ||||
|                             {% endif %} | ||||
|                             <input type="hidden" name="q" value="{{ correction.url }}">{{- "" -}} | ||||
|                             <button type="submit" class="btn btn-default btn-xs">{{ correction.title }}</button>{{- "" -}} | ||||
|                         </form> | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Adam Tauber
						Adam Tauber