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>
This commit is contained in:
Ravi Chintakunta
2014-01-17 16:27:29 -05:00
committed by Richard Purdie
parent 2b2d3d618f
commit fd86e0e557

View File

@@ -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>