Commit d8f8e4dd039c1738e38a997591c3b1e40c6922f3

Authored by Gust
1 parent d2ed50d9

Add custom filter from plugins

Signed-off-by: Gustavo Jaruga <darksshades@gmail.com>
Signed-off-by: Matheus Faria <matheus.sousa.faria@gmail.com>
Signed-off-by: Matheus Fernandes <matheus.souza.fernandes@gmail.com>
colab/search/templates/search/includes/search_filters.html
... ... @@ -16,12 +16,12 @@
16 16 <input type="hidden" name="since" value="{{ request.GET.since }}" />
17 17 <input type="hidden" name="until" value="{{ request.GET.until }}" />
18 18  
19   - {% for field_lookup, field_display, field_value in filters.fields %}
  19 + {% for field_lookup, field_display, field_value, field_type, field_choices in filters.fields %}
20 20 <div class="form-group">
21 21 <label for="{{ field_lookup }}">{{ field_display }}</label>
22   - {% if field_lookup == "list" %}
  22 + {% if field_type == "list" %}
23 23 <select name="{{ field_lookup }}" class="form-control" multiple>
24   - {% for value, option in form.fields.list.choices %}
  24 + {% for value, option in field_choices %}
25 25 <option value="{{ value }}" {% if value in field_value %}selected{% endif %}>{{ option }}</option>
26 26 {% endfor %}
27 27 </select>
... ...