preferences.html 28 KB

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