Browse Source

[mod] separating categories

asciimoo 11 years ago
parent
commit
a3de9ba56c
2 changed files with 6 additions and 5 deletions
  1. 5 0
      searx/templates/categories.html
  2. 1 5
      searx/templates/search.html

+ 5 - 0
searx/templates/categories.html

@@ -0,0 +1,5 @@
+{% for category in categories %}
+    <div class="checkbox_container">
+        <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>
+    </div>
+{% endfor %}

+ 1 - 5
searx/templates/search.html

@@ -4,10 +4,6 @@
     <input type="submit" value="" id="search_submit" />
 </div>
     <div>
-    {% for category in categories %}
-        <div class="checkbox_container">
-            <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>
-        </div>
-    {% endfor %}
+    {% include 'categories.html' %}
     </div>
 </form>