[% IF ( loop_budget ) %]
- <h3>All available funds[% IF LoginBranchname %] for [% LoginBranchname | html %][% END %]</h3>
+ <h3>All available funds[% IF LoginBranchname %] for [% LoginBranchname | html %][% END %]</h3>
<div id="BudgetsAndFunds">
<table id="accounts">
<span class="actions"><a href="#" id="expand_all">Expand all</a>
| <a href="#" id="collapse_all">Collapse all</a>
| <a href="#" id="hide_inactive">Hide inactive budgets</a>
- | <a href="#" id="show_inactive">Show inactive budgets</a></span>
+ | <a href="#" id="show_inactive">Show inactive budgets</a>
+ | <select id="library-filter">
+ <option value="">Filter by library</option>
+ [% FOREACH b IN Branches.all %]
+ <option value="[% b.branchname | html %]">[% b.branchname | html %]</option>
+ [% END %]
+ </select>
+ </span>
+
</caption>
<thead>
});
$("#hide_inactive").click();
+ $("#library-filter").change(function(){
+ $("#accounts").DataTable().search(this.value);
+ $("#accounts").DataTable().draw();
+ });
+
});
</script>
[% END %]