2014-02-06 03:54:46 +00:00
{% load projecttags %}
2014-01-17 21:27:29 +00:00
<!-- '{{f.class}}' filter -->
< form id = "filter_{{f.class}}" class = "modal hide fade" tabindex = "-1" role = "dialog" aria-hidden = "true" >
2014-01-07 13:10:42 +00:00
< input type = "hidden" name = "search" value = "{{request.GET.search}}" / >
< div class = "modal-header" >
< button type = "button" class = "close" data-dismiss = "modal" aria-hidden = "true" > x< / button >
2014-03-12 18:47:41 +00:00
{% if search_term %}
< h3 > Filter {{total_count}} {%if filter_search_display%}{{filter_search_display|title}}{%else%}{{objectname|title}}{%endif%} matching '{{search_term}}' by '{{tc.name}}'< / h3 >
{% else %}
< h3 > Filter {%if filter_search_display%}{{filter_search_display|title}}{%else%}{{objectname|title}}{%endif%} by '{{tc.name}}'< / h3 >
{% endif %}
2014-01-07 13:10:42 +00:00
< / div >
< div class = "modal-body" >
2014-01-17 21:27:29 +00:00
< p > {{f.label}}< / p >
< label class = "radio" >
2014-03-12 18:47:41 +00:00
< input type = "radio" name = "filter" { % if request . GET . filter % } { { f . options | check_filter_status:request . GET . filter } } { % else % } checked { % endif % } value = "" > All {%if filter_search_display%}{{filter_search_display|title}}{%else%}{{objectname|title}}{%endif%} ({{total_count}})
2014-01-17 21:27:29 +00:00
< / label >
{% for option in f.options %}
2014-03-12 18:47:41 +00:00
{% if option.2 %}
< label class = "radio" >
2014-10-31 16:18:04 +00:00
< input type = "radio" name = "filter" { % if request . GET . filter = = option . 1 % } checked { % endif % } value = "{{option.1}}" > {{option.0}} (< span id = "{{option.1}}_count" > {{option.2}}< / span > )
2014-03-12 18:47:41 +00:00
{% else %}
< label class = "radio muted" >
2014-10-31 16:18:04 +00:00
< input type = "radio" name = "filter" disabled { % if request . GET . filter = = option . 1 % } checked { % endif % } value = "{{option.1}}" > {{option.0}} (< span id = "{{option.1}}_count" > {{option.2}}< / span > )
2014-03-12 18:47:41 +00:00
{% endif %}
2014-03-15 00:13:06 +00:00
{% if option.3 %}< i class = "icon-question-sign get-help" data-placement = "right" title = "{{option.3}}" > < / i > {% endif %}
2014-01-17 21:27:29 +00:00
< / label >
{% endfor %}
2014-01-07 13:10:42 +00:00
< / div >
< div class = "modal-footer" >
2014-01-25 23:52:53 +00:00
< button type = "submit" class = "btn btn-primary" > Apply< / button >
2014-03-14 07:26:32 +00:00
{% if request.GET.filter %}
{% if request.GET.filter|string_remove_regex:':.*' != f.options.0.1|string_remove_regex:':.*' %}
< span class = "help-inline pull-left" > You can only apply one filter to the table. This filter will override the current filter.< / span >
{% endif %}
{% endif %}
2014-01-07 13:10:42 +00:00
< / div >
2014-01-17 21:27:29 +00:00
< / form >