Bug 22556: Add ability to quickly filter funds/budgets by library on the Acquisitions home page
Some librarians would like to have a quick pulldown selector to filter budgets and funds by library on the acquisitions home page. Test Plan: 1) Apply this patch 2) Navigate to the Acquisitions home page 3) Notice the new pulldown on the budgets table labeled "Filter by library" 4) Select a library that has one or more budgets/funds 5) Note only budgets/funds from that library now display! Signed-off-by: Liz Rea <wizzyrea@gmail.com> Signed-off-by: Bin Wen <bin.wen@inlibro.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This commit is contained in:
parent
c5f4f560d2
commit
bdc5cb00ac
1 changed files with 15 additions and 2 deletions
|
@ -64,7 +64,7 @@
|
|||
|
||||
[% 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">
|
||||
|
@ -72,7 +72,15 @@
|
|||
<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>
|
||||
|
@ -248,6 +256,11 @@
|
|||
});
|
||||
$("#hide_inactive").click();
|
||||
|
||||
$("#library-filter").change(function(){
|
||||
$("#accounts").DataTable().search(this.value);
|
||||
$("#accounts").DataTable().draw();
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
[% END %]
|
||||
|
|
Loading…
Reference in a new issue