summaryrefslogtreecommitdiffstats
path: root/src/lib/Bcfg2/Server/Reports/reports/templates/widgets/filter_bar.html
diff options
context:
space:
mode:
authorTim Laszlo <tim.laszlo@gmail.com>2012-06-06 14:19:42 -0500
committerTim Laszlo <tim.laszlo@gmail.com>2012-06-06 14:35:28 -0500
commit4063587b20cbd97e55069a7ea94a2a231b7de622 (patch)
treeed0f6e27b361d72d8e9b8e9635d27e460149741e /src/lib/Bcfg2/Server/Reports/reports/templates/widgets/filter_bar.html
parent1e954c9bd17ab7fcb31bb85a268303fd1266c761 (diff)
downloadbcfg2-4063587b20cbd97e55069a7ea94a2a231b7de622.tar.gz
bcfg2-4063587b20cbd97e55069a7ea94a2a231b7de622.tar.bz2
bcfg2-4063587b20cbd97e55069a7ea94a2a231b7de622.zip
web_reports: add group filtering logic to grid and detailed list
Diffstat (limited to 'src/lib/Bcfg2/Server/Reports/reports/templates/widgets/filter_bar.html')
-rw-r--r--src/lib/Bcfg2/Server/Reports/reports/templates/widgets/filter_bar.html16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/lib/Bcfg2/Server/Reports/reports/templates/widgets/filter_bar.html b/src/lib/Bcfg2/Server/Reports/reports/templates/widgets/filter_bar.html
index 6fbe585ab..759415507 100644
--- a/src/lib/Bcfg2/Server/Reports/reports/templates/widgets/filter_bar.html
+++ b/src/lib/Bcfg2/Server/Reports/reports/templates/widgets/filter_bar.html
@@ -1,13 +1,25 @@
{% spaceless %}
+<div class="filter_bar">
+<form name='filter_form'>
{% if filters %}
{% for filter, filter_url in filters %}
{% if forloop.first %}
- <div class="filter_bar">Active filters (click to remove):
+ Active filters (click to remove):
{% endif %}
<a href='{{ filter_url }}'>{{ filter|capfirst }}</a>{% if not forloop.last %}, {% endif %}
{% if forloop.last %}
- </div>
+ {% if groups %}|{% endif %}
{% endif %}
{% endfor %}
{% endif %}
+{% if groups %}
+<label for="id_group">Group filter:</label>
+<select id="id_group" name="group" onchange="javascript:url=document.forms['filter_form'].group.value; if(url) { location.href=url }">
+ {% for group, group_url, selected in groups %}
+ <option label="{{group}}" value="{{group_url}}" {% if selected %}selected {% endif %}/>
+ {% endfor %}
+</select>
+{% endif %}
+</form>
+</div>
{% endspaceless %}