Bug 9824: Make it possible to apply/cancel switch

Using another existing string 'Apply filter' we are now
able to cancel the filter... and apply it... and cancel it
again... and so on.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
This commit is contained in:
Katrin Fischer 2013-05-17 21:12:05 +02:00 committed by Jared Camins-Esakov
parent 529434cab8
commit 7acdcb7e2a
2 changed files with 8 additions and 1 deletions

View File

@ -151,5 +151,6 @@ $template->param(
supplier => ( $booksellerid || $supplier ),
count => $supplier_count,
);
$template->{VARS}->{'allbaskets'} = $allbaskets;
output_html_with_http_headers $query, $cookie, $template->output;

View File

@ -62,7 +62,13 @@ $(document).ready(function() {
</select>
</p>
[% END %]
<p><a href="/cgi-bin/koha/acqui/booksellers.pl?supplier=[% supplier %]&booksellerid=[% booksellerid %]&allbaskets=1">Cancel filter</a></p>
<p>
[% IF ( allbaskets ) %]
<a href="/cgi-bin/koha/acqui/booksellers.pl?supplier=[% supplier %]&booksellerid=[% booksellerid %]">Apply filter</a>
[% ELSE %]
<a href="/cgi-bin/koha/acqui/booksellers.pl?supplier=[% supplier %]&booksellerid=[% booksellerid %]&allbaskets=1">Cancel filter</a>
[% END %]
</p>
<div id="acqui_order_supplierlist">
[% FOREACH supplier IN loop_suppliers %]
<div class="supplier">