瀏覽代碼

[fix] indentation

Adam Tauber 10 年之前
父節點
當前提交
5c5ff19ec1
共有 1 個檔案被更改,包括 151 行新增151 行删除
  1. 151
    151
      searx/templates/oscar/preferences.html

+ 151
- 151
searx/templates/oscar/preferences.html 查看文件

@@ -12,179 +12,179 @@
12 12
     <h1>{{ _('Preferences') }}</h1>
13 13
     <form method="post" action="{{ url_for('preferences') }}" id="search_form">
14 14
 
15
-    <!-- Nav tabs -->
16
-    <ul class="nav nav-tabs nav-justified hide_if_nojs" role="tablist" style="margin-bottom:20px;">
17
-      <li class="active"><a href="#tab_general" role="tab" data-toggle="tab">{{ _('General') }}</a></li>
18
-      <li><a href="#tab_engine" role="tab" data-toggle="tab">{{ _('Engines') }}</a></li>
19
-      <li><a href="#tab_plugins" role="tab" data-toggle="tab">{{ _('Plugins') }}</a></li>
20
-    </ul>
15
+        <!-- Nav tabs -->
16
+        <ul class="nav nav-tabs nav-justified hide_if_nojs" role="tablist" style="margin-bottom:20px;">
17
+          <li class="active"><a href="#tab_general" role="tab" data-toggle="tab">{{ _('General') }}</a></li>
18
+          <li><a href="#tab_engine" role="tab" data-toggle="tab">{{ _('Engines') }}</a></li>
19
+          <li><a href="#tab_plugins" role="tab" data-toggle="tab">{{ _('Plugins') }}</a></li>
20
+        </ul>
21 21
 
22
-    <!-- Tab panes -->
23
-    <noscript>
24
-        <h3>{{ _('General') }}</h3>
25
-    </noscript>
26
-    <div class="tab-content">
27
-        <div class="tab-pane active" id="tab_general">
28
-            <fieldset>
29
-            <div class="container-fluid">
30
-                <div class="row form-group">
31
-                    {% if rtl %}
32
-                    <div class="col-sm-11 col-md-10">
33
-                        {% include 'oscar/categories.html' %}
34
-                    </div>
35
-                    <label class="col-sm-3 col-md-2">{{ _('Default categories') }}</label>
36
-                    {% else %}
37
-                    <label class="col-sm-3 col-md-2">{{ _('Default categories') }}</label>
38
-                    <div class="col-sm-11 col-md-10">
39
-                        {% include 'oscar/categories.html' %}
22
+        <!-- Tab panes -->
23
+        <noscript>
24
+            <h3>{{ _('General') }}</h3>
25
+        </noscript>
26
+        <div class="tab-content">
27
+            <div class="tab-pane active" id="tab_general">
28
+                <fieldset>
29
+                <div class="container-fluid">
30
+                    <div class="row form-group">
31
+                        {% if rtl %}
32
+                        <div class="col-sm-11 col-md-10">
33
+                            {% include 'oscar/categories.html' %}
34
+                        </div>
35
+                        <label class="col-sm-3 col-md-2">{{ _('Default categories') }}</label>
36
+                        {% else %}
37
+                        <label class="col-sm-3 col-md-2">{{ _('Default categories') }}</label>
38
+                        <div class="col-sm-11 col-md-10">
39
+                            {% include 'oscar/categories.html' %}
40
+                        </div>
41
+                        {% endif %}
40 42
                     </div>
