preferences.html 3.8 KB

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