mirror of
				https://github.com/searxng/searxng
				synced 2024-01-01 19:24:07 +01:00 
			
		
		
		
	[fix] indentation
This commit is contained in:
		
							parent
							
								
									18e7d60702
								
							
						
					
					
						commit
						5c5ff19ec1
					
				
					 1 changed files with 162 additions and 162 deletions
				
			
		|  | @ -12,179 +12,179 @@ | ||||||
|     <h1>{{ _('Preferences') }}</h1> |     <h1>{{ _('Preferences') }}</h1> | ||||||
|     <form method="post" action="{{ url_for('preferences') }}" id="search_form"> |     <form method="post" action="{{ url_for('preferences') }}" id="search_form"> | ||||||
| 
 | 
 | ||||||
|     <!-- Nav tabs --> |         <!-- Nav tabs --> | ||||||
|     <ul class="nav nav-tabs nav-justified 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 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> |           <li><a href="#tab_engine" role="tab" data-toggle="tab">{{ _('Engines') }}</a></li> | ||||||
|       <li><a href="#tab_plugins" role="tab" data-toggle="tab">{{ _('Plugins') }}</a></li> |           <li><a href="#tab_plugins" role="tab" data-toggle="tab">{{ _('Plugins') }}</a></li> | ||||||
|     </ul> |         </ul> | ||||||
| 
 | 
 | ||||||
|     <!-- Tab panes --> |         <!-- Tab panes --> | ||||||
|     <noscript> |         <noscript> | ||||||
|         <h3>{{ _('General') }}</h3> |             <h3>{{ _('General') }}</h3> | ||||||
|     </noscript> |         </noscript> | ||||||
|     <div class="tab-content"> |         <div class="tab-content"> | ||||||
|         <div class="tab-pane active" id="tab_general"> |             <div class="tab-pane active" id="tab_general"> | ||||||
|             <fieldset> |                 <fieldset> | ||||||
|             <div class="container-fluid"> |                 <div class="container-fluid"> | ||||||
|                 <div class="row form-group"> |                     <div class="row form-group"> | ||||||
|                     {% if rtl %} |                         {% if rtl %} | ||||||
|                     <div class="col-sm-11 col-md-10"> |                         <div class="col-sm-11 col-md-10"> | ||||||
|                         {% include 'oscar/categories.html' %} |                             {% include 'oscar/categories.html' %} | ||||||
|                     </div> |                         </div> | ||||||
|                     <label class="col-sm-3 col-md-2">{{ _('Default categories') }}</label> |                         <label class="col-sm-3 col-md-2">{{ _('Default categories') }}</label> | ||||||
|                     {% else %} |                         {% else %} | ||||||
|                     <label class="col-sm-3 col-md-2">{{ _('Default categories') }}</label> |                         <label class="col-sm-3 col-md-2">{{ _('Default categories') }}</label> | ||||||
|                     <div class="col-sm-11 col-md-10"> |                         <div class="col-sm-11 col-md-10"> | ||||||
|                         {% include 'oscar/categories.html' %} |                             {% include 'oscar/categories.html' %} | ||||||
|                     </div> |                         </div> | ||||||
|                     {% endif %} |  | ||||||
|                 </div> |  | ||||||
|                 {% set language_label = _('Search language') %} |  | ||||||
|                 {% set language_info = _('What language do you prefer for search?') %} |  | ||||||
|                 {{ preferences_item_header(language_info, language_label, rtl) }} |  | ||||||
|                     <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 | sort(attribute=1) %} |  | ||||||
|                         <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, rtl) }} |  | ||||||
| 
 |  | ||||||
|                 {% set locale_label = _('Interface language') %} |  | ||||||
|                 {% set locale_info = _('Change the language of the layout') %} |  | ||||||
|                 {{ preferences_item_header(locale_info, locale_label, rtl) }} |  | ||||||
|                     <select class="form-control" name='locale'> |  | ||||||
|                         {% for locale_id,locale_name in locales.items() | sort %} |  | ||||||
|                         <option value="{{ locale_id }}" {% if locale_id == current_locale %}selected="selected"{% endif %}>{{ locale_name }}</option> |  | ||||||
|                         {% endfor %} |  | ||||||
|                     </select> |  | ||||||
|                 {{ preferences_item_footer(locale_info, locale_label, rtl) }} |  | ||||||
| 
 |  | ||||||