41
-                    {% endif %}
42
-                </div>
43
-                {% set language_label = _('Search language') %}
44
-                {% set language_info = _('What language do you prefer for search?') %}
45
-                {{ preferences_item_header(language_info, language_label, rtl) }}
46
-                    <select class="form-control" name='language'>
47
-                        <option value="all" {% if current_language == 'all' %}selected="selected"{% endif %}>{{ _('Automatic') }}</option>
48
-                        {% for lang_id,lang_name,country_name in language_codes | sort(attribute=1) %}
49
-                        <option value="{{ lang_id }}" {% if lang_id == current_language %}selected="selected"{% endif %}>{{ lang_name }} ({{ country_name }}) - {{ lang_id }}</option>
50
-                        {% endfor %}
51
-                    </select>
52
-                {{ preferences_item_footer(language_info, language_label, rtl) }}
43
+                    {% set language_label = _('Search language') %}
44
+                    {% set language_info = _('What language do you prefer for search?') %}
45
+                    {{ preferences_item_header(language_info, language_label, rtl) }}
46
+                        <select class="form-control" name='language'>
47
+                            <option value="all" {% if current_language == 'all' %}selected="selected"{% endif %}>{{ _('Automatic') }}</option>
48
+                            {% for lang_id,lang_name,country_name in language_codes | sort(attribute=1) %}
49
+                            <option value="{{ lang_id }}" {% if lang_id == current_language %}selected="selected"{% endif %}>{{ lang_name }} ({{ country_name }}) - {{ lang_id }}</option>
50
+                            {% endfor %}
51
+                        </select>
52
+                    {{ preferences_item_footer(language_info, language_label, rtl) }}
53 53
 
54
-                {% set locale_label = _('Interface language') %}
55
-                {% set locale_info = _('Change the language of the layout') %}
56
-                {{ preferences_item_header(locale_info, locale_label, rtl) }}
57
-                    <select class="form-control" name='locale'>
58
-                        {% for locale_id,locale_name in locales.items() | sort %}
59
-                        <option value="{{ locale_id }}" {% if locale_id == current_locale %}selected="selected"{% endif %}>{{ locale_name }}</option>
60
-                        {% endfor %}
61
-                    </select>
62
-                {{ preferences_item_footer(locale_info, locale_label, rtl) }}
54
+                    {% set locale_label = _('Interface language') %}
55
+                    {% set locale_info = _('Change the language of the layout') %}
56
+                    {{ preferences_item_header(locale_info, locale_label, rtl) }}
57
+                        <select class="form-control" name='locale'>
58
+                            {% for locale_id,locale_name in locales.items() | sort %}
59
+                            <option value="{{ locale_id }}" {% if locale_id == current_locale %}selected="selected"{% endif %}>{{ locale_name }}</option>
60
+                            {% endfor %}
61
+                        </select>
62
+                    {{ preferences_item_footer(locale_info, locale_label, rtl) }}
63 63
 
64
-                {% set autocomplete_label = _('Autocomplete') %}
65
-                {% set autocomplete_info = _('Find stuff as you type') %}
66
-                {{ preferences_item_header(autocomplete_info, autocomplete_label, rtl) }}
67
-                    <select class="form-control" name="autocomplete">
68
-                        <option value=""> - </option>
69
-                        {% for backend in autocomplete_backends %}
70
-                        <option value="{{ backend }}" {% if backend == autocomplete %}selected="selected"{% endif %}>{{ backend }}</option>
71
-                        {% endfor %}
72
-                    </select>
73
-                {{ preferences_item_footer(autocomplete_info, autocomplete_label, rtl) }}
64
+                    {% set autocomplete_label = _('Autocomplete') %}
65
+                    {% set autocomplete_info = _('Find stuff as you type') %}
66
+                    {{ preferences_item_header(autocomplete_info, autocomplete_label, rtl) }}
67
+                        <select class="form-control" name="autocomplete">
68
+                            <option value=""> - </option>
69
+                            {% for backend in autocomplete_backends %}
70
+                            <option value="{{ backend }}" {% if backend == autocomplete %}selected="selected"{% endif %}>{{ backend }}</option>
71
+                            {% endfor %}
72
+                        </select>
73
+                    {{ preferences_item_footer(autocomplete_info, autocomplete_label, rtl) }}
74 74
 
