From 3b8d5dedbdfa824dd6cba7e691e4551d02a036d4 Mon Sep 17 00:00:00 2001 From: Julian Maurice Date: Mon, 11 Jun 2012 13:56:58 +0200 Subject: [PATCH 2/2] Bug 5349 follow-up: run transferorder.pl in a popup --- acqui/transferorder.pl | 5 +--- .../intranet-tmpl/prog/en/modules/acqui/parcel.tt | 10 ++++++-- .../prog/en/modules/acqui/transferorder.tt | 26 +++++++++----------- 3 files changed, 20 insertions(+), 21 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/parcel.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt index f54793a..4dfefc2 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt @@ -135,7 +135,7 @@ + '' + 'Receive' + '
' - + 'Transfer' + + 'Transfer' + '').appendTo("table#pendingt"); } @@ -177,6 +177,12 @@ } } + function transfer_order_popup(ordernumber) { + var url = "/cgi-bin/koha/acqui/transferorder.pl?" + + "ordernumber=" + ordernumber + window.open(url, 'TransferOrder'); + } + //]]> @@ -284,7 +290,7 @@ Receive
- Transfer + Transfer 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.7.10