preferences.html 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439
  1. {% from 'oscar/macros.html' import preferences_item_header, preferences_item_header_rtl, preferences_item_footer, preferences_item_footer_rtl, checkbox_toggle, support_toggle, custom_select_class %}
  2. {% extends "oscar/base.html" %}
  3. {%- macro engine_about(search_engine, id) -%}
  4. {% if search_engine.about is defined or stats[search_engine.name]['result_count'] > 0 %}
  5. {% set about = search_engine.about %}
  6. <div class="engine-tooltip" role="tooltip" id="{{ id }}">{{- "" -}}
  7. {% if search_engine.about is defined %}
  8. <h5><a href="{{about.website}}" rel="noreferrer">{{about.website}}</a></h5>
  9. {%- if about.wikidata_id -%}<p><a href="https://www.wikidata.org/wiki/{{about.wikidata_id}}" rel="noreferrer">wikidata.org/wiki/{{about.wikidata_id}}</a></p>{%- endif -%}
  10. {% endif %}
  11. {%- if search_engine.enable_http %}<p>{{ icon('exclamation-sign', 'No HTTPS') }}{{ _('No HTTPS')}}</p>{% endif -%}
  12. {%- if stats[search_engine.name]['result_count'] -%}
  13. <p>{{ _('Number of results') }}: {{ stats[search_engine.name]['result_count'] }} ( {{ _('Avg.') }} )</p>{{- "" -}}
  14. {%- endif -%}
  15. </div>
  16. {%- endif -%}
  17. {%- endmacro %}
  18. {%- macro engine_time(engine_name, css_align_class) -%}
  19. <td class="{{ label }}" style="padding: 2px">{{- "" -}}
  20. {%- if stats[engine_name].time != None -%}
  21. <span class="stacked-bar-chart-value">{{- stats[engine_name].time -}}</span>{{- "" -}}
  22. <span class="stacked-bar-chart" aria-labelledby="{{engine_name}}_chart" aria-hidden="true">{{- "" -}}
  23. <span style="width: calc(max(2px, 100%*{{ (stats[engine_name].time / max_rate95)|round(3) }}))" class="stacked-bar-chart-median"></span>{{- "" -}}
  24. <span style="width: calc(100%*{{ ((stats[engine_name].rate80 - stats[engine_name].time) / max_rate95)|round(3) }})" class="stacked-bar-chart-rate80"></span>{{- "" -}}
  25. <span style="width: calc(100%*{{ ((stats[engine_name].rate95 - stats[engine_name].rate80) / max_rate95)|round(3) }})" class="stacked-bar-chart-rate95"></span>{{- "" -}}
  26. <span class="stacked-bar-chart-rate100"></span>{{- "" -}}
  27. </span>{{- "" -}}
  28. <div class="engine-tooltip text-left" role="tooltip" id="{{engine_name}}_graph">{{- "" -}}
  29. <p>{{ _('Median') }}: {{ stats[engine_name].time }}</p>{{- "" -}}
  30. <p>{{ _('P80') }}: {{ stats[engine_name].rate80 }}</p>{{- "" -}}
  31. <p>{{ _('P95') }}: {{ stats[engine_name].rate95 }}</p>{{- "" -}}
  32. </div>
  33. {%- endif -%}
  34. </td>
  35. {%- endmacro -%}
  36. {%- macro engine_reliability(engine_name, css_align_class) -%}
  37. {% set r = reliabilities.get(engine_name, {}).get('reliablity', None) %}
  38. {% set checker_result = reliabilities.get(engine_name, {}).get('checker', []) %}
  39. {% set errors = reliabilities.get(engine_name, {}).get('errors', []) %}
  40. {% if r != None %}
  41. {% if r <= 50 %}{% set label = 'danger' %}
  42. {% elif r < 80 %}{% set label = 'warning' %}
  43. {% elif r < 90 %}{% set label = 'default' %}
  44. {% else %}{% set label = 'success' %}
  45. {% endif %}
  46. {% else %}
  47. {% set r = '' %}
  48. {% endif %}
  49. {% if checker_result or errors %}
  50. <td class="{{ css_align_class }} {{ label }}">{{- "" -}}
  51. <span aria-labelledby="{{engine_name}}_reliablity">
  52. {%- if reliabilities[engine_name].checker %}{{ icon('exclamation-sign', 'The checker fails on the some tests') }}{% endif %} {{ r -}}
  53. </span>{{- "" -}}
  54. <div class="engine-tooltip text-left" role="tooltip" id="{{engine_name}}_reliablity">
  55. {%- if checker_result -%}
  56. <p>{{ _("Failed checker test(s): ") }} {{ ', '.join(checker_result) }}</p>
  57. {%- endif -%}
  58. {%- for error in errors -%}
  59. <p>{{ error }} </p>{{- "" -}}
  60. {%- endfor -%}
  61. </div>{{- "" -}}
  62. </td>
  63. {%- else -%}
  64. <td class="{{ css_align_class }} {{ label }}"><span>{{ r }}</span></td>
  65. {%- endif -%}
  66. {%- endmacro -%}
  67. {%- block title %}{{ _('preferences') }} - {% endblock -%}
  68. {% block content %}
  69. <div>
  70. <h1>{{ _('Preferences') }}</h1>
  71. <form method="post" action="{{ url_for('preferences') }}" id="search_form">
  72. <!-- Nav tabs -->
  73. <ul class="nav nav-tabs nav-justified hide_if_nojs" role="tablist">
  74. <li class="active"><a href="#tab_general" role="tab" data-toggle="tab">{{ _('General') }}</a></li>
  75. <li><a href="#tab_engine" role="tab" data-toggle="tab">{{ _('Engines') }}</a></li>
  76. <li><a href="#tab_plugins" role="tab" data-toggle="tab">{{ _('Plugins') }}</a></li>
  77. {% if answerers %}<li><a href="#tab_answerers" role="tab" data-toggle="tab">{{ _('Answerers') }}</a></li>{% endif %}
  78. <li><a href="#tab_cookies" role="tab" data-toggle="tab">{{ _('Cookies') }}</a></li>
  79. </ul>
  80. <!-- Tab panes -->
  81. <noscript>
  82. <h3>{{ _('General') }}</h3>
  83. </noscript>
  84. <div class="tab-content">
  85. <div class="tab-pane active" id="tab_general">
  86. <fieldset>
  87. <div class="container-fluid">
  88. {% if 'categories' not in locked_preferences %}
  89. <div class="row form-group">
  90. {% if rtl %}
  91. <div class="col-sm-11 col-md-10">
  92. {% include 'oscar/categories.html' %}
  93. </div>
  94. <label class="col-sm-3 col-md-2" for="categories">{{ _('Default categories') }}</label>
  95. {% else %}
  96. <label class="col-sm-3 col-md-2" for="categories">{{ _('Default categories') }}</label>
  97. <div class="col-sm-11 col-md-10 search-categories">
  98. {% include 'oscar/categories.html' %}
  99. </div>
  100. {% endif %}
  101. </div>
  102. {% endif %}
  103. {% if 'language' not in locked_preferences %}
  104. {% set language_label = _('Search language') %}
  105. {% set language_info = _('What language do you prefer for search?') %}
  106. {{ preferences_item_header(language_info, language_label, rtl, 'language') }}
  107. {% include 'oscar/languages.html' %}
  108. {{ preferences_item_footer(language_info, language_label, rtl) }}
  109. {% endif %}
  110. {% if 'locale' not in locked_preferences %}
  111. {% set locale_label = _('Interface language') %}
  112. {% set locale_info = _('Change the language of the layout') %}
  113. {{ preferences_item_header(locale_info, locale_label, rtl, 'locale') }}
  114. <select class="form-control {{ custom_select_class(rtl)}}" name="locale" id="locale">
  115. {% for locale_id,locale_name in locales.items() | sort %}
  116. <option value="{{ locale_id }}" {% if locale_id == current_locale %}selected="selected"{% endif %}>{{ locale_name }}</option>
  117. {% endfor %}
  118. </select>
  119. {{ preferences_item_footer(locale_info, locale_label, rtl) }}
  120. {% endif %}
  121. {% if 'autocomplete' not in locked_preferences %}
  122. {% set autocomplete_label = _('Autocomplete') %}
  123. {% set autocomplete_info = _('Find stuff as you type') %}
  124. {{ preferences_item_header(autocomplete_info, autocomplete_label, rtl, 'autocomplete') }}
  125. <select class="form-control {{ custom_select_class(rtl) }}" name="autocomplete" id="autocomplete">
  126. <option value=""> - </option>
  127. {% for backend in autocomplete_backends %}
  128. <option value="{{ backend }}" {% if backend == autocomplete %}selected="selected"{% endif %}>{{ backend }}</option>
  129. {% endfor %}
  130. </select>
  131. {{ preferences_item_footer(autocomplete_info, autocomplete_label, rtl) }}
  132. {% endif %}
  133. {% if 'image_proxy' not in locked_preferences %}
  134. {% set image_proxy_label = _('Image proxy') %}
  135. {% set image_proxy_info = _('Proxying image results through searx') %}
  136. {{ preferences_item_header(image_proxy_info, image_proxy_label, rtl, 'image_proxy') }}
  137. <select class="form-control {{ custom_select_class(rtl) }}" name="image_proxy" id="image_proxy">
  138. <option value="1" {% if image_proxy %}selected="selected"{% endif %}>{{ _('Enabled') }}</option>
  139. <option value="" {% if not image_proxy %}selected="selected"{% endif %}>{{ _('Disabled')}}</option>
  140. </select>
  141. {{ preferences_item_footer(image_proxy_info, image_proxy_label, rtl) }}
  142. {% endif %}
  143. {% if 'method' not in locked_preferences %}
  144. {% set method_label = _('Method') %}
  145. {% 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>') %}
  146. {{ preferences_item_header(method_info, method_label, rtl, 'method') }}
  147. <select class="form-control {{ custom_select_class(rtl) }}" name="method" id="method">
  148. <option value="POST" {% if method == 'POST' %}selected="selected"{% endif %}>POST</option>
  149. <option value="GET" {% if method == 'GET' %}selected="selected"{% endif %}>GET</option>
  150. </select>
  151. {{ preferences_item_footer(method_info, method_label, rtl) }}
  152. {% endif %}
  153. {% if 'safesearch' not in locked_preferences %}
  154. {% set safesearch_label = _('SafeSearch') %}
  155. {% set safesearch_info = _('Filter content') %}
  156. {{ preferences_item_header(safesearch_info, safesearch_label, rtl, 'safesearch') }}
  157. <select class="form-control {{ custom_select_class(rtl) }}" name="safesearch" id="safesearch">
  158. <option value="2" {% if safesearch == '2' %}selected="selected"{% endif %}>{{ _('Strict') }}</option>
  159. <option value="1" {% if safesearch == '1' %}selected="selected"{% endif %}>{{ _('Moderate') }}</option>
  160. <option value="0" {% if safesearch == '0' %}selected="selected"{% endif %}>{{ _('None') }}</option>
  161. </select>
  162. {{ preferences_item_footer(safesearch_info, safesearch_label, rtl) }}
  163. {% endif %}
  164. {% if 'theme' not in locked_preferences %}
  165. {% set theme_label = _('Themes') %}
  166. {% set theme_info = _('Change searx layout') %}
  167. {{ preferences_item_header(theme_info, theme_label, rtl, 'theme') }}
  168. <select class="form-control {{ custom_select_class(rtl) }}" name="theme" id="theme">
  169. {% for name in themes %}
  170. <option value="{{ name }}" {% if name == theme %}selected="selected"{% endif %}>{{ name }}</option>
  171. {% endfor %}
  172. </select>
  173. {{ preferences_item_footer(theme_info, theme_label, rtl) }}
  174. {% endif %}
  175. {% if 'oscar-style' not in locked_preferences %}
  176. {{ preferences_item_header(_('Choose style for this theme'), _('Style'), rtl, 'oscar_style') }}
  177. <select class="form-control {{ custom_select_class(rtl) }}" name="oscar-style" id="oscar_style">
  178. <option value="logicodev" >Logicodev</option>
  179. <option value="pointhi" {% if preferences.get_value('oscar-style') == 'pointhi' %}selected="selected"{% endif %}>Pointhi</option>
  180. <option value="logicodev-dark" {% if preferences.get_value('oscar-style') == 'logicodev-dark' %}selected="selected"{% endif %}>Logicodev dark</option>
  181. </select>
  182. {{ preferences_item_footer(_('Choose style for this theme'), _('Style'), rtl) }}
  183. {% endif %}
  184. {% if 'results_on_new_tab' not in locked_preferences %}
  185. {% set label = _('Results on new tabs') %}
  186. {% set info = _('Open result links on new browser tabs') %}
  187. {{ preferences_item_header(info, label, rtl, 'results_on_new_tab') }}
  188. <select class="form-control {{ custom_select_class(rtl) }}" name="results_on_new_tab" id="results_on_new_tab">
  189. <option value="1" {% if results_on_new_tab %}selected="selected"{% endif %}>{{ _('On') }}</option>
  190. <option value="0" {% if not results_on_new_tab %}selected="selected"{% endif %}>{{ _('Off')}}</option>
  191. </select>
  192. {{ preferences_item_footer(info, label, rtl) }}
  193. {% endif %}
  194. {% set label = _('Show advanced settings') %}
  195. {% set info = _('Show advanced settings panel in the home page by default') %}
  196. {{ preferences_item_header(info, label, rtl, 'advanced_search') }}
  197. <select class="form-control {{ custom_select_class(rtl) }}" name="advanced_search" id="advanced_search">
  198. <option value="1" {% if preferences.get_value('advanced_search')%}selected="selected"{% endif %}>{{ _('On') }}</option>
  199. <option value="0" {% if not preferences.get_value('advanced_search')%}selected="selected"{% endif %}>{{ _('Off')}}</option>
  200. </select>
  201. {{ preferences_item_footer(info, label, rtl) }}
  202. {% if 'doi_resolver' not in locked_preferences %}
  203. {% set label = _('Open Access DOI resolver') %}
  204. {% set info = _('Redirect to open-access versions of publications when available (plugin required)') %}
  205. {{ preferences_item_header(info, label, rtl, 'doi_resolver') }}
  206. <select class="form-control {{ custom_select_class(rtl) }}" name="doi_resolver" id="doi_resolver">
  207. {% for doi_resolver_name,doi_resolver_url in doi_resolvers.items() %}
  208. <option value="{{ doi_resolver_name }}" {% if doi_resolver_url == current_doi_resolver %}selected="selected"{% endif %}>
  209. {{ doi_resolver_name }} - {{ doi_resolver_url }}
  210. </option>
  211. {% endfor %}
  212. </select>
  213. {{ preferences_item_footer(info, label, rtl) }}
  214. {% endif %}
  215. {% set label = _('Engine tokens') %}
  216. {% set info = _('Access tokens for private engines') %}
  217. {{ preferences_item_header(info, label, rtl, 'tokens') }}
  218. <input class="form-control" id="tokens" name="tokens" value='{{ preferences.tokens.get_value() }}'/>
  219. {{ preferences_item_footer(info, label, rtl) }}
  220. </div>
  221. </fieldset>
  222. </div>
  223. <div class="tab-pane active_if_nojs" id="tab_engine">
  224. <!-- Nav tabs -->
  225. <ul class="nav nav-tabs nav-justified hide_if_nojs" role="tablist">
  226. {% for categ in all_categories %}
  227. <li{% if loop.first %} class="active"{% endif %}><a href="#tab_engine_{{ categ|replace(' ', '_') }}" role="tab" data-toggle="tab">{{ _(categ) }}</a></li>
  228. {% endfor %}
  229. </ul>
  230. <noscript>
  231. <h3>{{ _('Engines') }}</h3>
  232. </noscript>
  233. <!-- Tab panes -->
  234. <div class="tab-content">
  235. <div class="hide_if_nojs">
  236. <p class="text-{% if rtl %}left{% else %}right{% endif %}">
  237. <button type="button" class="btn btn-default btn-success" id="allow-all-engines">{{ _("Allow all") }}</button>
  238. <button type="button" class="btn btn-default btn-danger" id="disable-all-engines">{{ _("Disable all") }}</button>
  239. </p>
  240. </div>
  241. {% for categ in all_categories %}
  242. <noscript><label>{{ _(categ) }}</label>
  243. </noscript>
  244. <div class="tab-pane{% if loop.first %} active{% endif %} active_if_nojs" id="tab_engine_{{ categ|replace(' ', '_') }}">
  245. <div class="container-fluid">
  246. <fieldset>
  247. <div class="table-responsive">
  248. <table class="table table-hover table-condensed table-striped">
  249. <tr>
  250. {% if not rtl %}
  251. <th scope="col">{{ _("Allow") }}</th>
  252. <th scope="col">{{ _("Engine name") }}</th>
  253. <th scope="col">{{ _("Shortcut") }}</th>
  254. <th scope="col" style="width: 10rem">{{ _("Selected language") }}</th>
  255. <th scope="col" style="width: 10rem">{{ _("SafeSearch") }}</th>
  256. <th scope="col" style="width: 10rem">{{ _("Time range") }}</th>
  257. <th scope="col">{{ _("Response time") }}</th>
  258. <th scope="col" class="text-right" style="width: 7rem">{{ _("Max time") }}</th>
  259. <th scope="col" class="text-right" style="width: 7rem">{{ _("Reliablity") }}</th>
  260. {% else %}
  261. <th scope="col">{{ _("Reliablity") }}</th>
  262. <th scope="col">{{ _("Max time") }}</th>
  263. <th scope="col" class="text-right">{{ _("Response time") }}</th>
  264. <th scope="col" class="text-right">{{ _("Time range") }}</th>
  265. <th scope="col" class="text-right">{{ _("SafeSearch") }}</th>
  266. <th scope="col" class="text-right">{{ _("Selected language") }}</th>
  267. <th scope="col" class="text-right">{{ _("Shortcut") }}</th>
  268. <th scope="col" class="text-right">{{ _("Engine name") }}</th>
  269. <th scope="col" class="text-right">{{ _("Allow") }}</th>
  270. {% endif %}
  271. </tr>
  272. {% for search_engine in engines_by_category[categ] %}
  273. {% if not search_engine.private %}
  274. <tr>
  275. {% if not rtl %}
  276. <td class="onoff-checkbox">
  277. {{- checkbox_toggle('engine_' + search_engine.name|replace(' ', '_') + '__' + categ|replace(' ', '_'), (search_engine.name, categ) in disabled_engines) -}}
  278. </td>
  279. <th scope="row"><span aria-labelledby="{{ 'tooltip_' + categ + '_' + search_engine.name }}">
  280. {%- if search_engine.enable_http %}{{ icon('exclamation-sign', 'No HTTPS') }}{% endif -%}
  281. {{- search_engine.name -}}</span>
  282. {{- engine_about(search_engine, 'tooltip_' + categ + '_' + search_engine.name) -}}
  283. </th>
  284. <td class="name">{{ shortcuts[search_engine.name] }}</td>
  285. <td>{{ support_toggle(supports[search_engine.name]['supports_selected_language']) }}</td>
  286. <td>{{ support_toggle(supports[search_engine.name]['safesearch']) }}</td>
  287. <td>{{ support_toggle(supports[search_engine.name]['time_range_support']) }}</td>
  288. {{ engine_time(search_engine.name, 'text-right') }}
  289. <td class="text-right {{ 'danger' if stats[search_engine.name]['warn_timeout'] else '' }}">{% if stats[search_engine.name]['warn_timeout'] %}{{ icon('exclamation-sign') }} {% endif %}{{ search_engine.timeout }}</td>
  290. {{ engine_reliability(search_engine.name, 'text-right ') }}
  291. {% else %}
  292. {{ engine_reliability(search_engine.name, 'text-left') }}
  293. <td class="text-left {{ 'danger' if stats[search_engine.name]['warn_timeout'] else '' }}">{{ search_engine.timeout }}{% if stats[search_engine.name]['warn_time'] %} {{ icon('exclamation-sign')}}{% endif %}</td>
  294. {{ engine_time(search_engine.name, 'text-left') }}
  295. <td>{{ support_toggle(supports[search_engine.name]['time_range_support']) }}</td>
  296. <td>{{ support_toggle(supports[search_engine.name]['safesearch']) }}</td>
  297. <td>{{ support_toggle(supports[search_engine.name]['supports_selected_language']) }}</td>
  298. <td>{{ shortcuts[search_engine.name] }}</td>
  299. <th scope="row"><span>{% if search_engine.enable_http %}{{ icon('exclamation-sign', 'No HTTPS') }}{% endif %}{{ search_engine.name }}</span>{{ engine_about(search_engine) }}</th>
  300. <td class="onoff-checkbox">
  301. {{ checkbox_toggle('engine_' + search_engine.name|replace(' ', '_') + '__' + categ|replace(' ', '_'), (search_engine.name, categ) in disabled_engines) }}
  302. </td>
  303. {% endif %}
  304. </tr>
  305. {% endif %}
  306. {% endfor %}
  307. </table>
  308. </div>
  309. </fieldset>
  310. </div>
  311. </div>
  312. {% endfor %}
  313. </div>
  314. </div>
  315. <div class="tab-pane active_if_nojs" id="tab_plugins">
  316. <noscript>
  317. <h3>{{ _('Plugins') }}</h3>
  318. </noscript>
  319. <fieldset>
  320. <div class="container-fluid">
  321. {% for plugin in plugins %}
  322. {% if plugin.preference_section != 'onions' %}
  323. <div class="panel panel-default">
  324. <div class="panel-heading">
  325. <h3 class="panel-title">{{ _(plugin.name) }}</h3>
  326. </div>
  327. <div class="panel-body">
  328. <div class="col-xs-6 col-sm-4 col-md-6"><label for="{{'plugin_' + plugin.id}}">{{ _(plugin.description) }}</label></div>
  329. <div class="col-xs-6 col-sm-4 col-md-6">
  330. <div class="onoff-checkbox">
  331. {{ checkbox_toggle('plugin_' + plugin.id, plugin.id not in allowed_plugins) }}
  332. </div>
  333. </div>
  334. </div>
  335. </div>
  336. {% endif %}
  337. {% endfor %}
  338. </div>
  339. </fieldset>
  340. </div>
  341. {% if answerers %}
  342. <div class="tab-pane active_if_nojs" id="tab_answerers">
  343. <noscript>
  344. <h3>{{ _('Answerers') }}</h3>
  345. </noscript>
  346. <p class="text-muted">
  347. {{ _('This is the list of searx\'s instant answering modules.') }}
  348. </p>
  349. <table class="table table-striped">
  350. <tr>
  351. <th{% if rtl %} class="text-right"{% endif %}>{{ _('Name') }}</th>
  352. <th{% if rtl %} class="text-right"{% endif %}>{{ _('Keywords') }}</th>
  353. <th{% if rtl %} class="text-right"{% endif %}>{{ _('Description') }}</th>
  354. <th{% if rtl %} class="text-right"{% endif %}>{{ _('Examples') }}</th>
  355. </tr>
  356. {% for answerer in answerers %}
  357. <tr>
  358. <td>{{ answerer.info.name }}</td>
  359. <td>{{ answerer.keywords|join(', ') }}</td>
  360. <td>{{ answerer.info.description }}</td>
  361. <td>{{ answerer.info.examples|join(', ') }}</td>
  362. </tr>
  363. {% endfor %}
  364. </table>
  365. </div>
  366. {% endif %}
  367. <div class="tab-pane active_if_nojs" id="tab_cookies">
  368. <noscript>
  369. <h3>{{ _('Cookies') }}</h3>
  370. </noscript>
  371. <p class="text-muted">
  372. {{ _('This is the list of cookies and their values searx is storing on your computer.') }}<br />
  373. {{ _('With that list, you can assess searx transparency.') }}<br />
  374. </p>
  375. {% if cookies %}
  376. <table class="table table-striped">
  377. <tr>
  378. <th class="text-muted{% if rtl %} text-right{% endif %}">{{ _('Cookie name') }}</th>
  379. <th class="text-muted{% if rtl %} text-right{% endif %}">{{ _('Value') }}</th>
  380. </tr>
  381. {% for cookie in cookies %}
  382. <tr>
  383. <td class="text-muted">{{ cookie }}</td>
  384. <td class="text-muted">{{ cookies[cookie] }}</td>
  385. </tr>
  386. {% endfor %}
  387. </table>
  388. {% else %}
  389. {% include 'oscar/messages/no_cookies.html' %}
  390. {% endif %}
  391. </div>
  392. </div>
  393. <p class="text-muted">
  394. {{ _('These settings are stored in your cookies, this allows us not to store this data about you.') }}
  395. {{ _("These cookies serve your sole convenience, we don't use these cookies to track you.") }}
  396. </p>
  397. <p>
  398. {{ _('Search URL of the currently saved preferences') }}
  399. <small class="text-muted">({{ _('Note: specifying custom settings in the search URL can reduce privacy by leaking data to the clicked result sites.') }})</small>:
  400. </p>
  401. <div class="tab-pane">
  402. <input readonly="" class="form-control select-all-on-click cursor-text" type="url" value="{{ url_for('index', _external=True) }}?preferences={{ preferences_url_params|e }}{% raw %}&amp;q=%s{% endraw %}">
  403. <input type="submit" class="btn btn-primary" value="{{ _('save') }}" />
  404. <a href="{{ url_for('index') }}"><div class="btn btn-default">{{ _('back') }}</div></a>
  405. <a href="{{ url_for('clear_cookies') }}"><div class="btn btn-default">{{ _('Reset defaults') }}</div></a>
  406. </div>
  407. </form>
  408. </div>
  409. {% endblock %}