summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRavi Chintakunta <ravi.chintakunta@timesys.com>2014-01-17 16:27:29 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-02-17 15:38:52 +0000
commitfd86e0e557cecc0bec4a0c01f8a7dfd0bbc62703 (patch)
treec7a4206eb56fa6e38c80283567264ccb941cd5b1
parent2b2d3d618fb59b20c9a62f5f010f12a8b8aac57c (diff)
downloadpoky-fd86e0e557cecc0bec4a0c01f8a7dfd0bbc62703.tar.gz
poky-fd86e0e557cecc0bec4a0c01f8a7dfd0bbc62703.tar.bz2
poky-fd86e0e557cecc0bec4a0c01f8a7dfd0bbc62703.zip
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>
-rw-r--r--bitbake/lib/toaster/toastergui/templates/filtersnippet.html24
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 @@
-
- <!-- '{{f.class}}' filter -->
- <form id="filter_{{f.class}}" class="modal hide fade" tabindex="-1" role="dialog" aria-hidden="true">
+<!-- '{{f.class}}' filter -->
+<form id="filter_{{f.class}}" class="modal hide fade" tabindex="-1" role="dialog" aria-hidden="true">
<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>
- <h3>Filter builds by {{tc.name}}</h3>
+ <h3>Filter {{objectname|title}} by '{{tc.name}}'</h3>
</div>
<div class="modal-body">
- <label>{{f.label}}</label>
- <select name="filter">
- <option value="">No Filter</option>{% for key, value in f.options.items %}
- <option {%if request.GET.filter == value %}selected="" {%endif%}value="{{value}}">{{key}}</option>{% endfor %}
- </select>
+ <p>{{f.label}}</p>
+ <label class="radio">
+ <input type="radio" name="filter" value=""> All {{objectname}}
+ </label>
+ {% for option in f.options %}
+ <label class="radio">
+ <input type="radio" name="filter" {%if request.GET.filter == option.1 %}checked{%endif%} value="{{option.1}}"> {{option.0}}
+ </label>
+ {% endfor %}
</div>
<div class="modal-footer">
<button type="submit" class="btn btn-primary">Apply</button>
</div>
- </form>
+</form>
+