preferences.html 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. {% extends "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 '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>{{ _('Currently used search engines') }}</legend>
  36. <table>
  37. <tr>
  38. <th>{{ _('Engine name') }}</th>
  39. <th>{{ _('Category') }}</th>
  40. <th>{{ _('Allow') }} / {{ _('Block') }}</th>
  41. </tr>
  42. {% for (categ,search_engines) in categs %}
  43. {% for search_engine in search_engines %}
  44. {% if not search_engine.private %}
  45. <tr>
  46. <td>{{ search_engine.name }} ({{ shortcuts[search_engine.name] }})</td>
  47. <td>{{ _(categ) }}</td>
  48. <td class="engine_checkbox">
  49. <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 %} />
  50. <label class="allow" for="engine_{{ categ }}_{{ search_engine.name|replace(' ', '_') }}">{{ _('Allow') }}</label>
  51. <label class="deny" for="engine_{{ categ }}_{{ search_engine.name|replace(' ', '_') }}">{{ _('Block') }}</label>
  52. </td>
  53. </tr>
  54. {% endif %}
  55. {% endfor %}
  56. {% endfor %}
  57. </table>
  58. </fieldset>
  59. <p class="small_font">{{ _('These settings are stored in your cookies, this allows us not to store this data about you.') }}
  60. <br />
  61. {{ _("These cookies serve your sole convenience, we don't use these cookies to track you.") }}
  62. </p>
  63. <input type="submit" value="{{ _('save') }}" />
  64. <div class="right preferences_back"><a href="{{ url_for('index') }}">{{ _('back') }}</a></div>
  65. </form>
  66. </div>
  67. {% endblock %}