diff options
Diffstat (limited to 'bitbake/lib/toaster/toastergui/templates/filtersnippet.html')
-rw-r--r-- | bitbake/lib/toaster/toastergui/templates/filtersnippet.html | 34 |
1 files changed, 25 insertions, 9 deletions
diff --git a/bitbake/lib/toaster/toastergui/templates/filtersnippet.html b/bitbake/lib/toaster/toastergui/templates/filtersnippet.html index fe70e7143e..f624d88bad 100644 --- a/bitbake/lib/toaster/toastergui/templates/filtersnippet.html +++ b/bitbake/lib/toaster/toastergui/templates/filtersnippet.html | |||
@@ -1,5 +1,6 @@ | |||
1 | {% load projecttags %} | 1 | {% load projecttags %} |
2 | <!-- '{{f.class}}' filter --> | 2 | <!-- '{{f.class}}' filter --> |
3 | {% with f.class as key %} | ||
3 | <form id="filter_{{f.class}}" class="modal hide fade" tabindex="-1" role="dialog" aria-hidden="true"> | 4 | <form id="filter_{{f.class}}" class="modal hide fade" tabindex="-1" role="dialog" aria-hidden="true"> |
4 | <input type="hidden" name="search" value="{{request.GET.search}}"/> | 5 | <input type="hidden" name="search" value="{{request.GET.search}}"/> |
5 | <div class="modal-header"> | 6 | <div class="modal-header"> |
@@ -13,22 +14,37 @@ | |||
13 | <div class="modal-body"> | 14 | <div class="modal-body"> |
14 | <p>{{f.label}}</p> | 15 | <p>{{f.label}}</p> |
15 | <label class="radio"> | 16 | <label class="radio"> |
16 | <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}}) | 17 | <input type="radio" name="filter" {%if request.GET.filter%}{{f.options|check_filter_status:request.GET.filter}} {%else%} checked {%endif%} value="" data-key="{{key}}"> All {%if filter_search_display%}{{filter_search_display|title}}{%else%}{{objectname|title}}{%endif%} |
17 | </label> | 18 | </label> |
18 | {% for option in f.options %} | 19 | {% for option in f.options %} |
19 | {% if option.2 %} | 20 | {% if option.1 == 'daterange' %} |
20 | <label class="radio"> | 21 | <div class="form-inline"> |
21 | <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>) | 22 | <label class="radio"> |
23 | <input type="radio" name="filter" id="filter_value_{{key}}" {%if key == daterange_selected %}checked{%endif%} value="{{option.1}}" data-key="{{key}}"> {{option.0}} | ||
22 | {% else %} | 24 | {% else %} |
23 | <label class="radio muted"> | 25 | {% if 1 %} |
24 | <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>) | 26 | <label class="radio"> |
27 | <input type="radio" name="filter" {%if request.GET.filter == option.1 %}checked{%endif%} value="{{option.1}}" data-key="{{key}}"> {{option.0}} | ||
28 | {% comment "do not disable radio selections by count for now" %}{% else %} | ||
29 | <label class="radio muted"> | ||
30 | <input type="radio" name="filter" disabled {%if request.GET.filter == option.1 %}checked{%endif%} value="{{option.1}}" data-key="{{key}}"> {{option.0}} | ||
31 | {% endcomment %}{% endif %} | ||
25 | {% endif %} | 32 | {% endif %} |
26 | {% if option.3 %}<i class="icon-question-sign get-help" data-placement="right" title="{{option.3}}"></i>{% endif %} | 33 | {% if option.3 %}<i class="icon-question-sign get-help" data-placement="right" title="{{option.3}}"></i>{% endif %} |
27 | </label> | 34 | </label> |
35 | {% if option.1 == 'daterange' %} | ||
36 | <input type="text" id="date_from_{{key}}" name="date_from_{{key}}" disabled class="input-small" /><label class="help-inline">to</label> | ||
37 | <input type="text" id="date_to_{{key}}" name="date_to_{{key}}" disabled class="input-small" /> | ||
38 | <label class="help-inline get-help" >(dd/mm/yyyy)</label> | ||
39 | </div> | ||
40 | {% endif %} | ||
28 | {% endfor %} | 41 | {% endfor %} |
42 | <!-- daterange persistence --> | ||
43 | <input type="hidden" id="last_date_from_{{key}}" name="last_date_from" value="{{last_date_from}}"/> | ||
44 | <input type="hidden" id="last_date_to_{{key}}" name="last_date_to" value="{{last_date_to}}"/> | ||
29 | </div> | 45 | </div> |
30 | <div class="modal-footer"> | 46 | <div class="modal-footer"> |
31 | <button type="submit" class="btn btn-primary">Apply</button> | 47 | <button type="submit" class="btn btn-primary" data-key="{{key}}">Apply</button> |
32 | {% if request.GET.filter %} | 48 | {% if request.GET.filter %} |
33 | {% if request.GET.filter|string_remove_regex:':.*' != f.options.0.1|string_remove_regex:':.*' %} | 49 | {% if request.GET.filter|string_remove_regex:':.*' != f.options.0.1|string_remove_regex:':.*' %} |
34 | <span class="help-inline pull-left">You can only apply one filter to the table. This filter will override the current filter.</span> | 50 | <span class="help-inline pull-left">You can only apply one filter to the table. This filter will override the current filter.</span> |
@@ -36,4 +52,4 @@ | |||
36 | {% endif %} | 52 | {% endif %} |
37 | </div> | 53 | </div> |
38 | </form> | 54 | </form> |
39 | 55 | {% endwith %} | |