@@ -304,4 +307,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
@@ -957,4 +957,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
@@ -259,21 +259,25 @@
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
@@ -44,6 +44,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;
@@ -109,7 +115,8 @@ if ( $type eq 'str8' && $borrower ) {
my $bibinfo = $bibinfos{$biblionumber};
if ( $can_override || CanBookBeReserved($borrower->{'borrowernumber'}, $biblionumber)->{status} eq 'OK' ) {
AddReserve($branch,$borrower->{'borrowernumber'},$biblionumber,[$biblionumber],
- $bibinfo->{rank},$startdate,$expirationdate,$notes,$bibinfo->{title},$checkitem,$found);
+ $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
@@ -609,6 +609,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
@@ -108,6 +108,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,
reservedate_formatted => $h->reservedate() ? output_pref(
{ dt => dt_from_string( $h->reservedate() ), dateonly => 1 }
)
--