From cf0f187c017d1e7302f8af34f60239bf40674524 Mon Sep 17 00:00:00 2001 From: Christopher Brannon Date: Sat, 15 Sep 2018 21:57:00 +0000 Subject: [PATCH] Bug 21346: Update/Fix dialogs - Fix hold waiting TEST PLAN 1) Place a hold on an item from Branch A to be delivered to Branch B. 2) Checkin the item at Branch A and confifm the hold to transfer. 3) Be human and make a mistake. Login as Branch C and check the item in 4) Note the great modal to redirect the hold. Note that the old dialog is behind it! 5) Check in the item at Branch B to put it in waiting status. 6) Be human and make another mistake. Login as Branch C and check the item in. Notice it does nothing except a local hold. 7) Check out an item at Branch A. 8) Check in the item at Branch B. Notice the classic blue transfer dialog at the top of page. 9) Apply the patch. 10) Check everything in at their branches. 11) Repeat steps 1-8. Now note the classic dialogs are gone and nothing but the modals left. Note that the waiting hold will now reroute back the place it should be waiting. --- circ/returns.pl | 2 + .../intranet-tmpl/prog/en/modules/circ/returns.tt | 139 +++++++++------------ 2 files changed, 63 insertions(+), 78 deletions(-) diff --git a/circ/returns.pl b/circ/returns.pl index c2f20ef..cbfa556 100755 --- a/circ/returns.pl +++ b/circ/returns.pl @@ -448,6 +448,8 @@ if ( $messages->{'ResFound'}) { if ( $reserve->{'ResFound'} eq "Waiting" ) { $template->param( waiting => ($userenv_branch eq $reserve->{'branchcode'} ? 1 : 0 ), + transfertodo => ($userenv_branch eq $reserve->{'branchcode'} ? 0 : 1 ), + reserved => 1, ); } elsif ( $reserve->{'ResFound'} eq "Reserved" ) { $template->param( diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt index 74b24f6..54cdea0 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt @@ -170,36 +170,31 @@ [% END %] - -[% IF ( WrongTransfer ) %] -
- -

Please return item to: [% Branches.GetName( TransferWaitingAt ) | html %]

-

[% itembarcode | html %]: [% title | html %]

- - -[% IF ( patron.cardnumber ) %]
Hold for:
- - -
- - - - - - - - - - -
- [% END %]
+ +[% IF ( transfer || ( WrongTransfer && !reserved ) ) %] + [% END %] [% IF ( found ) %] @@ -295,7 +290,7 @@ [% END %] [% IF ( diffbranch ) %] - +

Hold needing transfer found

[% itembarcode | html %]: [% title | html %]

@@ -314,40 +309,30 @@

Hold at [% Branches.GetName( destbranch ) | html %]

[% END %] -
- - - - - - [% FOREACH inputloo IN inputloop %] - - - - [% END %] - - - - - - - - -
-
- [% END %] - - [% IF ( transfer ) %] - -
-

Please return item to: [% Branches.GetName( returnbranch ) | html %]

-

[% itembarcode | html %]: [% title | html %]

-

+
+ + + + + + [% FOREACH inputloo IN inputloop %] + + + + [% END %] + + + + + + + +
[% END %] [% IF ( needstransfer ) %] - +

This item needs to be transferred to [% Branches.GetName( returnbranch ) | html %]

Transfer now?
@@ -357,23 +342,23 @@ - - - - - [% FOREACH inputloo IN inputloop %] - - - - [% END %] - - - -
+ + + + + [% FOREACH inputloo IN inputloop %] + + + + [% END %] + + + + [% END %] [% IF ( diffbranch ) %] - +

Item consigned:

@@ -398,10 +383,9 @@ [% END %] - [% IF ( reserved ) %] - +
[% title | html %]