@@ -, +, @@ checked out during placing hold --- .../prog/en/modules/reserve/request.tt | 28 +++++++++++++++---- reserve/request.pl | 16 +++++++++++ 2 files changed, 39 insertions(+), 5 deletions(-) --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt @@ -90,6 +90,14 @@ [% ELSIF NOT noitems %] +[% IF ( checked_previously && !multi_hold ) %] +
+ +
+[% END %] + [% IF ( exceeded_maxreserves || exceeded_holds_per_record || alreadyreserved || none_available || alreadypossession || ageRestricted ) %]
@@ -439,6 +447,7 @@ + [% UNLESS ( item_level_itypes ) %] @@ -453,15 +462,17 @@ [% END %] + [% END %] + @@ -472,6 +483,9 @@ [% END %]
  TitleItem type
+ [% UNLESS ( biblioloo.warn ) %] + - [% UNLESS ( biblioloo.warn ) %] - - [% ELSE %] + [% IF ( biblioloo.warn ) %] [% END %] [% biblioloo.rank | html %] + [% IF ( biblioloo.checked_previously ) %] + Patron has previously checked out this title
+ [% END %] [% IF ( biblioloo.alreadyres ) %]
    [% ELSE %] @@ -509,7 +523,11 @@ [% ELSIF ( none_available ) %] [% ELSE %] - + [% IF ( multi_hold ) %] + + [% ELSE %] + + [% END %] [% END %] [% END %] @@ -742,7 +760,7 @@ } function checkMultiHold() { - var spans = $(".multi_hold_item"); + var spans = $(".multi_hold_item_checkbox:checked"); if ($(spans).size() == 0) { alert(MSG_NO_ITEMS_AVAILABLE); return false; --- a/reserve/request.pl +++ a/reserve/request.pl @@ -143,6 +143,7 @@ if ( $biblionumbers ) { push @biblionumbers, $input->multi_param('biblionumber'); } +my $multihold = scalar $input->param('multi_hold'); # FIXME multi_hold should not be a variable but depends on the number of elements in @biblionumbers $template->param(multi_hold => scalar $input->param('multi_hold')); @@ -208,6 +209,10 @@ my $patron = Koha::Patrons->find( $borrowernumber_hold ); my $logged_in_patron = Koha::Patrons->find( $borrowernumber ); +my $wants_check; +if ($patron) { + $wants_check = $patron->wants_check_for_previous_checkout; +} my $itemdata_enumchron = 0; my $itemdata_ccode = 0; my @biblioloop = (); @@ -374,6 +379,17 @@ foreach my $biblionumber (@biblionumbers) { foreach my $itemnumber ( @{ $itemnumbers_of_biblioitem{$biblioitemnumber} } ) { my $item = $iteminfos_of->{$itemnumber}; + if ( $patron ) { + my $do_check = $patron->do_check_for_previous_checkout($item) if $wants_check; + if ( $do_check && $wants_check ) { + $item->{checked_previously} = $do_check; + if ( $multihold ) { + $biblioloopiter{checked_previously} = $do_check; + } else { + $template->param( checked_previously => $do_check ); + } + } + } $item->{force_hold_level} = $force_hold_level; unless (C4::Context->preference('item-level_itypes')) { --