preferences.html 4.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  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>{{ _('Default categories') }}</legend>
  9. <p>
  10. {% include 'default/categories.html' %}
  11. </p>
  12. </fieldset>
  13. <fieldset>
  14. <legend>{{ _('Search language') }}</legend>
  15. <p>
  16. <select name='language'>
  17. <option value="all" {% if current_language == 'all' %}selected="selected"{% endif %}>{{ _('Automatic') }}</option>
  18. {% for lang_id,lang_name,country_name in language_codes %}
  19. <option value="{{ lang_id }}" {% if lang_id == current_language %}selected="selected"{% endif %}>{{ lang_name }} ({{ country_name }}) - {{ lang_id }}</option>
  20. {% endfor %}
  21. </select>
  22. </p>
  23. </fieldset>
  24. <fieldset>
  25. <legend>{{ _('Interface language') }}</legend>
  26. <p>
  27. <select name='locale'>
  28. {% for locale_id,locale_name in locales.items() %}
  29. <option value="{{ locale_id }}" {% if locale_id == current_locale %}selected="selected"{% endif %}>{{ locale_name }}</option>
  30. {% endfor %}
  31. </select>
  32. </p>
  33. </fieldset>
  34. <fieldset>
  35. <legend>{{ _('Autocomplete') }}</legend>
  36. <p>
  37. <select name="autocomplete">
  38. <option value=""> - </option>
  39. {% for backend in autocomplete_backends %}
  40. <option value="{{ backend }}" {% if backend == autocomplete %}selected="selected"{% endif %}>{{ backend }}</option>
  41. {% endfor %}
  42. </select>
  43. </p>
  44. </fieldset>
  45. <fieldset>
  46. <legend>{{ _('Method') }}</legend>
  47. <p>
  48. <select name='method'>
  49. <option value="POST" {% if method == 'POST' %}selected="selected"{% endif %}>POST</option>
  50. <option value="GET" {% if method == 'GET' %}selected="selected"{% endif %}>GET</option>
  51. </select>
  52. </p>
  53. </fieldset>
  54. <fieldset>
  55. <legend>{{ _('Themes') }}</legend>
  56. <p>
  57. <select name="theme">
  58. {% for name in themes %}
  59. <option value="{{ name }}" {% if name == theme %}selected="selected"{% endif %}>{{ name }}</option>
  60. {% endfor %}
  61. </select>
  62. </p>
  63. </fieldset>
  64. <fieldset>
  65. <legend>{{ _('Currently used search engines') }}</legend>
  66. <table>
  67. <tr>
  68. <th>{{ _('Engine name') }}</th>
  69. <th>{{ _('Category') }}</th>
  70. <th>{{ _('Allow') }} / {{ _('Block') }}</th>
  71. </tr>
  72. {% for (categ,search_engines) in categs %}
  73. {% for search_engine in search_engines %}
  74. {% if not search_engine.private %}
  75. <tr>
  76. <td>{{ search_engine.name }} ({{ shortcuts[search_engine.name] }})</td>
  77. <td>{{ _(categ) }}</td>
  78. <td class="engine_checkbox">
  79. <input type="checkbox" id="engine_{{ categ }}_{{ search_engine.name|replace(' ', '_') }}" name="engine_{{ search_engine.name }}"{% if search_engine.name in blocked_engines %} checked="checked"{% endif %} />
  80. <label class="allow" for="engine_{{ categ }}_{{ search_engine.name|replace(' ', '_') }}">{{ _('Allow') }}</label>
  81. <label class="deny" for="engine_{{ categ }}_{{ search_engine.name|replace(' ', '_') }}">{{ _('Block') }}</label>
  82. </td>
  83. </tr>
  84. {% endif %}
  85. {% endfor %}
  86. {% endfor %}
  87. </table>
  88. </fieldset>
  89. <p class="small_font">{{ _('These settings are stored in your cookies, this allows us not to store this data about you.') }}
  90. <br />
  91. {{ _("These cookies serve your sole convenience, we don't use these cookies to track you.") }}
  92. </p>
  93. <input type="submit" value="{{ _('save') }}" />
  94. <div class="right preferences_back"><a href="{{ url_for('index') }}">{{ _('back') }}</a></div>
  95. </form>
  96. </div>
  97. {% endblock %}