@@ -303,4 +306,6 @@
[% END %]
+[%# TODO: this module needs to be separated to html and js part to be included correctly %]
+[% INCLUDE 'reserve-group-modal.inc' %]
[% INCLUDE 'intranet-bottom.inc' %]
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt
@@ -944,4 +944,5 @@
[% END %]
+[% INCLUDE 'reserve-group-modal.inc' %]
[% INCLUDE 'intranet-bottom.inc' %]
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt
+++ a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt
@@ -231,20 +231,24 @@
Clear date
- [% UNLESS ( multi_hold ) %]
+ [% END %]
+ [% INCLUDE 'intranet-bottom.inc' %]
--- a/koha-tmpl/intranet-tmpl/prog/js/holds.js
+++ a/koha-tmpl/intranet-tmpl/prog/js/holds.js
@@ -42,6 +42,12 @@ $(document).ready(function() {
title += " - " + oObj.itemnotes.escapeHtml() + ""
}
+ if (oObj.reserve_group_id) {
+ title += ' ';
+ var link = '' + RESERVE_GROUP +''
+ title += '' + PART_OF_A.format(link) + '';
+ }
+
return title;
}
},
--- a/reserve/placerequest.pl
+++ a/reserve/placerequest.pl
@@ -52,6 +52,7 @@ my $title = $input->param('title');
my $checkitem = $input->param('checkitem');
my $expirationdate = $input->param('expiration_date');
my $itemtype = $input->param('itemtype') || undef;
+my $requestany = $input->param('requestany');
my $borrower = Koha::Patrons->find( $borrowernumber );
$borrower = $borrower->unblessed if $borrower;
@@ -74,6 +75,11 @@ my $found;
if ( $type eq 'str8' && $borrower ) {
+ my $reserve_group_id;
+ if ($multi_hold && $requestany) {
+ $reserve_group_id = AddReserveGroup();
+ }
+
foreach my $biblionumber ( keys %bibinfos ) {
my $count = @bibitems;
@bibitems = sort @bibitems;
@@ -98,8 +104,10 @@ if ( $type eq 'str8' && $borrower ) {
if ($multi_hold) {
my $bibinfo = $bibinfos{$biblionumber};
if ( CanBookBeReserved($borrower->{'borrowernumber'}, $biblionumber)->{status} eq 'OK' ) {
- AddReserve($branch,$borrower->{'borrowernumber'},$biblionumber,[$biblionumber],
- $bibinfo->{rank},$startdate,$expirationdate,$notes,$bibinfo->{title},$checkitem,$found);
+ AddReserve($branch, $borrower->{'borrowernumber'}, $biblionumber,
+ [$biblionumber], $bibinfo->{rank}, $startdate, $expirationdate,
+ $notes, $bibinfo->{title}, $checkitem, $found, $itemtype,
+ $reserve_group_id);
}
} else {
# place a request on 1st available
--- a/reserve/request.pl
+++ a/reserve/request.pl
@@ -602,6 +602,7 @@ foreach my $biblionumber (@biblionumbers) {
$reserve{itemtype} = $res->itemtype();
$reserve{branchcode} = $res->branchcode();
$reserve{object} = $res;
+ $reserve{'reserve_group_id'} = $res->reserve_group_id;
push( @reserveloop, \%reserve );
}
--- a/reserve/reserve-group.pl
+++ a/reserve/reserve-group.pl
@@ -0,0 +1,42 @@
+#!/usr/bin/env perl
+
+# This file is part of Koha.
+#
+# Koha is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# Koha is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Koha; if not, see .
+
+use Modern::Perl;
+use CGI qw( -utf8 );
+
+use C4::Auth;
+use C4::Output;
+use C4::Reserves;
+
+my $cgi = new CGI;
+my ($template, $loggedinuser, $cookie) = get_template_and_user({
+ template_name => "reserve/reserve-group.tt",
+ query => $cgi,
+ type => "intranet",
+ authnotrequired => 0,
+ flagsrequired => { circulate => 'circulate_remaining_permissions' },
+});
+
+my $reserve_group_id = $cgi->param('reserve_group_id');
+my @reserves = GetReserveGroupReserves($reserve_group_id);
+
+$template->param(
+ reserve_group_id => $reserve_group_id,
+ reserves => \@reserves,
+);
+
+output_html_with_http_headers $cgi, $cookie, $template->output;
--- a/svc/holds
+++ a/svc/holds
@@ -102,6 +102,7 @@ while ( my $h = $holds_rs->next() ) {
waiting_here => $h->branch()->branchcode() eq $branch,
priority => $h->priority(),
itemtype_limit => $itemtype_limit,
+ reserve_group_id => $h->reserve_group_id,
subtitle => GetRecordValue(
'subtitle',
GetMarcBiblio({ biblionumber => $biblionumber }),
--