From a2a952c9938f3bb6a4a33c2b03be1237c90a0228 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 Content-Type: text/plain; charset="utf-8" --- acqui/transferorder.pl | 5 +--- .../intranet-tmpl/prog/en/modules/acqui/basket.tt | 10 ++++++- .../intranet-tmpl/prog/en/modules/acqui/parcel.tt | 10 ++++++- .../prog/en/modules/acqui/transferorder.tt | 26 ++++++++----------- 4 files changed, 28 insertions(+), 23 deletions(-) diff --git a/acqui/transferorder.pl b/acqui/transferorder.pl index 2946fcf..5475327 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 19249d1..2ac01c8 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt @@ -27,7 +27,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) { @@ -35,6 +35,12 @@ } } + function transfer_order_popup(ordernumber) { + var url = "/cgi-bin/koha/acqui/transferorder.pl?" + + "ordernumber=" + ordernumber + window.open(url, 'TransferOrder'); + } + //]]> [% ELSE %] @@ -325,7 +331,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 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.2.5