Selaa lähdekoodia

[mod] separating categories

asciimoo 11 vuotta sitten
vanhempi
commit
a3de9ba56c
2 muutettua tiedostoa jossa 6 lisäystä ja 5 poistoa
  1. 5
    0
      searx/templates/categories.html
  2. 1
    5
      searx/templates/search.html

+ 5
- 0
searx/templates/categories.html Näytä tiedosto

@@ -0,0 +1,5 @@
1
+{% for category in categories %}
2
+    <div class="checkbox_container">
3
+        <input type="checkbox" id="checkbox_{{ category|replace(' ', '_') }}" name="category_{{ category }}" {% if category in selected_categories %}checked="checked"{% endif %} /><label for="checkbox_{{ category|replace(' ', '_') }}" class="cb"></label><label for="checkbox_{{ category|replace(' ', '_') }}">{{ category }}</label>
4
+    </div>
5
+{% endfor %}

+ 1
- 5
searx/templates/search.html Näytä tiedosto

@@ -4,10 +4,6 @@
4 4
     <input type="submit" value="" id="search_submit" />
5 5
 </div>
6 6
     <div>
7
-    {% for category in categories %}
8
-        <div class="checkbox_container">
9
-            <input type="checkbox" id="checkbox_{{ category|replace(' ', '_') }}" name="category_{{ category }}" {% if category in selected_categories %}checked="checked"{% endif %} /><label for="checkbox_{{ category|replace(' ', '_') }}" class="cb"></label><label for="checkbox_{{ category|replace(' ', '_') }}">{{ category }}</label>
10
-        </div>
11
-    {% endfor %}
7
+    {% include 'categories.html' %}
12 8
     </div>
13 9
 </form>