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