diff options
author | Adam Tauber <asciimoo@gmail.com> | 2015-02-10 15:23:56 +0100 |
---|---|---|
committer | Adam Tauber <asciimoo@gmail.com> | 2015-02-10 15:23:56 +0100 |
commit | df9cf9d09bf4496a9e5d799bd99437a3224a06d4 (patch) | |
tree | f5e02ae4c0446f703e5c6c112d631add591a693f /searx/templates/oscar | |
parent | c711212662996e232a1d3bc692f6f765e1467125 (diff) | |
download | searxng-df9cf9d09bf4496a9e5d799bd99437a3224a06d4.tar.gz searxng-df9cf9d09bf4496a9e5d799bd99437a3224a06d4.zip |
Merge branch 'rtl' of github.com:Cqoicebordel/searx
Diffstat (limited to 'searx/templates/oscar')
-rw-r--r-- | searx/templates/oscar/base.html | 2 | ||||
-rw-r--r-- | searx/templates/oscar/categories.html | 22 | ||||
-rw-r--r-- | searx/templates/oscar/macros.html | 31 | ||||
-rw-r--r-- | searx/templates/oscar/navbar.html | 19 | ||||
-rw-r--r-- | searx/templates/oscar/preferences.html | 163 | ||||
-rw-r--r-- | searx/templates/oscar/result_templates/code.html | 6 | ||||
-rw-r--r-- | searx/templates/oscar/result_templates/default.html | 6 | ||||
-rw-r--r-- | searx/templates/oscar/result_templates/map.html | 6 | ||||
-rw-r--r-- | searx/templates/oscar/result_templates/torrent.html | 6 | ||||
-rw-r--r-- | searx/templates/oscar/result_templates/videos.html | 4 | ||||
-rw-r--r-- | searx/templates/oscar/results.html | 22 | ||||
-rw-r--r-- | searx/templates/oscar/search_full.html | 4 |
12 files changed, 205 insertions, 86 deletions
diff --git a/searx/templates/oscar/base.html b/searx/templates/oscar/base.html index 57c4d5593..df5c53965 100644 --- a/searx/templates/oscar/base.html +++ b/searx/templates/oscar/base.html @@ -1,5 +1,5 @@ <!DOCTYPE html> -<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> +<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"{% if rtl %} dir="rtl"{% endif %}> <head> <meta charset="UTF-8" /> <meta name="description" content="Searx - a privacy-respecting, hackable metasearch engine" /> diff --git a/searx/templates/oscar/categories.html b/searx/templates/oscar/categories.html index f38cce5bd..834cffcce 100644 --- a/searx/templates/oscar/categories.html +++ b/searx/templates/oscar/categories.html @@ -1,6 +1,16 @@ <!-- used if scripts are disabled --> <noscript> <div id="categories" class="btn-group btn-toggle"> +{% if rtl %} +{% for category in categories | reverse %} + <!--<div class="checkbox">--> + <input class="hidden" type="checkbox" id="checkbox_{{ category|replace(' ', '_') }}_nojs" name="category_{{ category }}" {% if category in selected_categories %}checked="checked"{% endif %} /> + <label class="btn btn-sm btn-primary active label_hide_if_not_checked" for="checkbox_{{ category|replace(' ', '_') }}_nojs">{{ _(category) }}</label> + <label class="btn btn-sm btn-default label_hide_if_checked" for="checkbox_{{ category|replace(' ', '_') }}_nojs">{{ _(category) }}</label> + <!--</div>--> + {% if category in selected_categories %}<input class="hidden" type="checkbox" id="checkbox_{{ category|replace(' ', '_') }}_dis_activation" name="category_{{ category }}" value="off" checked="checked"/>{% endif %} +{% endfor %} +{% else %} {% for category in categories %} <!--<div class="checkbox">--> <input class="hidden" type="checkbox" id="checkbox_{{ category|replace(' ', '_') }}_nojs" name="category_{{ category }}" {% if category in selected_categories %}checked="checked"{% endif %} /> @@ -9,14 +19,24 @@ <!--</div>--> {% if category in selected_categories %}<input class="hidden" type="checkbox" id="checkbox_{{ category|replace(' ', '_') }}_dis_activation" name="category_{{ category }}" value="off" checked="checked"/>{% endif %} {% endfor %} +{% endif %} </div> </noscript> <div id="categories" class="btn-group btn-toggle hide_if_nojs" data-toggle="buttons"> +{% if rtl %} +{% for category in categories | reverse %} + <label class="btn btn-sm {% if category in selected_categories %}btn-primary active{% else %}btn-default{% endif %}" data-btn-class="primary"> + <input class="hidden" type="checkbox" id="checkbox_{{ category|replace(' ', '_') }}" name="category_{{ category }}" {% if category in selected_categories %}checked="checked"{% endif %} />{{ _(category) }} + </label> +{% endfor %} +{% else %} {% for category in categories %} <label class="btn btn-sm {% if category in selected_categories %}btn-primary active{% else %}btn-default{% endif %}" data-btn-class="primary"> - <input class="hidden" type="checkbox" id="checkbox_{{ category|replace(' ', '_') }}" name="category_{{ category }}" {% if category in selected_categories %}checked="checked"{% endif %} />{{ _(category) }}</label> + <input class="hidden" type="checkbox" id="checkbox_{{ category|replace(' ', '_') }}" name="category_{{ category }}" {% if category in selected_categories %}checked="checked"{% endif %} />{{ _(category) }} + </label> {% endfor %} +{% endif %} </div> diff --git a/searx/templates/oscar/macros.html b/searx/templates/oscar/macros.html index 9b253ad93..f2222c610 100644 --- a/searx/templates/oscar/macros.html +++ b/searx/templates/oscar/macros.html @@ -28,3 +28,34 @@ <span class="label label-default pull-right">{{ result.engine }}</span>
<p class="text-muted">{{ result.pretty_url }}</p>
{%- endmacro %}
+
+<!-- Draw result footer -->
+{% macro result_footer_rtl(result) -%}
+ <div class="clearfix"></div>
+ <span class="label label-default pull-left">{{ result.engine }}</span>
+ <p class="text-muted">{{ result.pretty_url }}</p>
+{%- endmacro %}
+
+{% macro preferences_item_header(info, label) -%}
+ {% if not rtl %}
+ <div class="row form-group">
+ <label class="col-sm-3 col-md-2">{{ label }}</label>
+ <div class="col-sm-4 col-md-4">
+ {% else %}
+ <div class="row form-group">
+ <span class="col-sm-5 col-md-6 help-block">{{ info }}</span>
+ <div class="col-sm-4 col-md-4">
+ {% endif %}
+{%- endmacro %}
+
+{% macro preferences_item_footer(info, label) -%}
+ {% if not rtl %}
+ </div>
+ <span class="col-sm-5 col-md-6 help-block">{{ info }}</span>
+ </div>
+ {% else %}
+ </div>
+ <label class="col-sm-3 col-md-2">{{ label }}</label>
+ </div>
+ {% endif %}
+{%- endmacro %}
diff --git a/searx/templates/oscar/navbar.html b/searx/templates/oscar/navbar.html index db0d7818f..0c92b09dd 100644 --- a/searx/templates/oscar/navbar.html +++ b/searx/templates/oscar/navbar.html @@ -1,6 +1,24 @@ <!-- Static navbar --> <div class="navbar navbar-default" role="navigation"> <div class="container-fluid"> + {% if rtl %} + <div class="navbar-collapse collapse navbar-left"> + <ul class="nav navbar-nav navbar-left"> <!-- results.html --> + <li{% if template_name == 'preferences.html' %} class="active"{% endif %}><a href="{{ url_for('preferences') }}" class="hmarg">{{ _('preferences') }}</a></li> + <li{% if template_name == 'about.html' %} class="active"{% endif %}><a href="{{ url_for('about') }}" class="hmarg">{{ _('about') }}</a></li> + <li{% if template_name == 'index.html' %} class="active"{% endif %}><a href="{{ url_for('index') }}" class="hmarg">{{ _('home') }}</a></li> + </ul> + </div> + <div class="navbar-header navbar-right"> + <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target=".navbar-collapse"> + <span class="sr-only">{{ _('Toggle navigation') }}</span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + </button> + <a class="navbar-brand" href="{{ url_for('index') }}">searx</a> + </div> + {% else %} <div class="navbar-header"> <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target=".navbar-collapse"> <span class="sr-only">{{ _('Toggle navigation') }}</span> @@ -17,5 +35,6 @@ <li{% if template_name == 'preferences.html' %} class="active"{% endif %}><a href="{{ url_for('preferences') }}" class="hmarg">{{ _('preferences') }}</a></li> </ul> </div><!--/.nav-collapse --> + {% endif %} </div><!--/.container-fluid --> </div> diff --git a/searx/templates/oscar/preferences.html b/searx/templates/oscar/preferences.html index ecb483ebb..066524f48 100644 --- a/searx/templates/oscar/preferences.html +++ b/searx/templates/oscar/preferences.html @@ -1,3 +1,4 @@ +{% from 'oscar/macros.html' import preferences_item_header, preferences_item_header_rtl, preferences_item_footer, preferences_item_footer_rtl %} {% extends "oscar/base.html" %} {% block title %}{{ _('preferences') }} - {% endblock %} {% block site_alert_warning_nojs %} @@ -12,7 +13,7 @@ <form method="post" action="{{ url_for('preferences') }}" id="search_form"> <!-- Nav tabs --> - <ul class="nav nav-tabs hide_if_nojs" role="tablist" style="margin-bottom:20px;"> + <ul class="nav nav-tabs nav-justified hide_if_nojs" role="tablist" style="margin-bottom:20px;"> <li class="active"><a href="#tab_general" role="tab" data-toggle="tab">{{ _('General') }}</a></li> <li><a href="#tab_engine" role="tab" data-toggle="tab">{{ _('Engines') }}</a></li> </ul> @@ -26,96 +27,94 @@ <fieldset> <div class="container-fluid"> <div class="row form-group"> - <label class="col-sm-3 col-md-2">{{ _('Default categories') }}</label> + {% if rtl %} <div class="col-sm-11 col-md-10"> {% include 'oscar/categories.html' %} </div> - </div> - <div class="row form-group"> - <label class="col-sm-3 col-md-2">{{ _('Search language') }}</label> - <div class="col-sm-4 col-md-4"> - <select class="form-control" name='language'> - <option value="all" {% if current_language == 'all' %}selected="selected"{% endif %}>{{ _('Automatic') }}</option> - {% for lang_id,lang_name,country_name in language_codes %} - <option value="{{ lang_id }}" {% if lang_id == current_language %}selected="selected"{% endif %}>{{ lang_name }} ({{ country_name }}) - {{ lang_id }}</option> - {% endfor %} - </select> - </div> - <span class="col-sm-5 col-md-6 help-block">{{ _('What language do you prefer for search?') }}</span> - </div> - <div class="row form-group"> - <label class="col-sm-3 col-md-2">{{ _('Interface language') }}</label> - <div class="col-sm-4 col-md-4"> - <select class="form-control" name='locale'> - {% for locale_id,locale_name in locales.items() %} - <option value="{{ locale_id }}" {% if locale_id == current_locale %}selected="selected"{% endif %}>{{ locale_name }}</option> - {% endfor %} - </select> + <label class="col-sm-3 col-md-2">{{ _('Default categories') }}</label> + {% else %} + <label class="col-sm-3 col-md-2">{{ _('Default categories') }}</label> + <div class="col-sm-11 col-md-10"> + {% include 'oscar/categories.html' %} </div> - <span class="col-sm-5 col-md-6 help-block">{{ _('Change the language of the layout') }}</span> + {% endif %} </div> - <div class="row form-group"> - <label class="col-sm-3 col-md-2">{{ _('Autocomplete') }}</label> - <div class="col-sm-4 col-md-4"> + {% set language_label = _('Search language') %} + {% set language_info = _('What language do you prefer for search?') %} + {{ preferences_item_header(language_info, language_label) }} + <select class="form-control" name='language'> + <option value="all" {% if current_language == 'all' %}selected="selected"{% endif %}>{{ _('Automatic') }}</option> + {% for lang_id,lang_name,country_name in language_codes %} + <option value="{{ lang_id }}" {% if lang_id == current_language %}selected="selected"{% endif %}>{{ lang_name }} ({{ country_name }}) - {{ lang_id }}</option> + {% endfor %} + </select> + {{ preferences_item_footer(language_info, language_label) }} - <select class="form-control" name="autocomplete"> - <option value=""> - </option> - {% for backend in autocomplete_backends %} - <option value="{{ backend }}" {% if backend == autocomplete %}selected="selected"{% endif %}>{{ backend }}</option> - {% endfor %} - </select> - </div> - <span class="col-sm-5 col-md-6 help-block">{{ _('Find stuff as you type') }}</span> - </div> - <div class="row form-group"> - <label class="col-sm-3 col-md-2">{{ _('Image proxy') }}</label> - <div class="col-sm-4 col-md-4"> - <select class="form-control" name='image_proxy'> - <option value="1" {% if image_proxy %}selected="selected"{% endif %}>{{ _('Enabled') }}</option> - <option value="" {% if not image_proxy %}selected="selected"{% endif %}>{{ _('Disabled')}}</option> - </select> - </div> - <span class="col-sm-5 col-md-6 help-block">{{ _('Proxying image results through searx') }}</span> - </div> - <div class="row form-group"> - <label class="col-sm-3 col-md-2">{{ _('Method') }}</label> - <div class="col-sm-4 col-md-4"> - <select class="form-control" name='method'> - <option value="POST" {% if method == 'POST' %}selected="selected"{% endif %}>POST</option> - <option value="GET" {% if method == 'GET' %}selected="selected"{% endif %}>GET</option> - </select> - </div> - <span class="col-sm-5 col-md-6 help-block">{{ _('Change how forms are submited, <a href="http://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Request_methods" rel="external">learn more about request methods</a>') }}</span> - </div> - <div class="row form-group"> - <label class="col-sm-3 col-md-2">{{ _('SafeSearch') }}</label> - <div class="col-sm-4 col-md-4"> - <select class="form-control" name='safesearch'> - <option value="2" {% if safesearch == '2' %}selected="selected"{% endif %}>{{ _('Strict') }}</option> - <option value="1" {% if safesearch == '1' %}selected="selected"{% endif %}>{{ _('Moderate') }}</option> - <option value="0" {% if safesearch == '0' %}selected="selected"{% endif %}>{{ _('None') }}</option> - </select> - </div> - <span class="col-sm-5 col-md-6 help-block">{{ _('Filter explicite content') }}</span> - </div> - <div class="row form-group"> - <label class="col-sm-3 col-md-2">{{ _('Themes') }}</label> - <div class="col-sm-4 col-md-4"> - <select class="form-control" name="theme"> - {% for name in themes %} - <option value="{{ name }}" {% if name == theme %}selected="selected"{% endif %}>{{ name }}</option> - {% endfor %} - </select> - </div> - <span class="col-sm-5 col-md-6 help-block">{{ _('Change searx layout') }}</span> - </div> + {% set locale_label = _('Interface language') %} + {% set locale_info = _('Change the language of the layout') %} + {{ preferences_item_header(locale_info, locale_label) }} + <select class="form-control" name='locale'> + {% for locale_id,locale_name in locales.items() %} + <option value="{{ locale_id }}" {% if locale_id == current_locale %}selected="selected"{% endif %}>{{ locale_name }}</option> + {% endfor %} + </select> + {{ preferences_item_footer(locale_info, locale_label) }} + + {% set autocomplete_label = _('Autocomplete') %} + {% set autocomplete_info = _('Find stuff as you type') %} + {{ preferences_item_header(autocomplete_info, autocomplete_label) }} + <select class="form-control" name="autocomplete"> + <option value=""> - </option> + {% for backend in autocomplete_backends %} + <option value="{{ backend }}" {% if backend == autocomplete %}selected="selected"{% endif %}>{{ backend }}</option> + {% endfor %} + </select> + {{ preferences_item_footer(autocomplete_info, autocomplete_label) }} + + {% set image_proxy_label = _('Image proxy') %} + {% set image_proxy_info = _('Proxying image results through searx') %} + {{ preferences_item_header(image_proxy_info, image_proxy_label) }} + <select class="form-control" name='image_proxy'> + <option value="1" {% if image_proxy %}selected="selected"{% endif %}>{{ _('Enabled') }}</option> + <option value="" {% if not image_proxy %}selected="selected"{% endif %}>{{ _('Disabled')}}</option> + </select> + {{ preferences_item_footer(image_proxy_info, image_proxy_label) }} + + {% set method_label = _('Method') %} + {% set method_info = _('Change how forms are submited, <a href="http://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Request_methods" rel="external">learn more about request methods</a>') %} + {{ preferences_item_header(method_info, method_label) }} + <select class="form-control" name='method'> + <option value="POST" {% if method == 'POST' %}selected="selected"{% endif %}>POST</option> + <option value="GET" {% if method == 'GET' %}selected="selected"{% endif %}>GET</option> + </select> + {{ preferences_item_footer(method_info, method_label) }} + + {% set safesearch_label = _('SafeSearch') %} + {% set safesearch_info = _('Filter content') %} + {{ preferences_item_header(safesearch_info, safesearch_label) }} + <select class="form-control" name='safesearch'> + <option value="2" {% if safesearch == '2' %}selected="selected"{% endif %}>{{ _('Strict') }}</option> + <option value="1" {% if safesearch == '1' %}selected="selected"{% endif %}>{{ _('Moderate') }}</option> + <option value="0" {% if safesearch == '0' %}selected="selected"{% endif %}>{{ _('None') }}</option> + </select> + {{ preferences_item_footer(safesearch_info, safesearch_label) }} + + {% set theme_label = _('Themes') %} + {% set theme_info = _('Change searx layout') %} + {{ preferences_item_header(theme_info, theme_label) }} + <select class="form-control" name="theme"> + {% for name in themes %} + <option value="{{ name }}" {% if name == theme %}selected="selected"{% endif %}>{{ name }}</option> + {% endfor %} + </select> + {{ preferences_item_footer(theme_info, theme_label) }} </div> </fieldset> </div> <div class="tab-pane active_if_nojs" id="tab_engine"> <!-- Nav tabs --> - <ul class="nav nav-tabs hide_if_nojs" role="tablist" style="margin-bottom:20px;"> + <ul class="nav nav-tabs nav-justified hide_if_nojs" role="tablist" style="margin-bottom:20px;"> {% for (categ,search_engines) in categs %} <li{% if loop.first %} class="active"{% endif %}><a href="#tab_engine_{{ categ|replace(' ', '_') }}" role="tab" data-toggle="tab">{{ _(categ) }}</a></li> {% endfor %} @@ -136,7 +135,9 @@ {% for search_engine in search_engines %} {% if not search_engine.private %} <div class="row"> + {% if not rtl %} <div class="col-xs-6 col-sm-4 col-md-4">{{ search_engine.name }} ({{ shortcuts[search_engine.name] }})</div> + {% endif %} <div class="col-xs-6 col-sm-4 col-md-4"> <div class="checkbox"> <input class="hidden" type="checkbox" id="engine_{{ categ|replace(' ', '_') }}_{{ search_engine.name|replace(' ', '_') }}" name="engine_{{ search_engine.name }}__{{ categ }}"{% if (search_engine.name, categ) in blocked_engines %} checked="checked"{% endif %} /> @@ -144,6 +145,9 @@ <label class="btn btn-danger label_hide_if_not_checked" for="engine_{{ categ|replace(' ', '_') }}_{{ search_engine.name|replace(' ', '_') }}">{{ _('Allow') }}</label> </div> </div> + {% if rtl %} + <div class="col-xs-6 col-sm-4 col-md-4">{{ search_engine.name }} ({{ shortcuts[search_engine.name] }})‎</div> + {% endif %} </div> {% endif %} {% endfor %} @@ -154,7 +158,6 @@ </div> </div> </div> - <p class="text-muted" style="margin:20px 0;">{{ _('These settings are stored in your cookies, this allows us not to store this data about you.') }} <br /> {{ _("These cookies serve your sole convenience, we don't use these cookies to track you.") }} diff --git a/searx/templates/oscar/result_templates/code.html b/searx/templates/oscar/result_templates/code.html index e608bb04f..0ec0983b3 100644 --- a/searx/templates/oscar/result_templates/code.html +++ b/searx/templates/oscar/result_templates/code.html @@ -1,4 +1,4 @@ -{% from 'oscar/macros.html' import result_header, result_sub_header, result_footer, icon %}
+{% from 'oscar/macros.html' import result_header, result_sub_header, result_footer, result_footer_rtl, icon %}
{{ result_header(result, favicons) }}
{{ result_sub_header(result) }}
@@ -9,4 +9,8 @@ {{ result.codelines|code_highlighter(result.code_language)|safe }}
+{% if rtl %}
+{{ result_footer_rtl(result) }}
+{% else %}
{{ result_footer(result) }}
+{% endif %}
diff --git a/searx/templates/oscar/result_templates/default.html b/searx/templates/oscar/result_templates/default.html index 2be06642a..fc61b8ce0 100644 --- a/searx/templates/oscar/result_templates/default.html +++ b/searx/templates/oscar/result_templates/default.html @@ -1,4 +1,4 @@ -{% from 'oscar/macros.html' import result_header, result_sub_header, result_footer, icon %}
+{% from 'oscar/macros.html' import result_header, result_sub_header, result_footer, result_footer_rtl, icon %}
{{ result_header(result, favicons) }}
{{ result_sub_header(result) }}
@@ -15,4 +15,8 @@ {% if result.content %}<p class="result-content">{{ result.content|safe }}</p>{% endif %}
+{% if rtl %}
+{{ result_footer_rtl(result) }}
+{% else %}
{{ result_footer(result) }}
+{% endif %}
diff --git a/searx/templates/oscar/result_templates/map.html b/searx/templates/oscar/result_templates/map.html index a2843525f..2e679e84d 100644 --- a/searx/templates/oscar/result_templates/map.html +++ b/searx/templates/oscar/result_templates/map.html @@ -1,4 +1,4 @@ -{% from 'oscar/macros.html' import result_header, result_sub_header, result_footer, icon %}
+{% from 'oscar/macros.html' import result_header, result_sub_header, result_footer, result_footer_rtl, icon %}
{{ result_header(result, favicons) }}
{{ result_sub_header(result) }}
@@ -65,4 +65,8 @@ </div>
{% endif %}
+{% if rtl %}
+{{ result_footer_rtl(result) }}
+{% else %}
{{ result_footer(result) }}
+{% endif %}
diff --git a/searx/templates/oscar/result_templates/torrent.html b/searx/templates/oscar/result_templates/torrent.html index 53d8ed6fa..bc2b30fbe 100644 --- a/searx/templates/oscar/result_templates/torrent.html +++ b/searx/templates/oscar/result_templates/torrent.html @@ -1,4 +1,4 @@ -{% from 'oscar/macros.html' import result_header, result_sub_header, result_footer, icon %} +{% from 'oscar/macros.html' import result_header, result_sub_header, result_footer, result_footer_rtl, icon %} {{ result_header(result, favicons) }} {{ result_sub_header(result) }} @@ -18,4 +18,8 @@ </p> +{% if rtl %} +{{ result_footer_rtl(result) }} +{% else %} {{ result_footer(result) }} +{% endif %} diff --git a/searx/templates/oscar/result_templates/videos.html b/searx/templates/oscar/result_templates/videos.html index 2cf8b61df..87fe25afe 100644 --- a/searx/templates/oscar/result_templates/videos.html +++ b/searx/templates/oscar/result_templates/videos.html @@ -20,4 +20,8 @@ </div>
</div>
+{% if rtl %}
+{{ result_footer_rtl(result) }}
+{% else %}
{{ result_footer(result) }}
+{% endif %}
diff --git a/searx/templates/oscar/results.html b/searx/templates/oscar/results.html index b60c977a5..8303573f0 100644 --- a/searx/templates/oscar/results.html +++ b/searx/templates/oscar/results.html @@ -33,6 +33,27 @@ <div class="clearfix"></div>
{% if paging %}
+ {% if rtl %}
+ <div id="pagination">
+ <div class="pull-left">
+ <form method="{{ method or 'POST' }}" action="{{ url_for('index') }}" class="pull-left">
+ <input type="hidden" name="q" value="{{ q }}" />
+ {% for category in selected_categories %}<input type="hidden" name="category_{{ category }}" value="1"/>{% endfor %}
+ <input type="hidden" name="q" value="{{ q }}" />
+ <input type="hidden" name="pageno" value="{{ pageno+1 }}" />
+ <button type="submit" class="btn btn-default"><span class="glyphicon glyphicon-backward"></span> {{ _('next page') }}</button>
+ </form>
+ </div>
+ <div class="pull-right">
+ <form method="{{ method or 'POST' }}" action="{{ url_for('index') }}" class="pull-left">
+ {% for category in selected_categories %}<input type="hidden" name="category_{{ category }}" value="1"/>{% endfor %}
+ <input type="hidden" name="pageno" value="{{ pageno-1 }}" />
+ <button type="submit" class="btn btn-default" {% if pageno == 1 %}disabled{% endif %}><span class="glyphicon glyphicon-forward"></span> {{ _('previous page') }}</button>
+ </form>
+ </div>
+ </div><!-- /#pagination -->
+ <div class="clearfix"></div>
+ {% else %}
<div id="pagination">
<div class="pull-left">
<form method="{{ method or 'POST' }}" action="{{ url_for('index') }}" class="pull-left">
@@ -53,6 +74,7 @@ </div><!-- /#pagination -->
<div class="clearfix"></div>
{% endif %}
+ {% endif %}
</div><!-- /#main_results -->
<div class="col-sm-4" id="sidebar_results">
diff --git a/searx/templates/oscar/search_full.html b/searx/templates/oscar/search_full.html index b1fe39eb2..26dae418c 100644 --- a/searx/templates/oscar/search_full.html +++ b/searx/templates/oscar/search_full.html @@ -1,7 +1,11 @@ {% from 'oscar/macros.html' import icon %}
<form method="{{ method or 'POST' }}" action="{{ url_for('index') }}" id="search_form" role="search">
+ {% if rtl %}
+ <div class="input-group">
+ {% else %}
<div class="input-group col-md-8 col-md-offset-2">
+ {% endif %}
<input type="search" name="q" class="form-control input-lg autofocus" id="q" placeholder="{{ _('Search for...') }}" autocomplete="off" value="{{ q }}">
<span class="input-group-btn">
<button type="submit" class="btn btn-default input-lg"><span class="hide_if_nojs">{{ icon('search') }}</span><span class="hidden active_if_nojs">{{ _('Start search') }}</span></button>
|