75
-                {% set image_proxy_label = _('Image proxy') %}
76
-                {% set image_proxy_info = _('Proxying image results through searx') %}
77
-                {{ preferences_item_header(image_proxy_info, image_proxy_label, rtl) }}
78
-                    <select class="form-control" name='image_proxy'>
79
-                        <option value="1" {% if image_proxy  %}selected="selected"{% endif %}>{{ _('Enabled') }}</option>
80
-                        <option value="" {% if not image_proxy %}selected="selected"{% endif %}>{{ _('Disabled')}}</option>
81
-                    </select>
82
-                {{ preferences_item_footer(image_proxy_info, image_proxy_label, rtl) }}
75
+                    {% set image_proxy_label = _('Image proxy') %}
76
+                    {% set image_proxy_info = _('Proxying image results through searx') %}
77
+                    {{ preferences_item_header(image_proxy_info, image_proxy_label, rtl) }}
78
+                        <select class="form-control" name='image_proxy'>
79
+                            <option value="1" {% if image_proxy  %}selected="selected"{% endif %}>{{ _('Enabled') }}</option>
80
+                            <option value="" {% if not image_proxy %}selected="selected"{% endif %}>{{ _('Disabled')}}</option>
81
+                        </select>
82
+                    {{ preferences_item_footer(image_proxy_info, image_proxy_label, rtl) }}
83 83
 
84
-                {% set method_label = _('Method') %}
85
-                {% set method_info = _('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>') %}
86
-                {{ preferences_item_header(method_info, method_label, rtl) }}
87
-                    <select class="form-control" name='method'>
88
-                        <option value="POST" {% if method == 'POST' %}selected="selected"{% endif %}>POST</option>
89
-                        <option value="GET" {% if method == 'GET' %}selected="selected"{% endif %}>GET</option>
90
-                    </select>
91
-                {{ preferences_item_footer(method_info, method_label, rtl) }}
84
+                    {% set method_label = _('Method') %}
85
+                    {% set method_info = _('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>') %}
86
+                    {{ preferences_item_header(method_info, method_label, rtl) }}
87
+                        <select class="form-control" name='method'>
88
+                            <option value="POST" {% if method == 'POST' %}selected="selected"{% endif %}>POST</option>
89
+                            <option value="GET" {% if method == 'GET' %}selected="selected"{% endif %}>GET</option>
90
+                        </select>
91
+                    {{ preferences_item_footer(method_info, method_label, rtl) }}
92 92
 
93
-                {% set safesearch_label = _('SafeSearch') %}
94
-                {% set safesearch_info = _('Filter content') %}
95
-                {{ preferences_item_header(safesearch_info, safesearch_label, rtl) }}
96
-                    <select class="form-control" name='safesearch'>
97
-                        <option value="2" {% if safesearch == '2' %}selected="selected"{% endif %}>{{ _('Strict') }}</option>
98
-                        <option value="1" {% if safesearch == '1' %}selected="selected"{% endif %}>{{ _('Moderate') }}</option>
99
-                        <option value="0" {% if safesearch == '0' %}selected="selected"{% endif %}>{{ _('None') }}</option>
100
-                    </select>
101
-                {{ preferences_item_footer(safesearch_info, safesearch_label, rtl) }}
93
+                    {% set safesearch_label = _('SafeSearch') %}
94
+                    {% set safesearch_info = _('Filter content') %}
95
+                    {{ preferences_item_header(safesearch_info, safesearch_label, rtl) }}
96
+                        <select class="form-control" name='safesearch'>
97
+                            <option value="2" {% if safesearch == '2' %}selected="selected"{% endif %}>{{ _('Strict') }}</option>
98
+                            <option value="1" {% if safesearch == '1' %}selected="selected"{% endif %}>{{ _('Moderate') }}</option>
99
+                            <option value="0" {% if safesearch == '0' %}selected="selected"{% endif %}>{{ _('None') }}</option>
100
+                        </select>
101
+                    {{ preferences_item_footer(safesearch_info, safesearch_label, rtl) }}
102 102
 