|                 {% set autocomplete_label = _('Autocomplete') %} |  | ||||||
|                 {% set autocomplete_info = _('Find stuff as you type') %} |  | ||||||
|                 {{ preferences_item_header(autocomplete_info, autocomplete_label, rtl) }} |  | ||||||
|                     <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, rtl) }} |  | ||||||
| 
 |  | ||||||
|                 {% set image_proxy_label = _('Image proxy') %} |  | ||||||
|                 {% set image_proxy_info = _('Proxying image results through searx') %} |  | ||||||
|                 {{ preferences_item_header(image_proxy_info, image_proxy_label, rtl) }} |  | ||||||
|                     <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, rtl) }} |  | ||||||
| 
 |  | ||||||
|                 {% 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, rtl) }} |  | ||||||
|                     <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, rtl) }} |  | ||||||
| 
 |  | ||||||
|                 {% set safesearch_label = _('SafeSearch') %} |  | ||||||
|                 {% set safesearch_info = _('Filter content') %} |  | ||||||
|                 {{ preferences_item_header(safesearch_info, safesearch_label, rtl) }} |  | ||||||
|                     <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, rtl) }} |  | ||||||
| 
 |  | ||||||
|                 {% set theme_label = _('Themes') %} |  | ||||||
|                 {% set theme_info = _('Change searx layout') %} |  | ||||||
|                 {{ preferences_item_header(theme_info, theme_label, rtl) }} |  | ||||||
|                     <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, rtl) }} |  | ||||||
|             </div> |  | ||||||
|             </fieldset> |  | ||||||
|         </div> |  | ||||||
|         <div class="tab-pane active_if_nojs" id="tab_engine"> |  | ||||||
| 
 |  | ||||||
|             <!-- Nav tabs --> |  | ||||||
|             <ul class="nav nav-tabs nav-justified hide_if_nojs" role="tablist" style="margin-bottom:20px;"> |  | ||||||
|                 {% for categ in categories %} |  | ||||||
|                 <li{% if loop.first %} class="active"{% endif %}><a href="#tab_engine_{{ categ|replace(' ', '_') }}" role="tab" data-toggle="tab">{{ _(categ) }}</a></li> |  | ||||||
|                 {% endfor %} |  | ||||||
|             </ul> |  | ||||||
| 
 |  | ||||||
|             <noscript> |  | ||||||
|                 <h3>{{ _('Engines') }}</h3> |  | ||||||
|             </noscript> |  | ||||||
| 
 |  | ||||||
|             <!-- Tab panes --> |  | ||||||
|             <div class="tab-content"> |  | ||||||
|                 {% for categ in categories %} |  | ||||||
|                 <noscript><label>{{ _(categ) }}</label> |  | ||||||
|                 </noscript> |  | ||||||
|                 <div class="tab-pane{% if loop.first %} active{% endif %} active_if_nojs" id="tab_engine_{{ categ|replace(' ', '_') }}"> |  | ||||||
|                     <div class="container-fluid"> |  | ||||||
|                     <fieldset> |  | ||||||
|                     {% for search_engine in engines_by_category[categ] %} |  | ||||||
|                         {% 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"> |  | ||||||
|                                     {{ checkbox_toggle('engine_' + search_engine.name|replace(' ', '_') + '__' + categ|replace(' ', '_'), (search_engine.name, categ) in blocked_engines) }} |  | ||||||
|                                 </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 %} |                         {% endif %} | ||||||
|                     {% endfor %} |  | ||||||
|                     </fieldset> |  | ||||||
|                     </div> |                     </div> | ||||||
|  |                     {% set language_label = _('Search language') %} | ||||||
|  |                     {% set language_info = _('What language do you prefer for search?') %} | ||||||
|  |                     {{ preferences_item_header(language_info, language_label, rtl) }} | ||||||
|  |                         <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 | sort(attribute=1) %} | ||||||
|  |                             <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, rtl) }} | ||||||
|  | 
 | ||||||
