preferences.html 3.5KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. {% extends "default/base.html" %}
  2. {% block head %} {% endblock %}
  3. {% block content %}
  4. <div class="row">
  5. <h2>{{ _('Preferences') }}</h2>
  6. <form method="post" action="{{ url_for('preferences') }}" id="search_form">
  7. <fieldset>
  8. <legend>{{ _('Search language') }}</legend>
  9. <p>
  10. <select name='language'>
  11. <option value="all" {% if current_language == 'all' %}selected="selected"{% endif %}>{{ _('Automatic') }}</option>
  12. {% for lang_id,lang_name,country_name in language_codes | sort(attribute=1) %}
  13. <option value="{{ lang_id }}" {% if lang_id == current_language %}selected="selected"{% endif %}>{{ lang_name }} ({{ country_name }}) - {{ lang_id }}</option>
  14. {% endfor %}
  15. </select>
  16. </p>
  17. </fieldset>
  18. <fieldset>
  19. <legend>{{ _('Interface language') }}</legend>
  20. <p>
  21. <select name='locale'>
  22. {% for locale_id,locale_name in locales.items() | sort %}
  23. <option value="{{ locale_id }}" {% if locale_id == current_locale %}selected="selected"{% endif %}>{{ locale_name }}</option>
  24. {% endfor %}
  25. </select>
  26. </p>
  27. </fieldset>
  28. <fieldset>
  29. <legend>{{ _('Method') }}</legend>
  30. <p>
  31. <select name='method'>
  32. <option value="POST" {% if method == 'POST' %}selected="selected"{% endif %}>POST</option>
  33. <option value="GET" {% if method == 'GET' %}selected="selected"{% endif %}>GET</option>
  34. </select>
  35. </p>
  36. </fieldset>
  37. <fieldset>
  38. <legend>{{ _('Themes') }}</legend>
  39. <p>
  40. <select name="theme">
  41. {% for name in themes %}
  42. <option value="{{ name }}" {% if name == theme %}selected="selected"{% endif %}>{{ name }}</option>
  43. {% endfor %}
  44. </select>
  45. </p>
  46. </fieldset>
  47. <fieldset>
  48. <legend>{{ _('Currently used search engines') }}</legend>
  49. <table>
  50. <tr>
  51. <th>{{ _('Engine name') }}</th>
  52. <th>{{ _('Allow') }} / {{ _('Block') }}</th>
  53. </tr>
  54. {% for (categ,search_engines) in categs %}
  55. {% for search_engine in search_engines %}
  56. {% if not search_engine.private %}
  57. <tr>
  58. <td>{{ search_engine.name }} ({{ shortcuts[search_engine.name] }})&lrm;</td>
  59. <td class="engine_checkbox">
  60. <input 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 %} />
  61. <label class="allow" for="engine_{{ categ|replace(' ', '_') }}_{{ search_engine.name|replace(' ', '_') }}">{{ _('Allow') }}</label>
  62. <label class="deny" for="engine_{{ categ|replace(' ', '_') }}_{{ search_engine.name|replace(' ', '_') }}">{{ _('Block') }}</label>
  63. </td>
  64. </tr>
  65. {% endif %}
  66. {% endfor %}
  67. {% endfor %}
  68. </table>
  69. </fieldset>
  70. <p class="small_font">{{ _('These settings are stored in your cookies, this allows us not to store this data about you.') }}
  71. <br />
  72. {{ _("These cookies serve your sole convenience, we don't use these cookies to track you.") }}
  73. </p>
  74. <input type="submit" value="{{ _('save') }}" />
  75. <div class="{% if rtl %}left{% else %}right{% endif %} preferences_back"><a href="{{ url_for('index') }}">{{ _('back') }}</a></div>
  76. </form>
  77. </div>
  78. {% endblock %}