3 #use warnings; FIXME - Bug 2505
9 use C4
::RotatingCollections
;
16 my $colId = $query->param('colId');
17 my $toBranch = $query->param('toBranch');
19 my ($template, $loggedinuser, $cookie)
20 = get_template_and_user
({template_name
=> "rotating_collections/transferCollection.tmpl",
24 flagsrequired
=> {parameters
=> 1},
28 ## Transfer collection
29 my ( $success, $errorCode, $errorMessage );
31 ( $success, $errorCode, $errorMessage ) = TransferCollection
( $colId, $toBranch );
34 $template->param( transferSuccess
=> 1 );
36 $template->param( transferFailure
=> 1,
37 errorCode
=> $errorCode,
38 errorMessage
=> $errorMessage
43 ## Set up the toBranch select options
44 my $branches = GetBranches
();
46 foreach my $br (keys %$branches) {
49 $branch{name
}=$branches->{$br}->{'branchname'};
50 push (@branchoptionloop, \
%branch);
53 ## Get data about collection
54 my ( $colId, $colTitle, $colDesc, $colBranchcode ) = GetCollection
( $colId );
56 intranetcolorstylesheet
=> C4
::Context
->preference("intranetcolorstylesheet"),
57 intranetstylesheet
=> C4
::Context
->preference("intranetstylesheet"),
58 IntranetNav
=> C4
::Context
->preference("IntranetNav"),
61 colTitle
=> $colTitle,
63 colBranchcode
=> $colBranchcode,
64 branchoptionloop
=> \
@branchoptionloop
67 output_html_with_http_headers
$query, $cookie, $template->output;