summaryrefslogtreecommitdiff
path: root/searx/templates/oscar/preferences.html
blob: fa0799b28f8789654cc3b3276b1da4fb0a0aabae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
{% extends "oscar/base.html" %}
{% block content %}
<div>

    <h1>{{ _('Preferences') }}</h1>
    <form method="post" action="{{ url_for('preferences') }}" id="search_form">

    <!-- Nav tabs -->
    <ul class="nav nav-tabs" role="tablist" style="margin-bottom:20px;">
      <li class="active"><a href="#tab_general" role="tab" data-toggle="tab">{{ _('General') }}</a></li>
      <li><a href="#tab_engine" role="tab" data-toggle="tab">{{ _('Engines') }}</a></li>
    </ul>

    <!-- Tab panes -->
    <div class="tab-content">
        <div class="tab-pane active" id="tab_general">
            <fieldset>
                <legend>{{ _('Default categories') }}</legend>
                <p>
                {% include 'default/categories.html' %}
                </p>
            </fieldset>

            <fieldset>
            <div class="container-fluid">
                <div class="row form-group">
                    <label class="col-sm-3 col-md-2">{{ _('Search language') }}</label>
                    <div class="col-sm-4 col-md-4">
                        <select class="form-control" name='language'>
                            <option value="all" {% if current_language == 'all' %}selected="selected"{% endif %}>{{ _('Automatic') }}</option>
                            {% for lang_id,lang_name,country_name in language_codes %}
                            <option value="{{ lang_id }}" {% if lang_id == current_language %}selected="selected"{% endif %}>{{ lang_name }} ({{ country_name }}) - {{ lang_id }}</option>
                            {% endfor %}
                        </select>
                    </div>
                </div>
                
                
                <div class="row form-group">
                    <label class="col-sm-3 col-md-2">{{ _('Interface language') }}</label>
                    <div class="col-sm-4 col-md-4">
                        <select class="form-control" name='locale'>
                            {% for locale_id,locale_name in locales.items() %}
                            <option value="{{ locale_id }}" {% if locale_id == current_locale %}selected="selected"{% endif %}>{{ locale_name }}</option>
                            {% endfor %}
                        </select>
                    </div>
                </div>
                <div class="row form-group">
                    <label class="col-sm-3 col-md-2">{{ _('Autocomplete') }}</label>
                    <div class="col-sm-4 col-md-4">
                        
                        <select class="form-control" name="autocomplete">
                            <option value=""> - </option>
                            {% for backend in autocomplete_backends %}
                            <option value="{{ backend }}" {% if backend == autocomplete %}selected="selected"{% endif %}>{{ backend }}</option>
                            {% endfor %}
                        </select>
                    </div>
                    <span class="col-sm-5 col-md-6 help-block">{{ _('Find stuff as you type') }}</span>
                </div>
                <div class="row form-group">
                    <label class="col-sm-3 col-md-2">{{ _('Method') }}</label>
                    <div class="col-sm-4 col-md-4">
                        <select class="form-control" name='method'>
                            <option value="POST" {% if method == 'POST' %}selected="selected"{% endif %}>POST</option>
                            <option value="GET" {% if method == 'GET' %}selected="selected"{% endif %}>GET</option>
                        </select>
                    </div>
                    <span class="col-sm-5 col-md-6 help-block">{{ _('Change how forms are submited, <a href="http://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Request_methods" rel="external">learn more about request methods</a>') }}</span>
                </div>
                <div class="row form-group">
                    <label class="col-sm-3 col-md-2">{{ _('Themes') }}</label>
                    <div class="col-sm-4 col-md-4">
                        <select class="form-control" name="theme">
                            {% for name in themes %}
                            <option value="{{ name }}" {% if name == theme %}selected="selected"{% endif %}>{{ name }}</option>
                            {% endfor %}
                        </select>
                    </div>
                    <span class="col-sm-5 col-md-6 help-block">{{ _('Change searx layout') }}</span>
                </div>
            </div>
            </fieldset>
        </div>
        <div class="tab-pane" id="tab_engine">
            <fieldset>
            {% for (categ,search_engines) in categs %}
                <legend>{{ _(categ) }}</legend>
                <div class="container-fluid">
                {% for search_engine in search_engines %}
                    {% if not search_engine.private %}
                        <div class="row">
                            <div class="col-sm-4 col-md-4">{{ search_engine.name }} ({{ shortcuts[search_engine.name] }})</div>
                            <div class="col-sm-4 col-md-4">
                                <div class="checkbox">
                                <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 %} />
                                <label class="allow btn btn-success" for="engine_{{ categ }}_{{ search_engine.name|replace(' ', '_') }}">{{ _('Allow') }}</label>
                                <label class="deny btn btn-danger" for="engine_{{ categ }}_{{ search_engine.name|replace(' ', '_') }}">{{ _('Block') }}</label>
                                </div>
                            </div>
                        </div>
                    {% endif %}
                {% endfor %}
                </div>
            {% endfor %}   
            </fieldset>     
        </div>
    </div>

    <p class="text-muted" style="margin:20px 0;">{{ _('These settings are stored in your cookies, this allows us not to store this data about you.') }}
    <br />
    {{ _("These cookies serve your sole convenience, we don't use these cookies to track you.") }}
    </p>

    <input type="submit" class="btn btn-primary" value="{{ _('save') }}" />
	<a href="{{ url_for('index') }}"><div class="btn btn-default">{{ _('back') }}</div></a>
    </form>    
</div>
{% endblock %}