103
-                {% set theme_label = _('Themes') %}
104
-                {% set theme_info = _('Change searx layout') %}
105
-                {{ preferences_item_header(theme_info, theme_label, rtl) }}
106
-                    <select class="form-control" name="theme">
107
-                        {% for name in themes %}
108
-                        <option value="{{ name }}" {% if name == theme %}selected="selected"{% endif %}>{{ name }}</option>
109
-                        {% endfor %}
110
-                    </select>
111
-                {{ preferences_item_footer(theme_info, theme_label, rtl) }}
103
+                    {% set theme_label = _('Themes') %}
104
+                    {% set theme_info = _('Change searx layout') %}
105
+                    {{ preferences_item_header(theme_info, theme_label, rtl) }}
106
+                        <select class="form-control" name="theme">
107
+                            {% for name in themes %}
108
+                            <option value="{{ name }}" {% if name == theme %}selected="selected"{% endif %}>{{ name }}</option>
109
+                            {% endfor %}
110
+                        </select>
111
+                    {{ preferences_item_footer(theme_info, theme_label, rtl) }}
112
+                </div>
113
+                </fieldset>
112 114
             </div>
113
-            </fieldset>
114
-        </div>
115
-        <div class="tab-pane active_if_nojs" id="tab_engine">
116
-
117
-            <!-- Nav tabs -->
118
-            <ul class="nav nav-tabs nav-justified hide_if_nojs" role="tablist" style="margin-bottom:20px;">
119
-                {% for categ in categories %}
120
-                <li{% if loop.first %} class="active"{% endif %}><a href="#tab_engine_{{ categ|replace(' ', '_') }}" role="tab" data-toggle="tab">{{ _(categ) }}</a></li>
121
-                {% endfor %}
122
-            </ul>
115
+            <div class="tab-pane active_if_nojs" id="tab_engine">
123 116
 
124
-            <noscript>
125
-                <h3>{{ _('Engines') }}</h3>
126
-            </noscript>
117
+                <!-- Nav tabs -->
118
+                <ul class="nav nav-tabs nav-justified hide_if_nojs" role="tablist" style="margin-bottom:20px;">
119
+                    {% for categ in categories %}
120
+                    <li{% if loop.first %} class="active"{% endif %}><a href="#tab_engine_{{ categ|replace(' ', '_') }}" role="tab" data-toggle="tab">{{ _(categ) }}</a></li>
121
+                    {% endfor %}
122
+                </ul>
127 123
 
128
-            <!-- Tab panes -->
129
-            <div class="tab-content">
130
-                {% for categ in categories %}
131
-                <noscript><label>{{ _(categ) }}</label>
124
+                <noscript>
125
+                    <h3>{{ _('Engines') }}</h3>
132 126
                 </noscript>
133
-                <div class="tab-pane{% if loop.first %} active{% endif %} active_if_nojs" id="tab_engine_{{ categ|replace(' ', '_') }}">
134
-                    <div class="container-fluid">
135
-                    <fieldset>
136
-                    {% for search_engine in engines_by_category[categ] %}
137
-                        {% if not search_engine.private %}
138
-                            <div class="row">
139
-                                {% if not rtl %}
140
-                                <div class="col-xs-6 col-sm-4 col-md-4">{{ search_engine.name }} ({{ shortcuts[search_engine.name] }})</div>
141
-                                {% endif %}
142
-                                <div class="col-xs-6 col-sm-4 col-md-4">
143
-                                    {{ checkbox_toggle('engine_' + search_engine.name|replace(' ', '_') + '__' + categ|replace(' ', '_'), (search_engine.name, categ) in blocked_engines) }}
127
+
128
+                <!-- Tab panes -->
129
+                <div class="tab-content">
130
+                    {% for categ in categories %}
131
+                    <noscript><label>{{ _(categ) }}</label>
132
+                    </noscript>
133
+                    <div class="tab-pane{% if loop.first %} active{% endif %} active_if_nojs" id="tab_engine_{{ categ|replace(' ', '_') }}">
134
+                        <div class="container-fluid">
135
+                        <fieldset>
136
+                        {% for search_engine in engines_by_category[categ] %}
137
+                            {% if not search_engine.private %}
138
+                                <div class="row">
139
+                                    {% if not rtl %}
140
+                                    <div class="col-xs-6 col-sm-4 col-md-4">{{ search_engine.name }} ({{ shortcuts[search_engine.name] }})</div>
141
+                                    {% endif %}
142
+                                    <div class="col-xs-6 col-sm-4 col-md-4">
143
+                                        {{ checkbox_toggle('engine_' + search_engine.name|replace(' ', '_') + '__' + categ|replace(' ', '_'), (search_engine.name, categ) in blocked_engines) }}
144
+                                    </div>
145
+                                    {% if rtl %}
146
+                                    <div class="col-xs-6 col-sm-4 col-md-4">{{ search_engine.name }} ({{ shortcuts[search_engine.name] }})&lrm;</div>
147
+                                    {% endif %}
144 148
                                 </div>
