Lines 30-35
use C4::BackgroundJob;
Link Here
|
30 |
use C4::Biblio qw( GetMarcBiblio ModBiblio ); |
30 |
use C4::Biblio qw( GetMarcBiblio ModBiblio ); |
31 |
use C4::MarcModificationTemplates qw( GetModificationTemplateActions GetModificationTemplates ModifyRecordWithTemplate ); |
31 |
use C4::MarcModificationTemplates qw( GetModificationTemplateActions GetModificationTemplates ModifyRecordWithTemplate ); |
32 |
use Koha::MetadataRecord::Authority; |
32 |
use Koha::MetadataRecord::Authority; |
|
|
33 |
use Koha::Virtualshelves; |
33 |
|
34 |
|
34 |
my $input = new CGI; |
35 |
my $input = new CGI; |
35 |
our $dbh = C4::Context->dbh; |
36 |
our $dbh = C4::Context->dbh; |
Lines 66-71
if ( $completedJobID ) {
Link Here
|
66 |
exit; |
67 |
exit; |
67 |
} |
68 |
} |
68 |
|
69 |
|
|
|
70 |
my @lists = Koha::Virtualshelves->search({}); |
71 |
$template->param( lists => \@lists ); |
72 |
|
69 |
my @templates = GetModificationTemplates( $mmtid ); |
73 |
my @templates = GetModificationTemplates( $mmtid ); |
70 |
unless ( @templates ) { |
74 |
unless ( @templates ) { |
71 |
$op = 'error'; |
75 |
$op = 'error'; |
Lines 108-113
if ( $op eq 'form' ) {
Link Here
|
108 |
$content =~ s/[\r\n]*$//; |
112 |
$content =~ s/[\r\n]*$//; |
109 |
push @record_ids, $content if $content; |
113 |
push @record_ids, $content if $content; |
110 |
} |
114 |
} |
|
|
115 |
} elsif ( my $shelf_number = $input->param('shelf_number') ) { |
116 |
my $shelf = Koha::Virtualshelves->find($shelf_number); |
117 |
my $contents = $shelf->get_contents; |
118 |
while ( my $content = $contents->next ) { |
119 |
my $biblionumber = $content->biblionumber; |
120 |
push @record_ids, $biblionumber; |
121 |
} |
111 |
} else { |
122 |
} else { |
112 |
# The user enters manually the list of id |
123 |
# The user enters manually the list of id |
113 |
push @record_ids, split( /\s\n/, $input->param('recordnumber_list') ); |
124 |
push @record_ids, split( /\s\n/, $input->param('recordnumber_list') ); |
114 |
- |
|
|