diff options
author | Ravi Chintakunta <ravi.chintakunta@timesys.com> | 2014-01-17 16:27:29 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-02-17 15:38:52 +0000 |
commit | fd86e0e557cecc0bec4a0c01f8a7dfd0bbc62703 (patch) | |
tree | c7a4206eb56fa6e38c80283567264ccb941cd5b1 /bitbake | |
parent | 2b2d3d618fb59b20c9a62f5f010f12a8b8aac57c (diff) | |
download | poky-fd86e0e557cecc0bec4a0c01f8a7dfd0bbc62703.tar.gz |
bitbake: toaster: Filter Dialog fix to display filter options as radio buttons
- Filter options are displayed as radio buttons in the filter dialog.
- To preserve the order of the filter options, the options are passed
as tuples inside a list, instead of key/value pairs of a dictionary. Changed
the filter dialog code to use the tuple
(Bitbake rev: 5e475b312348fa45312946b528648739c78da2ba)
Signed-off-by: Ravi Chintakunta <ravi.chintakunta@timesys.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/toaster/toastergui/templates/filtersnippet.html | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/bitbake/lib/toaster/toastergui/templates/filtersnippet.html b/bitbake/lib/toaster/toastergui/templates/filtersnippet.html index 3885a0316d..d4a4f328ce 100644 --- a/bitbake/lib/toaster/toastergui/templates/filtersnippet.html +++ b/bitbake/lib/toaster/toastergui/templates/filtersnippet.html | |||
@@ -1,19 +1,23 @@ | |||
1 | 1 | <!-- '{{f.class}}' filter --> | |
2 | <!-- '{{f.class}}' filter --> | 2 | <form id="filter_{{f.class}}" class="modal hide fade" tabindex="-1" role="dialog" aria-hidden="true"> |
3 | <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}}"/> | 3 | <input type="hidden" name="search" value="{{request.GET.search}}"/> |
5 | <div class="modal-header"> | 4 | <div class="modal-header"> |
6 | <button type="button" class="close" data-dismiss="modal" aria-hidden="true">x</button> | 5 | <button type="button" class="close" data-dismiss="modal" aria-hidden="true">x</button> |
7 | <h3>Filter builds by {{tc.name}}</h3> | 6 | <h3>Filter {{objectname|title}} by '{{tc.name}}'</h3> |
8 | </div> | 7 | </div> |
9 | <div class="modal-body"> | 8 | <div class="modal-body"> |
10 | <label>{{f.label}}</label> | 9 | <p>{{f.label}}</p> |
11 | <select name="filter"> | 10 | <label class="radio"> |
12 | <option value="">No Filter</option>{% for key, value in f.options.items %} | 11 | <input type="radio" name="filter" value=""> All {{objectname}} |
13 | <option {%if request.GET.filter == value %}selected="" {%endif%}value="{{value}}">{{key}}</option>{% endfor %} | 12 | </label> |
14 | </select> | 13 | {% for option in f.options %} |
14 | <label class="radio"> | ||
15 | <input type="radio" name="filter" {%if request.GET.filter == option.1 %}checked{%endif%} value="{{option.1}}"> {{option.0}} | ||
16 | </label> | ||
17 | {% endfor %} | ||
15 | </div> | 18 | </div> |
16 | <div class="modal-footer"> | 19 | <div class="modal-footer"> |
17 | <button type="submit" class="btn btn-primary">Apply</button> | 20 | <button type="submit" class="btn btn-primary">Apply</button> |
18 | </div> | 21 | </div> |
19 | </form> | 22 | </form> |
23 | |||