3 # Copyright 2020 Aleisha Amohia <aleisha@catalyst.net.nz>
5 # This file is part of Koha.
6 # Koha is free software; you can redistribute it and/or modify it
7 # under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 3 of the License, or
9 # (at your option) any later version.
11 # Koha is distributed in the hope that it will be useful, but
12 # WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with Koha; if not, see <http://www.gnu.org/licenses>.
28 my ($template, $loggedinuser, $cookie)= get_template_and_user(
30 template_name => "recalls/request.tt",
34 flagsrequired => { recalls => "manage_recalls" },
39 my $op = $input->param('op') || 'list';
40 my @recall_ids = $input->multi_param('recall_ids');
41 my $biblionumber = $input->param('biblionumber');
42 my $recalls = Koha::Recalls->search({ biblionumber => $biblionumber, old => undef });
43 my $biblio = Koha::Biblios->find( $biblionumber );
45 if ( $op eq 'cancel_multiple_recalls' ) {
46 foreach my $id ( @recall_ids ) {
47 Koha::Recalls->find( $id )->set_cancelled;
52 if ( $op eq 'list' ) {
53 $recalls = Koha::Recalls->search({ biblionumber => $biblionumber, old => undef });
54 $biblio = Koha::Biblios->find( $biblionumber );
62 C4::Search::enabled_staff_search_views,
65 output_html_with_http_headers $input, $cookie, $template->output;