Bugzilla – Attachment 92783 Details for
Bug 15516
Allow to place a hold on first available item from a group of titles
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15516: Allow to reserve first available item from a group of titles
Bug-15516-Allow-to-reserve-first-available-item-fr.patch (text/plain), 22.62 KB, created by
Julian Maurice
on 2019-09-13 13:11:43 UTC
(
hide
)
Description:
Bug 15516: Allow to reserve first available item from a group of titles
Filename:
MIME Type:
Creator:
Julian Maurice
Created:
2019-09-13 13:11:43 UTC
Size:
22.62 KB
patch
obsolete
>From b7b334e8fea4d2595f6ed5c2214d36af141138cb Mon Sep 17 00:00:00 2001 >From: Julian Maurice <julian.maurice@biblibre.com> >Date: Thu, 7 Jan 2016 14:14:18 +0100 >Subject: [PATCH] Bug 15516: Allow to reserve first available item from a group > of titles > >It can be useful, for instance, if a library have the same title from >different publishers (so 1 title but several biblio records) but the >user only wants a copy of the book, regardless of the publisher. > >This patch is only for staff interface. > >Test plan: >0. Run updatedatabase.pl and misc/devel/update_dbix_class_files.pl >1. Go to intranet search, display some results, click on some checkboxes > and click on 'Place hold' button at the top of the results. >2. Enter a patron cardnumber and click Search >3. Check the box for 'Place a hold on the next available item' (it's > usually hidden when placing a hold on multiple biblios) >4. Click on 'Place hold' >5. In the next screen you should see all the holds you placed with the > additional text '(part of a reserve group)' in Details column. >6. Click on the "reserve group" link. A modal window should appear with > the content of the reserve group (a list of holds) >7. Check in an item of one of the reserved biblios and confirm the hold >8. The hold status is changed to Waiting, and all other holds are > deleted. > >Note: the "reserve group" link is displayed in the following pages: >- reserve/request.pl >- circ/circulation.pl >- members/moremember.pl >- circ/pendingreserves.pl > >Signed-off-by: Josef Moravec <josef.moravec@gmail.com> >Signed-off-by: Benjamin Rokseth <benjamin.rokseth@kul.oslo.kommune.no> >Signed-off-by: Michal Denar <black23@gmail.com> >--- > C4/Reserves.pm | 72 ++++++++++++++++++- > Koha/Template/Plugin/Biblio.pm | 8 +++ > circ/pendingreserves.pl | 2 + > .../data/mysql/atomicupdate/bug_15516.sql | 8 +++ > installer/data/mysql/kohastructure.sql | 14 +++- > .../prog/en/includes/holds_table.inc | 3 + > .../prog/en/includes/reserve-group-modal.inc | 27 +++++++ > .../prog/en/modules/circ/circulation.tt | 1 + > .../prog/en/modules/circ/pendingreserves.tt | 5 ++ > .../prog/en/modules/members/moremember.tt | 1 + > .../prog/en/modules/reserve/request.tt | 14 ++-- > .../prog/en/modules/reserve/reserve-group.tt | 30 ++++++++ > koha-tmpl/intranet-tmpl/prog/js/holds.js | 6 ++ > reserve/placerequest.pl | 9 ++- > reserve/request.pl | 1 + > reserve/reserve-group.pl | 42 +++++++++++ > svc/holds | 1 + > 17 files changed, 237 insertions(+), 7 deletions(-) > create mode 100644 installer/data/mysql/atomicupdate/bug_15516.sql > create mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/reserve-group-modal.inc > create mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/reserve/reserve-group.tt > create mode 100644 reserve/reserve-group.pl > >diff --git a/C4/Reserves.pm b/C4/Reserves.pm >index 2a77c3dc5b..aed1794d26 100644 >--- a/C4/Reserves.pm >+++ b/C4/Reserves.pm >@@ -137,6 +137,10 @@ BEGIN { > IsItemOnHoldAndFound > > GetMaxPatronHoldsForRecord >+ >+ &AddReserveGroup >+ &DeleteReserveGroup >+ &GetReserveGroupReserves > ); > @EXPORT_OK = qw( MergeHolds ); > } >@@ -162,7 +166,8 @@ sub AddReserve { > my ( > $branch, $borrowernumber, $biblionumber, $bibitems, > $priority, $resdate, $expdate, $notes, >- $title, $checkitem, $found, $itemtype >+ $title, $checkitem, $found, $itemtype, >+ $reserve_group_id > ) = @_; > > $resdate = output_pref( { str => dt_from_string( $resdate ), dateonly => 1, dateformat => 'iso' }) >@@ -211,6 +216,7 @@ sub AddReserve { > expirationdate => $expdate, > itemtype => $itemtype, > item_level_hold => $checkitem ? 1 : 0, >+ reserve_group_id => $reserve_group_id, > } > )->store(); > $hold->set_waiting() if $found eq 'W'; >@@ -1075,6 +1081,16 @@ sub ModReserveAffect { > $hold->itemnumber($itemnumber); > $hold->set_waiting($transferToDo); > >+ if ($hold->reserve_group_id) { >+ # Delete other reserves from same group >+ $dbh->do(q{ >+ DELETE FROM reserves >+ WHERE reserve_group_id = ? >+ AND reserve_id != ? >+ }, undef, $hold->reserve_group_id, $hold->reserve_id); >+ DeleteReserveGroup($hold->reserve_group_id); >+ } >+ > _koha_notify_reserve( $hold->reserve_id ) > if ( !$transferToDo && !$already_on_shelf ); > >@@ -2174,6 +2190,60 @@ sub GetHoldRule { > return $sth->fetchrow_hashref(); > } > >+=head2 AddReserveGroup >+ >+ my $reserve_group_id = AddReserveGroup(); >+ >+Creates a new reserve group and returns its ID >+ >+=cut >+ >+sub AddReserveGroup { >+ my $dbh = C4::Context->dbh; >+ >+ $dbh->do('INSERT INTO reserve_group VALUES ()'); >+ return $dbh->last_insert_id(undef, undef, 'reserve_group', undef); >+} >+ >+=head2 DeleteReserveGroup >+ >+ DeleteReserveGroup($reserve_group_id); >+ >+Delete a reserve group. Reserves that belong to this group are not removed. >+ >+=cut >+ >+sub DeleteReserveGroup { >+ my ($reserve_group_id) = @_; >+ >+ my $dbh = C4::Context->dbh; >+ my $query = 'DELETE FROM reserve_group WHERE reserve_group_id = ?'; >+ $dbh->do($query, undef, $reserve_group_id); >+} >+ >+=head2 GetReserveGroupReserves >+ >+ my @reserves = GetReserveGroupReserves($reserve_group_id); >+ >+Fetch all reserve from a reserve group. >+ >+=cut >+ >+sub GetReserveGroupReserves { >+ my ($reserve_group_id) = @_; >+ >+ my $dbh = C4::Context->dbh; >+ >+ my $reserves = $dbh->selectall_arrayref(q{ >+ SELECT * FROM reserves >+ WHERE reserve_group_id = ? >+ }, { Slice => {} }, $reserve_group_id); >+ >+ return () unless defined $reserves; >+ >+ return @$reserves; >+} >+ > =head1 AUTHOR > > Koha Development Team <http://koha-community.org/> >diff --git a/Koha/Template/Plugin/Biblio.pm b/Koha/Template/Plugin/Biblio.pm >index e9d7a73009..ab6a716a0e 100644 >--- a/Koha/Template/Plugin/Biblio.pm >+++ b/Koha/Template/Plugin/Biblio.pm >@@ -63,4 +63,12 @@ sub CanArticleRequest { > return $biblio ? $biblio->can_article_request( $borrower ) : 0; > } > >+sub Get { >+ my ($self, $biblionumber) = @_; >+ >+ my $biblio = Koha::Biblios->find($biblionumber); >+ >+ return $biblio; >+} >+ > 1; >diff --git a/circ/pendingreserves.pl b/circ/pendingreserves.pl >index d890673490..c58e84c281 100755 >--- a/circ/pendingreserves.pl >+++ b/circ/pendingreserves.pl >@@ -197,6 +197,7 @@ my $strsth = > ORDER BY items.itemnumber SEPARATOR '|') l_enumchron, > GROUP_CONCAT(DISTINCT items.copynumber > ORDER BY items.itemnumber SEPARATOR '|') l_copynumber, >+ reserves.reserve_group_id, > biblio.title, > biblio.subtitle, > biblio.medium, >@@ -268,6 +269,7 @@ while ( my $data = $sth->fetchrow_hashref ) { > holdingbranch => $data->{holdingbranch}, > homebranch => $data->{homebranch}, > itemnumber => $data->{itemnumber}, >+ reserve_group_id => $data->{reserve_group_id}, > } > ); > } >diff --git a/installer/data/mysql/atomicupdate/bug_15516.sql b/installer/data/mysql/atomicupdate/bug_15516.sql >new file mode 100644 >index 0000000000..60158bfbb5 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_15516.sql >@@ -0,0 +1,8 @@ >+DROP TABLE IF EXISTS reserve_group; >+CREATE TABLE reserve_group ( >+ reserve_group_id int unsigned NOT NULL AUTO_INCREMENT, >+ PRIMARY KEY (reserve_group_id) >+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; >+ >+ALTER TABLE reserves ADD COLUMN reserve_group_id int unsigned NULL DEFAULT NULL; >+ALTER TABLE reserves ADD CONSTRAINT reserves_ibfk_6 FOREIGN KEY (reserve_group_id) REFERENCES reserve_group (reserve_group_id) ON DELETE SET NULL ON UPDATE CASCADE; >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index 94cac768ca..1ba1686d6f 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -1817,6 +1817,7 @@ CREATE TABLE `reserves` ( -- information related to holds/reserves in Koha > `suspend_until` DATETIME NULL DEFAULT NULL, > `itemtype` VARCHAR(10) NULL DEFAULT NULL, -- If record level hold, the optional itemtype of the item the patron is requesting > `item_level_hold` BOOLEAN NOT NULL DEFAULT 0, -- Is the hpld placed at item level >+ `reserve_group_id` int unsigned NULL DEFAULT NULL, -- Id used on reservations spanning multiple titles > PRIMARY KEY (`reserve_id`), > KEY priorityfoundidx (priority,found), > KEY `borrowernumber` (`borrowernumber`), >@@ -1828,7 +1829,18 @@ CREATE TABLE `reserves` ( -- information related to holds/reserves in Koha > CONSTRAINT `reserves_ibfk_2` FOREIGN KEY (`biblionumber`) REFERENCES `biblio` (`biblionumber`) ON DELETE CASCADE ON UPDATE CASCADE, > CONSTRAINT `reserves_ibfk_3` FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`) ON DELETE CASCADE ON UPDATE CASCADE, > CONSTRAINT `reserves_ibfk_4` FOREIGN KEY (`branchcode`) REFERENCES `branches` (`branchcode`) ON DELETE CASCADE ON UPDATE CASCADE, >- CONSTRAINT `reserves_ibfk_5` FOREIGN KEY (`itemtype`) REFERENCES `itemtypes` (`itemtype`) ON DELETE CASCADE ON UPDATE CASCADE >+ CONSTRAINT `reserves_ibfk_5` FOREIGN KEY (`itemtype`) REFERENCES `itemtypes` (`itemtype`) ON DELETE CASCADE ON UPDATE CASCADE, >+ CONSTRAINT `reserves_ibfk_6` FOREIGN KEY (`reserve_group_id`) REFERENCES `reserve_group` (`reserve_group_id`) ON DELETE SET NULL ON UPDATE CASCADE >+) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; >+ >+-- >+-- Table structure for table reserve_group >+-- >+ >+DROP TABLE IF EXISTS `reserve_group`; >+CREATE TABLE `reserve_group` ( >+ `reserve_group_id` int unsigned NOT NULL AUTO_INCREMENT, >+ PRIMARY KEY(`reserve_group_id`) > ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; > > -- >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/holds_table.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/holds_table.inc >index c40d3e638b..545034898e 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/holds_table.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/holds_table.inc >@@ -164,6 +164,9 @@ > <input type="hidden" name="itemnumber" value="" /> > [% END %] > [% END %] >+ [% IF hold.reserve_group_id %] >+ <div>(part of a <a href="/cgi-bin/koha/reserve/reserve-group.pl?reserve_group_id=[% hold.reserve_group_id %]" class="reserve-group">reserve group</a>)</div> >+ [% END %] > </td> > > [% IF ( CAN_user_reserveforothers_modify_holds_priority ) %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/reserve-group-modal.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/reserve-group-modal.inc >new file mode 100644 >index 0000000000..2a3e68b157 >--- /dev/null >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/reserve-group-modal.inc >@@ -0,0 +1,27 @@ >+<div id="reserve-group-modal" class="modal hide" tabindex="-1" role="dialog" aria-labelledby="reserve-group-modal-label" aria-hidden="true"> >+ <div class="modal-header"> >+ <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">Ã</button> >+ <h3 id="reserve-group-modal-label">Reserve group</h3> >+ </div> >+ <div class="modal-body"> >+ <div id="loading"> <img src="[% interface %]/[% theme %]/img/loading-small.gif" alt="" /> Loading </div> >+ </div> >+ <div class="modal-footer"> >+ <button class="btn" data-dismiss="modal" aria-hidden="true">Close</button> >+ </div> >+</div> >+ >+<script> >+ $(document).ready(function() { >+ $('body').on('click', 'a.reserve-group', function() { >+ var href = $(this).attr('href'); >+ $('#reserve-group-modal .modal-body').load(href + " #main"); >+ $('#reserve-group-modal').modal('show'); >+ return false; >+ }) >+ >+ $('#reserve-group-modal').on('hidden', function(){ >+ $('#reserve-group-modal .modal-body').html('<div id="loading"><img src="[% interface %]/[% theme %]/img/loading-small.gif" alt="" /> ' + _('Loading') + '</div>'); >+ }); >+ }); >+</script> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >index 5fb4889bed..2fe75ea738 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >@@ -1106,4 +1106,5 @@ > [% Asset.js("js/members-menu.js") | $raw %] > [% END %] > >+[% INCLUDE 'reserve-group-modal.inc' %] > [% INCLUDE 'intranet-bottom.inc' %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt >index 1510f81ed9..ffd0a5ec54 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/pendingreserves.tt >@@ -80,6 +80,9 @@ > [% INCLUDE 'biblio-title.inc' biblio=reserveloo %] > </a></p> > [% IF ( reserveloo.author ) %]<p> by [% reserveloo.author | html %]</p>[% END %] >+ [% IF reserveloo.reserve_group_id %] >+ <p>(part of a <a class="reserve-group" href="/cgi-bin/koha/reserve/reserve-group.pl?reserve_group_id=[% reserveloo.reserve_group_id | html %]">reserve group</a>)</p> >+ [% END %] > </td> > [% ELSE %] > <td>"</td> >@@ -304,4 +307,6 @@ > </script> > [% 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' %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt >index 4a046b614b..ffe501d012 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt >@@ -957,4 +957,5 @@ > </script> > [% END %] > >+[% INCLUDE 'reserve-group-modal.inc' %] > [% INCLUDE 'intranet-bottom.inc' %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt >index 91e4ebb6b5..dd0bba33cf 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt >@@ -259,21 +259,25 @@ > <a href="#" id="clear-date-to" class="clear-date">Clear date</a> > </li> > >- [% UNLESS ( multi_hold ) %] > <li> > <label for="requestany">Hold next available item </label> >- [% IF force_hold_level == 'item' %] >+ [% IF multi_hold %] >+ <input type="checkbox" id="requestany" name="requestany" value="1" /> >+ [% ELSE %] >+ [% IF force_hold_level == 'item' %] > <input type="checkbox" id="requestany" name="request" disabled="true" /> >- [% ELSIF force_hold_level == 'record' %] >+ [% ELSIF force_hold_level == 'record' %] > <input type="checkbox" id="requestany" checked="checked" value="Any" disabled="true"/> > <input type="hidden" name="request" value="Any"/> >- [% ELSE %] >+ [% ELSE %] > <input type="checkbox" id="requestany" name="request" checked="checked" value="Any" /> >+ [% END %] > [% END %] > <input type="hidden" name="biblioitem" value="[% biblioitemnumber | html %]" /> > <input type="hidden" name="alreadyreserved" value="[% alreadyreserved | html %]" /> > </li> > >+ [% UNLESS multi_hold %] > [% IF remaining_holds_for_record > 1 %] > <li> > <label for="holds_to_place_count">Holds to place (count)</label> >@@ -971,4 +975,6 @@ > </script> > [% END %] > >+[% INCLUDE 'reserve-group-modal.inc' %] >+ > [% INCLUDE 'intranet-bottom.inc' %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/reserve-group.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/reserve-group.tt >new file mode 100644 >index 0000000000..8926c0a4ca >--- /dev/null >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/reserve-group.tt >@@ -0,0 +1,30 @@ >+[% USE Biblio %] >+[% INCLUDE 'doc-head-open.inc' %] >+ <title>Koha › Circulation › Holds › Holds group ([% reserve_group_id %])</title> >+ [% INCLUDE 'doc-head-close.inc' %] >+</head> >+<body id="reserve-reserve-group"> >+ <h1>Holds group ([% reserve_group_id %])</h1> >+ <div id="main"> >+ [% IF reserves.size %] >+ <table> >+ <thead> >+ <tr> >+ <th>Title</th> >+ <th>Priority</th> >+ <th>Notes</th> >+ </tr> >+ </thead> >+ <tbody> >+ [% FOREACH reserve IN reserves %] >+ [% biblio = Biblio.Get(reserve.biblionumber) %] >+ <tr> >+ <td><a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% biblio.biblionumber %]">[% biblio.title %]</a></td> >+ <td>[% reserve.priority %]</td> >+ <td>[% reserve.reservenotes %]</td> >+ </tr> >+ [% END %] >+ </tbody> >+ <table> >+ [% END %] >+ [% INCLUDE 'intranet-bottom.inc' %] >diff --git a/koha-tmpl/intranet-tmpl/prog/js/holds.js b/koha-tmpl/intranet-tmpl/prog/js/holds.js >index 3c0d77dc48..de6f875002 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/holds.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/holds.js >@@ -44,6 +44,12 @@ $(document).ready(function() { > title += " - <span class='" + span_class + "'>" + oObj.itemnotes.escapeHtml() + "</span>" > } > >+ if (oObj.reserve_group_id) { >+ title += '<br>'; >+ var link = '<a class="reserve-group" href="/cgi-bin/koha/reserve/reserve-group.pl?reserve_group_id=' + oObj.reserve_group_id + '">' + RESERVE_GROUP +'</a>' >+ title += '<span>' + PART_OF_A.format(link) + '</span>'; >+ } >+ > return title; > } > }, >diff --git a/reserve/placerequest.pl b/reserve/placerequest.pl >index 89c591d55b..05282facb1 100755 >--- a/reserve/placerequest.pl >+++ b/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 >diff --git a/reserve/request.pl b/reserve/request.pl >index 49ea545826..4284a62694 100755 >--- a/reserve/request.pl >+++ b/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 ); > } >diff --git a/reserve/reserve-group.pl b/reserve/reserve-group.pl >new file mode 100644 >index 0000000000..91ed958538 >--- /dev/null >+++ b/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 <http://www.gnu.org/licenses>. >+ >+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; >diff --git a/svc/holds b/svc/holds >index c406c0e4a4..6505ddce47 100755 >--- a/svc/holds >+++ b/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 } > ) >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 15516
:
46392
|
47498
|
47570
|
47961
|
47962
|
47963
|
48097
|
48098
|
48448
|
48449
|
50094
|
50095
|
50096
|
53742
|
53743
|
53744
|
53770
|
53771
|
53772
|
53774
|
53775
|
53776
|
54977
|
55300
|
55304
|
55305
|
55306
|
55307
|
55308
|
55768
|
55769
|
55770
|
55771
|
55772
|
58799
|
58800
|
58801
|
58802
|
58803
|
59314
|
59315
|
59316
|
59317
|
59318
|
69902
|
69903
|
69904
|
69905
|
69906
|
72485
|
72486
|
72487
|
72488
|
72489
|
72491
|
79077
|
79078
|
79080
|
79081
|
79082
|
79083
|
79213
|
79214
|
79215
|
79216
|
79217
|
79218
|
79219
|
79220
|
79221
|
79222
|
81453
|
81454
|
81455
|
81456
|
81457
|
81458
|
81459
|
81460
|
81461
|
81462
|
81463
|
84554
|
84555
|
84556
|
84557
|
84558
|
84559
|
84560
|
84561
|
84562
|
84563
|
84564
|
87828
|
87829
|
87830
|
87831
|
87832
|
87833
|
87834
|
87835
|
87836
|
87837
|
87838
|
88038
|
88039
|
88125
|
88173
|
88174
|
88175
|
88176
|
88177
|
88178
|
88179
|
88180
|
88181
|
88182
|
88183
|
88184
|
88185
|
88186
|
90289
|
90290
|
90291
|
90292
|
90293
|
90294
|
90295
|
90296
|
90297
|
90298
|
90299
|
90300
|
90301
|
90302
|
90303
|
90829
|
90830
|
90831
|
90832
|
90833
|
90834
|
90835
|
90836
|
90837
|
90838
|
90839
|
90840
|
90841
|
90842
|
90843
|
90844
|
92783
|
92784
|
92785
|
92786
|
92787
|
92788
|
92789
|
92790
|
92791
|
92792
|
92793
|
92794
|
92795
|
92796
|
92797
|
92798
|
114513
|
114514
|
114515
|
114516
|
114517
|
114518
|
114585
|
114586
|
114603
|
114624
|
114625
|
114626
|
114627
|
114628
|
114629
|
114630
|
114631
|
114632
|
114633
|
114634
|
114635
|
114636
|
114637
|
114638
|
114639
|
114640
|
114641
|
114642
|
114643
|
114644
|
114645
|
114647
|
114648
|
114649
|
114650
|
114651
|
114652
|
114653
|
114654
|
114655
|
114656
|
114657
|
114658
|
114659
|
117423
|
117424
|
117425
|
117426
|
118281
|
118282
|
118283
|
118284
|
118285
|
118286
|
118350
|
118351
|
118352
|
118353
|
118354
|
118355
|
120368
|
120369
|
120370
|
120371
|
120372
|
120373
|
120574
|
120643
|
120644
|
120645
|
120646
|
120647
|
120648
|
120649
|
120650
|
120651
|
121523
|
121623
|
122097
|
122102
|
122627
|
128189
|
128190
|
128191
|
128192
|
128193
|
128194
|
128195
|
128196
|
128197
|
128198
|
128199
|
128200
|
128201
|
128202
|
128255
|
128256
|
128257
|
128258
|
128259
|
128260
|
128261
|
128262
|
128263
|
128264
|
128265
|
128266
|
128267
|
128268
|
128269
|
128285
|
128286
|
128287
|
128288
|
128289
|
128290
|
128291
|
128292
|
128293
|
128294
|
128295
|
128296
|
128297
|
128298
|
128299
|
138576
|
138577
|
138578
|
138579
|
138580
|
138581
|
138582
|
138583
|
138584
|
138585
|
138586
|
138587
|
138588
|
138589
|
138593
|
138594
|
138595
|
138596
|
138597
|
138738
|
138739
|
138740
|
138741
|
138742
|
138772
|
138868
|
138869
|
162076
|
162077
|
162078
|
162079
|
162080
|
162081
|
162082
|
162083
|
162084