mirror of
				https://github.com/searxng/searxng.git
				synced 2025-11-03 19:17:07 -05:00 
			
		
		
		
	[fix] pageno param of search reqs in form
This commit is contained in:
		
							parent
							
								
									0e7ac3797d
								
							
						
					
					
						commit
						247534be76
					
				@ -1,8 +1,8 @@
 | 
				
			|||||||
{% extends "oscar/base.html" %}
 | 
					{% extends "oscar/base.html" %}
 | 
				
			||||||
{% macro search_form_attrs() -%}
 | 
					{% macro search_form_attrs(pageno) -%}
 | 
				
			||||||
    {% for category in selected_categories %}<input type="hidden" name="category_{{ category }}" value="1"/>{% endfor %}
 | 
					    {% for category in selected_categories %}<input type="hidden" name="category_{{ category }}" value="1"/>{% endfor %}
 | 
				
			||||||
    <input type="hidden" name="q" value="{{ q|e }}" />
 | 
					    <input type="hidden" name="q" value="{{ q|e }}" />
 | 
				
			||||||
    <input type="hidden" name="pageno" value="{{ pageno+1 }}" />
 | 
					    <input type="hidden" name="pageno" value="{{ pageno }}" />
 | 
				
			||||||
    <input type="hidden" name="time_range" value="{{ time_range }}" />
 | 
					    <input type="hidden" name="time_range" value="{{ time_range }}" />
 | 
				
			||||||
    <input type="hidden" name="language" value="{{ current_language }}" />
 | 
					    <input type="hidden" name="language" value="{{ current_language }}" />
 | 
				
			||||||
{%- endmacro %}
 | 
					{%- endmacro %}
 | 
				
			||||||
@ -58,13 +58,13 @@
 | 
				
			|||||||
            <div id="pagination">
 | 
					            <div id="pagination">
 | 
				
			||||||
                <div class="pull-left">
 | 
					                <div class="pull-left">
 | 
				
			||||||
                  <form method="{{ method or 'POST' }}" action="{{ url_for('index') }}" class="pull-left">
 | 
					                  <form method="{{ method or 'POST' }}" action="{{ url_for('index') }}" class="pull-left">
 | 
				
			||||||
                        {{ search_form_attrs() }}
 | 
					                        {{ search_form_attrs(pageno+1) }}
 | 
				
			||||||
                        <button type="submit" class="btn btn-default"><span class="glyphicon glyphicon-backward"></span> {{ _('next page') }}</button>
 | 
					                        <button type="submit" class="btn btn-default"><span class="glyphicon glyphicon-backward"></span> {{ _('next page') }}</button>
 | 
				
			||||||
                    </form>
 | 
					                    </form>
 | 
				
			||||||
                </div>
 | 
					                </div>
 | 
				
			||||||
                <div class="pull-right">
 | 
					                <div class="pull-right">
 | 
				
			||||||
                    <form method="{{ method or 'POST' }}" action="{{ url_for('index') }}"  class="pull-left">
 | 
					                    <form method="{{ method or 'POST' }}" action="{{ url_for('index') }}"  class="pull-left">
 | 
				
			||||||
                        {{ search_form_attrs() }}
 | 
					                        {{ search_form_attrs(pageno-1) }}
 | 
				
			||||||
                        <button type="submit" class="btn btn-default" {% if pageno == 1 %}disabled{% endif %}><span class="glyphicon glyphicon-forward"></span> {{ _('previous page') }}</button>
 | 
					                        <button type="submit" class="btn btn-default" {% if pageno == 1 %}disabled{% endif %}><span class="glyphicon glyphicon-forward"></span> {{ _('previous page') }}</button>
 | 
				
			||||||
                    </form>
 | 
					                    </form>
 | 
				
			||||||
                </div>
 | 
					                </div>
 | 
				
			||||||
@ -74,13 +74,13 @@
 | 
				
			|||||||
            <div id="pagination">
 | 
					            <div id="pagination">
 | 
				
			||||||
                <div class="pull-left">
 | 
					                <div class="pull-left">
 | 
				
			||||||
                    <form method="{{ method or 'POST' }}" action="{{ url_for('index') }}" class="pull-left">
 | 
					                    <form method="{{ method or 'POST' }}" action="{{ url_for('index') }}" class="pull-left">
 | 
				
			||||||
                        {{ search_form_attrs() }}
 | 
					                        {{ search_form_attrs(pageno-1) }}
 | 
				
			||||||
                        <button type="submit" class="btn btn-default" {% if pageno == 1 %}disabled{% endif %}><span class="glyphicon glyphicon-backward"></span> {{ _('previous page') }}</button>
 | 
					                        <button type="submit" class="btn btn-default" {% if pageno == 1 %}disabled{% endif %}><span class="glyphicon glyphicon-backward"></span> {{ _('previous page') }}</button>
 | 
				
			||||||
                    </form>
 | 
					                    </form>
 | 
				
			||||||
                </div>
 | 
					                </div>
 | 
				
			||||||
                <div class="pull-right">
 | 
					                <div class="pull-right">
 | 
				
			||||||
                    <form method="{{ method or 'POST' }}" action="{{ url_for('index') }}"  class="pull-left">
 | 
					                    <form method="{{ method or 'POST' }}" action="{{ url_for('index') }}"  class="pull-left">
 | 
				
			||||||
                        {{ search_form_attrs() }}
 | 
					                        {{ search_form_attrs(pageno+1) }}
 | 
				
			||||||
                        <button type="submit" class="btn btn-default"><span class="glyphicon glyphicon-forward"></span> {{ _('next page') }}</button>
 | 
					                        <button type="submit" class="btn btn-default"><span class="glyphicon glyphicon-forward"></span> {{ _('next page') }}</button>
 | 
				
			||||||
                    </form>
 | 
					                    </form>
 | 
				
			||||||
                </div>
 | 
					                </div>
 | 
				
			||||||
@ -132,7 +132,7 @@
 | 
				
			|||||||
                    <div class="clearfix"></div>
 | 
					                    <div class="clearfix"></div>
 | 
				
			||||||
                    {% for output_type in ('csv', 'json', 'rss') %}
 | 
					                    {% for output_type in ('csv', 'json', 'rss') %}
 | 
				
			||||||
                    <form method="{{ method or 'POST' }}" action="{{ url_for('index') }}" class="form-inline pull-{% if rtl %}right{% else %}left{% endif %} result_download">
 | 
					                    <form method="{{ method or 'POST' }}" action="{{ url_for('index') }}" class="form-inline pull-{% if rtl %}right{% else %}left{% endif %} result_download">
 | 
				
			||||||
                        {{ search_form_attrs() }}
 | 
					                        {{ search_form_attrs(pageno) }}
 | 
				
			||||||
                        <input type="hidden" name="format" value="{{ output_type }}">
 | 
					                        <input type="hidden" name="format" value="{{ output_type }}">
 | 
				
			||||||
                        <button type="submit" class="btn btn-default">{{ output_type }}</button>
 | 
					                        <button type="submit" class="btn btn-default">{{ output_type }}</button>
 | 
				
			||||||
                    </form>
 | 
					                    </form>
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user