| 
									
										
										
										
											2015-01-16 00:56:54 +01:00
										 |  |  | {% extends "courgette/base.html" %} | 
					
						
							| 
									
										
										
										
											2014-08-18 10:44:46 +02:00
										 |  |  | {% block head %} {% endblock %} | 
					
						
							|  |  |  | {% block content %} | 
					
						
							|  |  |  | <div class="row"> | 
					
						
							|  |  |  |     <h2>{{ _('Preferences') }}</h2> | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     <form method="post" action="{{ url_for('preferences') }}" id="search_form"> | 
					
						
							|  |  |  |     <fieldset> | 
					
						
							|  |  |  |         <legend>{{ _('Default categories') }}</legend> | 
					
						
							| 
									
										
										
										
											2015-01-16 00:56:54 +01:00
										 |  |  |         {% include 'courgette/categories.html' %} | 
					
						
							| 
									
										
										
										
											2014-08-18 10:44:46 +02:00
										 |  |  |     </fieldset> | 
					
						
							|  |  |  |     <fieldset> | 
					
						
							|  |  |  |         <legend>{{ _('Search language') }}</legend> | 
					
						
							|  |  |  |         <p> | 
					
						
							| 
									
										
										
										
											2015-01-16 00:56:54 +01:00
										 |  |  |             <select name='language'> | 
					
						
							|  |  |  |                 <option value="all" {% if current_language == 'all' %}selected="selected"{% endif %}>{{ _('Automatic') }}</option> | 
					
						
							| 
									
										
										
										
											2015-02-13 01:03:18 +01:00
										 |  |  |                 {% for lang_id,lang_name,country_name in language_codes | sort(attribute=1) %} | 
					
						
							| 
									
										
										
										
											2015-01-16 00:56:54 +01:00
										 |  |  |                 <option value="{{ lang_id }}" {% if lang_id == current_language %}selected="selected"{% endif %}>{{ lang_name }} ({{ country_name }}) - {{ lang_id }}</option> | 
					
						
							|  |  |  |                 {% endfor %} | 
					
						
							|  |  |  |             </select> | 
					
						
							| 
									
										
										
										
											2014-08-18 10:44:46 +02:00
										 |  |  |         </p> | 
					
						
							|  |  |  |     </fieldset> | 
					
						
							|  |  |  |     <fieldset> | 
					
						
							|  |  |  |         <legend>{{ _('Interface language') }}</legend> | 
					
						
							|  |  |  |         <p> | 
					
						
							| 
									
										
										
										
											2015-01-16 00:56:54 +01:00
										 |  |  |             <select name='locale'> | 
					
						
							| 
									
										
										
										
											2015-02-13 01:03:18 +01:00
										 |  |  |                 {% for locale_id,locale_name in locales.items() | sort %} | 
					
						
							| 
									
										
										
										
											2015-01-16 00:56:54 +01:00
										 |  |  |                 <option value="{{ locale_id }}" {% if locale_id == current_locale %}selected="selected"{% endif %}>{{ locale_name }}</option> | 
					
						
							|  |  |  |                 {% endfor %} | 
					
						
							|  |  |  |             </select> | 
					
						
							| 
									
										
										
										
											2014-08-18 10:44:46 +02:00
										 |  |  |         </p> | 
					
						
							|  |  |  |     </fieldset> | 
					
						
							|  |  |  |     <fieldset> | 
					
						
							|  |  |  |         <legend>{{ _('Autocomplete') }}</legend> | 
					
						
							|  |  |  |         <p> | 
					
						
							| 
									
										
										
										
											2015-01-16 00:56:54 +01:00
										 |  |  |             <select name="autocomplete"> | 
					
						
							|  |  |  |                 <option value=""> - </option> | 
					
						
							|  |  |  |                 {% for backend in autocomplete_backends %} | 
					
						
							|  |  |  |                 <option value="{{ backend }}" {% if backend == autocomplete %}selected="selected"{% endif %}>{{ backend }}</option> | 
					
						
							|  |  |  |                 {% endfor %} | 
					
						
							|  |  |  |             </select> | 
					
						
							| 
									
										
										
										
											2014-08-18 10:44:46 +02:00
										 |  |  |         </p> | 
					
						
							|  |  |  |     </fieldset> | 
					
						
							| 
									
										
										
										
											2015-01-16 16:58:44 +01:00
										 |  |  |     <fieldset> | 
					
						
							|  |  |  |         <legend>{{ _('Image proxy') }}</legend> | 
					
						
							|  |  |  |         <p> | 
					
						
							|  |  |  |             <select 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> | 
					
						
							|  |  |  |         </p> | 
					
						
							|  |  |  |     </fieldset> | 
					
						
							| 
									
										
										
										
											2014-08-18 10:44:46 +02:00
										 |  |  |     <fieldset> | 
					
						
							|  |  |  |         <legend>{{ _('Method') }}</legend> | 
					
						
							|  |  |  |         <p> | 
					
						
							| 
									
										
										
										
											2015-01-16 00:56:54 +01:00
										 |  |  |             <select 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> | 
					
						
							| 
									
										
										
										
											2014-08-18 10:44:46 +02:00
										 |  |  |         </p> | 
					
						
							|  |  |  |     </fieldset> | 
					
						
							| 
									
										
										
										
											2015-02-08 21:53:37 +01:00
										 |  |  |     <fieldset> | 
					
						
							|  |  |  |         <legend>{{ _('SafeSearch') }}</legend> | 
					
						
							|  |  |  |         <p> | 
					
						
							|  |  |  |             <select 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> | 
					
						
							|  |  |  |         </p> | 
					
						
							|  |  |  |     </fieldset> | 
					
						
							| 
									
										
										
										
											2014-08-18 10:44:46 +02:00
										 |  |  |     <fieldset> | 
					
						
							|  |  |  |         <legend>{{ _('Themes') }}</legend> | 
					
						
							|  |  |  |         <p> | 
					
						
							| 
									
										
										
										
											2015-01-16 00:56:54 +01:00
										 |  |  |             <select name="theme"> | 
					
						
							|  |  |  |                 {% for name in themes %} | 
					
						
							|  |  |  |                 <option value="{{ name }}" {% if name == theme %}selected="selected"{% endif %}>{{ name }}</option> | 
					
						
							|  |  |  |                 {% endfor %} | 
					
						
							|  |  |  |             </select> | 
					
						
							| 
									
										
										
										
											2014-08-18 10:44:46 +02:00
										 |  |  |         </p> | 
					
						
							|  |  |  |     </fieldset> | 
					
						
							| 
									
										
										
										
											2015-01-19 22:07:19 +01:00
										 |  |  |     <fieldset> | 
					
						
							|  |  |  |         <legend>{{ _('Color') }}</legend> | 
					
						
							|  |  |  |         <p> | 
					
						
							|  |  |  |             <select name="courgette-color"> | 
					
						
							|  |  |  |                 <option value="#3498DB #0665A2" {% if cookies['courgette-color'] and cookies['courgette-color'] == '#3498DB #0665A2' %}selected="selected"{% endif %}>{{ _('Blue (default)') }}</option> | 
					
						
							|  |  |  |                 <option value="#6F5499 #563D7C" {% if cookies['courgette-color'] and cookies['courgette-color'] == '#6F5499 #563D7C' %}selected="selected"{% endif %}>{{ _('Violet') }}</option> | 
					
						
							|  |  |  |                 <option value="#5CB85C #449D44" {% if cookies['courgette-color'] and cookies['courgette-color'] == '#5CB85C #449D44' %}selected="selected"{% endif %}>{{ _('Green') }}</option> | 
					
						
							|  |  |  |                 <option value="#5BC0DE #31B0D5" {% if cookies['courgette-color'] and cookies['courgette-color'] == '#5BC0DE #31B0D5' %}selected="selected"{% endif %}>{{ _('Cyan') }}</option> | 
					
						
							|  |  |  |                 <option value="#F0AD4E #EC971F" {% if cookies['courgette-color'] and cookies['courgette-color'] == '#F0AD4E #EC971F' %}selected="selected"{% endif %}>{{ _('Orange') }}</option> | 
					
						
							|  |  |  |                 <option value="#D9534F #C9302C" {% if cookies['courgette-color'] and cookies['courgette-color'] == '#D9534F #C9302C' %}selected="selected"{% endif %}>{{ _('Red') }}</option> | 
					
						
							|  |  |  |             </select> | 
					
						
							|  |  |  |         </p> | 
					
						
							|  |  |  |     </fieldset> | 
					
						
							| 
									
										
										
										
											2014-08-18 10:44:46 +02:00
										 |  |  |     <fieldset> | 
					
						
							| 
									
										
										
										
											2015-01-16 00:56:54 +01:00
										 |  |  |         <legend>{{ _('Currently used search engines') }}</legend> | 
					
						
							| 
									
										
										
										
											2014-08-18 10:44:46 +02:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-02-11 22:00:13 +01:00
										 |  |  |         <table class="engine-table"> | 
					
						
							| 
									
										
										
										
											2014-08-18 10:44:46 +02:00
										 |  |  |             <tr> | 
					
						
							| 
									
										
										
										
											2015-01-16 00:56:54 +01:00
										 |  |  |                 <th>{{ _('Engine name') }}</th> | 
					
						
							|  |  |  |                 <th>{{ _('Category') }}</th> | 
					
						
							|  |  |  |                 <th>{{ _('Allow') }} / {{ _('Block') }}</th> | 
					
						
							| 
									
										
										
										
											2014-08-18 10:44:46 +02:00
										 |  |  |             </tr> | 
					
						
							| 
									
										
										
										
											2015-06-05 08:48:47 +02:00
										 |  |  |         {% for categ in all_categories %} | 
					
						
							| 
									
										
										
										
											2015-04-07 18:09:38 +02:00
										 |  |  |             {% for search_engine in engines_by_category[categ] %} | 
					
						
							| 
									
										
										
										
											2015-01-16 00:56:54 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  |                 {% if not search_engine.private %} | 
					
						
							|  |  |  |                 <tr> | 
					
						
							| 
									
										
										
										
											2015-02-10 15:23:56 +01:00
										 |  |  |                     <td>{{ search_engine.name }} ({{ shortcuts[search_engine.name] }})‎</td> | 
					
						
							| 
									
										
										
										
											2015-01-16 00:56:54 +01:00
										 |  |  |                     <td>{{ _(categ) }}</td> | 
					
						
							|  |  |  |                     <td class="engine_checkbox"> | 
					
						
							| 
									
										
										
										
											2016-04-09 18:48:23 +02:00
										 |  |  |                         <input type="checkbox" id="engine_{{ categ|replace(' ', '_') }}_{{ search_engine.name|replace(' ', '_') }}" name="engine_{{ search_engine.name }}__{{ categ }}"{% if (search_engine.name, categ) in disabled_engines %} checked="checked"{% endif %} /> | 
					
						
							| 
									
										
										
										
											2015-01-16 00:56:54 +01:00
										 |  |  |                         <label class="allow" for="engine_{{ categ|replace(' ', '_') }}_{{ search_engine.name|replace(' ', '_') }}">{{ _('Allow') }}</label> | 
					
						
							|  |  |  |                         <label class="deny" for="engine_{{ categ|replace(' ', '_') }}_{{ search_engine.name|replace(' ', '_') }}">{{ _('Block') }}</label> | 
					
						
							|  |  |  |                     </td> | 
					
						
							|  |  |  |                 </tr> | 
					
						
							|  |  |  |                 {% endif %} | 
					
						
							|  |  |  |             {% endfor %} | 
					
						
							| 
									
										
										
										
											2014-08-18 10:44:46 +02:00
										 |  |  |         {% endfor %} | 
					
						
							| 
									
										
										
										
											2015-01-16 00:56:54 +01:00
										 |  |  |         </table> | 
					
						
							| 
									
										
										
										
											2014-08-18 10:44:46 +02:00
										 |  |  |     </fieldset> | 
					
						
							|  |  |  |     <p class="small_font">{{ _('These settings are stored in your cookies, this allows us not to store this data about you.') }} | 
					
						
							| 
									
										
										
										
											2015-01-16 00:56:54 +01:00
										 |  |  |         <br /> | 
					
						
							|  |  |  |         {{ _("These cookies serve your sole convenience, we don't use these cookies to track you.") }} | 
					
						
							| 
									
										
										
										
											2014-08-18 10:44:46 +02:00
										 |  |  |     </p> | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     <input type="submit" value="{{ _('save') }}" /> | 
					
						
							| 
									
										
										
										
											2015-04-07 11:07:48 +02:00
										 |  |  |     <div class="right preferences_back"><a href="{{ url_for('clear_cookies') }}">{{ _('Reset defaults') }}</a></div> | 
					
						
							| 
									
										
										
										
											2015-01-16 00:56:54 +01:00
										 |  |  |     <div class="right preferences_back"><a href="{{ url_for('index') }}">{{ _('back') }}</a></div> | 
					
						
							| 
									
										
										
										
											2015-04-07 11:07:48 +02:00
										 |  |  |     </form> | 
					
						
							| 
									
										
										
										
											2014-08-18 10:44:46 +02:00
										 |  |  | </div> | 
					
						
							| 
									
										
										
										
											2015-01-16 16:58:44 +01:00
										 |  |  | {% endblock %} |