|  |                     {% set locale_label = _('Interface language') %} | ||||||
|  |                     {% set locale_info = _('Change the language of the layout') %} | ||||||
|  |                     {{ preferences_item_header(locale_info, locale_label, rtl) }} | ||||||
|  |                         <select class="form-control" name='locale'> | ||||||
|  |                             {% for locale_id,locale_name in locales.items() | sort %} | ||||||
|  |                             <option value="{{ locale_id }}" {% if locale_id == current_locale %}selected="selected"{% endif %}>{{ locale_name }}</option> | ||||||
|  |                             {% endfor %} | ||||||
|  |                         </select> | ||||||
|  |                     {{ preferences_item_footer(locale_info, locale_label, rtl) }} | ||||||
|  | 
 | ||||||
|  |                     {% set autocomplete_label = _('Autocomplete') %} | ||||||
|  |                     {% set autocomplete_info = _('Find stuff as you type') %} | ||||||
|  |                     {{ preferences_item_header(autocomplete_info, autocomplete_label, rtl) }} | ||||||
|  |                         <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, rtl) }} | ||||||
|  | 
 | ||||||
|  |                     {% set image_proxy_label = _('Image proxy') %} | ||||||
|  |                     {% set image_proxy_info = _('Proxying image results through searx') %} | ||||||
|  |                     {{ preferences_item_header(image_proxy_info, image_proxy_label, rtl) }} | ||||||
|  |                         <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, rtl) }} | ||||||
|  | 
 | ||||||
|  |                     {% 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, rtl) }} | ||||||
|  |                         <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, rtl) }} | ||||||
|  | 
 | ||||||
|  |                     {% set safesearch_label = _('SafeSearch') %} | ||||||
|  |                     {% set safesearch_info = _('Filter content') %} | ||||||
|  |                     {{ preferences_item_header(safesearch_info, safesearch_label, rtl) }} | ||||||
|  |                         <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, rtl) }} | ||||||
|  | 
 | ||||||
|  |                     {% set theme_label = _('Themes') %} | ||||||
|  |                     {% set theme_info = _('Change searx layout') %} | ||||||
|  |                     {{ preferences_item_header(theme_info, theme_label, rtl) }} | ||||||
|  |                         <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, rtl) }} | ||||||
|                 </div> |                 </div> | ||||||
|                 {% endfor %} |                 </fieldset> | ||||||
|             </div> |             </div> | ||||||
|         </div> |             <div class="tab-pane active_if_nojs" id="tab_engine"> | ||||||
|         <div class="tab-pane active_if_nojs" id="tab_plugins"> | 
 | ||||||
|             <noscript> |                 <!-- Nav tabs --> | ||||||
|                 <h3>{{ _('Plugins') }}</h3> |                 <ul class="nav nav-tabs nav-justified hide_if_nojs" role="tablist" style="margin-bottom:20px;"> | ||||||
|             </noscript> |                     {% for categ in categories %} | ||||||
|             <fieldset> |                     <li{% if loop.first %} class="active"{% endif %}><a href="#tab_engine_{{ categ|replace(' ', '_') }}" role="tab" data-toggle="tab">{{ _(categ) }}</a></li> | ||||||
|             <div class="container-fluid"> |                     {% endfor %} | ||||||
|                 {% for plugin in plugins %} |                 </ul> | ||||||
|                 <div class="panel panel-default"> | 
 | ||||||
|                     <div class="panel-heading"> |                 <noscript> | ||||||
|                         <h3 class="panel-title">{{ plugin.name }}</h3> |                     <h3>{{ _('Engines') }}</h3> | ||||||
|                     </div> |                 </noscript> | ||||||
|                     <div class="panel-body"> | 
 | ||||||