145
-                                {% if rtl %}
146
-                                <div class="col-xs-6 col-sm-4 col-md-4">{{ search_engine.name }} ({{ shortcuts[search_engine.name] }})&lrm;</div>
147
-                                {% endif %}
148
-                            </div>
149
-                        {% endif %}
150
-                    {% endfor %}
151
-                    </fieldset>
149
+                            {% endif %}
150
+                        {% endfor %}
151
+                        </fieldset>
152
+                        </div>
152 153
                     </div>
154
+                    {% endfor %}
153 155
                 </div>
154
-                {% endfor %}
155 156
             </div>
156
-        </div>
157
-        <div class="tab-pane active_if_nojs" id="tab_plugins">
158
-            <noscript>
159
-                <h3>{{ _('Plugins') }}</h3>
160
-            </noscript>
161
-            <fieldset>
162
-            <div class="container-fluid">
163
-                {% for plugin in plugins %}
164
-                <div class="panel panel-default">
165
-                    <div class="panel-heading">
166
-                        <h3 class="panel-title">{{ plugin.name }}</h3>
167
-                    </div>
168
-                    <div class="panel-body">
169
-                        <div class="col-xs-6 col-sm-4 col-md-6">{{ plugin.description }}</div>
170
-                        <div class="col-xs-6 col-sm-4 col-md-6">
171
-                            {{ checkbox_toggle('plugin_' + plugin.id, plugin.id not in allowed_plugins) }}
157
+            <div class="tab-pane active_if_nojs" id="tab_plugins">
158
+                <noscript>
159
+                    <h3>{{ _('Plugins') }}</h3>
160
+                </noscript>
161
+                <fieldset>
162
+                <div class="container-fluid">
163
+                    {% for plugin in plugins %}
164
+                    <div class="panel panel-default">
165
+                        <div class="panel-heading">
166
+                            <h3 class="panel-title">{{ plugin.name }}</h3>
167
+                        </div>
168
+                        <div class="panel-body">
169
+                            <div class="col-xs-6 col-sm-4 col-md-6">{{ plugin.description }}</div>
170
+                            <div class="col-xs-6 col-sm-4 col-md-6">
171
+                                {{ checkbox_toggle('plugin_' + plugin.id, plugin.id not in allowed_plugins) }}
172
+                            </div>
172 173
                         </div>
173 174
                     </div>
175
+                    {% endfor %}
174 176
                 </div>
175
-                {% endfor %}
177
+                </fieldset>
176 178
             </div>
177
-            </fieldset>
178 179
         </div>
179
-    </div>
180
-    <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.') }}
181
-    <br />
182
-    {{ _("These cookies serve your sole convenience, we don't use these cookies to track you.") }}
183
-    </p>
180
+        <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.') }}
181
+        <br />
182
+        {{ _("These cookies serve your sole convenience, we don't use these cookies to track you.") }}
183
+        </p>
184 184
 
185
-    <input type="submit" class="btn btn-primary" value="{{ _('save') }}" />
186
-	<a href="{{ url_for('index') }}"><div class="btn btn-default">{{ _('back') }}</div></a>
187
-	<a href="{{ url_for('clear_cookies') }}"><div class="btn btn-default">{{ _('Reset defaults') }}</div></a>
185
+        <input type="submit" class="btn btn-primary" value="{{ _('save') }}" />
186
+        <a href="{{ url_for('index') }}"><div class="btn btn-default">{{ _('back') }}</div></a>
187
+        <a href="{{ url_for('clear_cookies') }}"><div class="btn btn-default">{{ _('Reset defaults') }}</div></a>
188 188
     </form>
189 189
 </div>
190 190
 {% endblock %}