diff options
Diffstat (limited to 'src/lib/Bcfg2/Reporting/templates/widgets/filter_bar.html')
-rw-r--r-- | src/lib/Bcfg2/Reporting/templates/widgets/filter_bar.html | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/lib/Bcfg2/Reporting/templates/widgets/filter_bar.html b/src/lib/Bcfg2/Reporting/templates/widgets/filter_bar.html new file mode 100644 index 000000000..759415507 --- /dev/null +++ b/src/lib/Bcfg2/Reporting/templates/widgets/filter_bar.html @@ -0,0 +1,25 @@ +{% spaceless %} +<div class="filter_bar"> +<form name='filter_form'> +{% if filters %} +{% for filter, filter_url in filters %} + {% if forloop.first %} + Active filters (click to remove): + {% endif %} + <a href='{{ filter_url }}'>{{ filter|capfirst }}</a>{% if not forloop.last %}, {% endif %} + {% if forloop.last %} + {% 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 %} |