minor fixes (to get less warning during translation)
[wip/koha-chris_n.git] / opac / opac-serial-issues.pl
1 #!/usr/bin/perl
2
3 use strict;
4 use CGI;
5 use C4::Auth;
6 use C4::Koha;
7 use C4::Date;
8 use C4::Bull;
9 use C4::Output;
10 use C4::Interface::CGI::Output;
11 use C4::Context;
12 use HTML::Template;
13
14 my $query = new CGI;
15 my $op = $query->param('op');
16 my $dbh = C4::Context->dbh;
17 my $sth;
18 # my $id;
19 my ($template, $loggedinuser, $cookie);
20 my ($subscriptionid);
21
22 $subscriptionid = $query->param('subscriptionid');
23 my $subscription = &getsubscription($subscriptionid);
24
25 ($template, $loggedinuser, $cookie)
26 = get_template_and_user({template_name => "opac-serial-issues.tmpl",
27                                 query => $query,
28                                 type => "opac",
29                                 authnotrequired => 1,
30                                 debug => 1,
31                                 });
32
33 # replace CR by <br> in librarian note
34 $subscription->{opacnote} =~ s/\n/\<br\/\>/g;
35
36 $template->param(
37         startdate => format_date($subscription->{startdate}),
38         periodicity => $subscription->{periodicity},
39         dow => $subscription->{dow},
40         numberlength => $subscription->{numberlength},
41         weeklength => $subscription->{weeklength},
42         monthlength => $subscription->{monthlength},
43         opacnote => $subscription->{opacnote},
44         numberingmethod => $subscription->{numberingmethod},
45         arrivalplanified => $subscription->{arrivalplanified},
46         status => $subscription->{status},
47         biblionumber => $subscription->{biblionumber},
48         bibliotitle => $subscription->{bibliotitle},
49         notes => $subscription->{notes},
50         subscriptionid => $subscription->{subscriptionid}
51         );
52 $template->param(
53                         "periodicity$subscription->{periodicity}" => 1,
54                         "arrival$subscription->{dow}" => 1,
55                         );
56
57 output_html_with_http_headers $query, $cookie, $template->output;