home · contact · privacy
Add foreign key restraints, expand and fix tests, add deletion and forking.
[misc] / todo_templates / tagfilters.html
index 3f784ea8b69c789808d2583c20946412c5ae7be4..6b2a9f1f00084981586a592071210740abbc19e9 100644 (file)
@@ -1,37 +1,6 @@
-<p style="float: left; margin-right: 1em;">
-<input type="submit" value="filter">
-</p>
-<p>
-mandatory tags:
-{% for and_filter in db.t_filter_and %}
-<select name="t_and">
-<option></option>
-{% for tag in db.t_tags | sort %}
-<option value="{{tag|e}}" {% if and_filter == tag %}selected{% endif %}>{{tag|e}}</option>
-{% endfor %}
-</select>
-{% endfor %}
-<select name="t_and">
-<option></option>
-{% for tag in db.t_tags | sort %}
-<option value="{{tag|e}}">{{tag|e}}</option>
-{% endfor %}
-</select>
+need tags:
+{{ macros.tagselection(submit_name='and_tag', selected_tags=filter_and, all_tags=tags) }}
 <br />
-forbidden tags:
-{% for not_filter in db.t_filter_not %}
-<select name="t_not">
-<option></option>
-{% for tag in db.t_tags | sort %}
-<option value="{{tag|e}}" {% if not_filter == tag %}selected{% endif %}>{{tag|e}}</option>
-{% endfor %}
-</select>
-{% endfor %}
-<select name="t_not">
-<option></option>
-{% for tag in db.t_tags | sort %}
-<option value="{{tag|e}}">{{tag|e}}</option>
-{% endfor %}
-</select>
-</p>
+hide tags:
+{{ macros.tagselection(submit_name='not_tag', selected_tags=filter_not, all_tags=tags) }}