|                         <div class="col-xs-6 col-sm-4 col-md-6">{{ plugin.description }}</div> |                 <!-- Tab panes --> | ||||||
|                         <div class="col-xs-6 col-sm-4 col-md-6"> |                 <div class="tab-content"> | ||||||
|                             {{ checkbox_toggle('plugin_' + plugin.id, plugin.id not in allowed_plugins) }} |                     {% for categ in categories %} | ||||||
|  |                     <noscript><label>{{ _(categ) }}</label> | ||||||
|  |                     </noscript> | ||||||
|  |                     <div class="tab-pane{% if loop.first %} active{% endif %} active_if_nojs" id="tab_engine_{{ categ|replace(' ', '_') }}"> | ||||||
|  |                         <div class="container-fluid"> | ||||||
|  |                         <fieldset> | ||||||
|  |                         {% for search_engine in engines_by_category[categ] %} | ||||||
|  |                             {% 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"> | ||||||
|  |                                         {{ checkbox_toggle('engine_' + search_engine.name|replace(' ', '_') + '__' + categ|replace(' ', '_'), (search_engine.name, categ) in blocked_engines) }} | ||||||
|  |                                     </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 %} | ||||||
|  |                         </fieldset> | ||||||
|                         </div> |                         </div> | ||||||
|                     </div> |                     </div> | ||||||
|  |                     {% endfor %} | ||||||
|                 </div> |                 </div> | ||||||
|                 {% endfor %} |  | ||||||
|             </div> |             </div> | ||||||
|             </fieldset> |             <div class="tab-pane active_if_nojs" id="tab_plugins"> | ||||||
|  |                 <noscript> | ||||||
|  |                     <h3>{{ _('Plugins') }}</h3> | ||||||
|  |                 </noscript> | ||||||
|  |                 <fieldset> | ||||||
|  |                 <div class="container-fluid"> | ||||||
|  |                     {% for plugin in plugins %} | ||||||
|  |                     <div class="panel panel-default"> | ||||||
|  |                         <div class="panel-heading"> | ||||||
|  |                             <h3 class="panel-title">{{ plugin.name }}</h3> | ||||||
|  |                         </div> | ||||||
|  |                         <div class="panel-body"> | ||||||
|  |                             <div class="col-xs-6 col-sm-4 col-md-6">{{ plugin.description }}</div> | ||||||
|  |                             <div class="col-xs-6 col-sm-4 col-md-6"> | ||||||
|  |                                 {{ checkbox_toggle('plugin_' + plugin.id, plugin.id not in allowed_plugins) }} | ||||||
|  |                             </div> | ||||||
|  |                         </div> | ||||||
|  |                     </div> | ||||||
|  |                     {% endfor %} | ||||||
|  |                 </div> | ||||||
|  |                 </fieldset> | ||||||
|  |             </div> | ||||||
|         </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.') }} | ||||||
|     <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 /> | ||||||
|     <br /> |         {{ _("These cookies serve your sole convenience, we don't use these cookies to track you.") }} | ||||||
|     {{ _("These cookies serve your sole convenience, we don't use these cookies to track you.") }} |         </p> | ||||||
|     </p> |  | ||||||
| 
 | 
 | ||||||
|     <input type="submit" class="btn btn-primary" value="{{ _('save') }}" /> |         <input type="submit" class="btn btn-primary" value="{{ _('save') }}" /> | ||||||
| 	<a href="{{ url_for('index') }}"><div class="btn btn-default">{{ _('back') }}</div></a> |         <a href="{{ url_for('index') }}"><div class="btn btn-default">{{ _('back') }}</div></a> | ||||||
| 	<a href="{{ url_for('clear_cookies') }}"><div class="btn btn-default">{{ _('Reset defaults') }}</div></a> |         <a href="{{ url_for('clear_cookies') }}"><div class="btn btn-default">{{ _('Reset defaults') }}</div></a> | ||||||
|     </form> |     </form> | ||||||
| </div> | </div> | ||||||
| {% endblock %} | {% endblock %} | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Adam Tauber
						Adam Tauber