From aa2ba4a997e3a1bd3dc44acc2b7f50295c25c835 Mon Sep 17 00:00:00 2001 From: Julian Maurice Date: Mon, 11 Jun 2012 13:56:58 +0200 Subject: [PATCH] Bug 5349 follow-up: run transferorder.pl in a popup Signed-off-by: Marc Veron Signed-off-by: Mathieu Saby Signed-off-by: sonia Signed-off-by: Chris Cormack --- acqui/transferorder.pl | 5 +---- .../intranet-tmpl/prog/en/modules/acqui/basket.tt | 10 +++++++-- .../intranet-tmpl/prog/en/modules/acqui/parcel.tt | 9 +++++++- .../prog/en/modules/acqui/transferorder.tt | 26 +++++++++------------- 4 files changed, 28 insertions(+), 22 deletions(-) diff --git a/acqui/transferorder.pl b/acqui/transferorder.pl index 27c4509..6a0c63e 100755 --- a/acqui/transferorder.pl +++ b/acqui/transferorder.pl @@ -77,9 +77,7 @@ if( $basketno && $ordernumber) { TransferOrder($ordernumber, $basketno); - my $referrer = $input->param('referrer'); - print $input->redirect($referrer); - exit; + $template->param(transferred => 1) } elsif ( $bookselleridto && $ordernumber) { # Show open baskets for this bookseller my $order = GetOrder( $ordernumber ); @@ -138,7 +136,6 @@ $template->param( booksellertoname => $booksellertoname, ordernumber => $ordernumber, basketno => $basketno, - referrer => $input->param('referrer') ); output_html_with_http_headers $input, $cookie, $template->output; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt index 4d2f426..2efd830 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt @@ -58,7 +58,7 @@ window.location = "addorder.pl?ordernumber="+ordernumber+"&basketno=[% basketno %]&quantity=0&biblionumber="+biblionumber; } } - + function confirm_delete_biblio(ordernumber, biblionumber) { var is_confirmed = confirm(_("Are you sure you want to delete this catalog record and order ?")); if (is_confirmed) { @@ -66,6 +66,12 @@ } } + function transfer_order_popup(ordernumber) { + var url = "/cgi-bin/koha/acqui/transferorder.pl?" + + "ordernumber=" + ordernumber + window.open(url, 'TransferOrder'); + } + //]]> [% ELSE %] @@ -369,7 +375,7 @@ Modify [% UNLESS (books_loo.order_received) %]
- Transfer + Transfer [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt index cc73a5b..40518ce 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt @@ -89,6 +89,13 @@ window.location = "addorder.pl?ordernumber="+ordernumber+"&basketno="+basketno+"&quantity=0&biblionumber="+biblionumber+"&delbiblio=1&invoiceid=[% invoiceid %]"; } } + + function transfer_order_popup(ordernumber) { + var url = "/cgi-bin/koha/acqui/transferorder.pl?" + + "ordernumber=" + ordernumber + window.open(url, 'TransferOrder'); + } + //]]> @@ -219,7 +226,7 @@ Receive
- Transfer + Transfer [% IF ( loop_order.left_holds_on_order ) %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/transferorder.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/transferorder.tt index f694c1f..c44b583 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/transferorder.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/transferorder.tt @@ -1,16 +1,16 @@ [% INCLUDE 'doc-head-open.inc' %] Koha › Acquisitions › Transfer order [% INCLUDE 'doc-head-close.inc' %] +[% IF transferred %] + +[% END %] -[% INCLUDE 'header.inc' %] -[% INCLUDE 'acquisitions-search.inc' %] - -
@@ -32,7 +32,7 @@ [% basket.basketname %] (#[% basket.basketno %]) [% basket.createdby %] [% basket.creationdate %] - Choose + Choose [% END %] @@ -59,7 +59,7 @@ [% IF ( ordersloo.isbn ) %] – [% ordersloo.isbn %][% END %] [% IF ( ordersloo.publishercode ) %]
Publisher :[% ordersloo.publishercode %][% END %] - Transfer + Transfer [% END %] @@ -81,7 +81,7 @@ [% FOREACH bookseller IN booksellersloop %] [% bookseller.name %] - Choose + Choose [% END %] @@ -98,7 +98,6 @@ [% END %]
- [% IF ( ordernumber ) %] [% END %] @@ -113,9 +112,6 @@
-
- [% INCLUDE 'acquisitions-menu.inc' %] -
[% INCLUDE 'intranet-bottom.inc' %] -- 1.8.4.rc2