preferences.html 2.9KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. {% extends "base.html" %}
  2. {% block head %} {% endblock %}
  3. {% block content %}
  4. <div class="row">
  5. <h2>{{ _('Preferences') }}</h2>
  6. <form method="post" action="/preferences" id="search_form">
  7. <fieldset>
  8. <legend>{{ _('Default categories') }}</legend>
  9. <p>
  10. {% include '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 }})</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>{{ _('Currently used search engines') }}</legend>
  36. <table>
  37. <tr>
  38. <th>{{ _('Engine name') }}</th>
  39. <th>{{ _('Shortcut') }}</th>
  40. <th>{{ _('Category') }}</th>
  41. <th>{{ _('Allow') }} / {{ _('Block') }}</th>
  42. </tr>
  43. {% for (categ,search_engines) in categs %}
  44. {% for search_engine in search_engines %}
  45. {% if not search_engine.private %}
  46. <tr>
  47. <td>{{ search_engine.name }}</td>
  48. <td>{{ shortcuts[search_engine.name] }}</td>
  49. <td>{{ _(categ) }}</td>
  50. <td class="engine_checkbox">
  51. <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 %} />
  52. <label class="allow" for="engine_{{ categ }}_{{ search_engine.name|replace(' ', '_') }}">{{ _('Allow') }}</label>
  53. <label class="deny" for="engine_{{ categ }}_{{ search_engine.name|replace(' ', '_') }}">{{ _('Block') }}</label>
  54. </td>
  55. </tr>
  56. {% endif %}
  57. {% endfor %}
  58. {% endfor %}
  59. </table>
  60. </fieldset>
  61. <p class="small_font">{{ _('These settings are stored in your cookies, this allows us not to store this data about you.') }}
  62. <br />
  63. {{ _("These cookies serve your sole convenience, we don't use these cookies to track you.") }}
  64. </p>
  65. <input type="submit" value="{{ _('save') }}" />
  66. </form>
  67. <div class="right"><a href="/">{{ _('back') }}</a></div>
  68. </div>
  69. {% endblock %}