merging 2.2 branch with head. Sorry for not making it before, many many commits done...
[koha.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 $biblionumber = $query->param('biblionumber');
21 my $subscriptions = get_subscription_list_from_biblionumber($biblionumber);
22
23 ($template, $loggedinuser, $cookie)
24 = get_template_and_user({template_name => "opac-serial-issues.tmpl",
25                                 query => $query,
26                                 type => "opac",
27                                 authnotrequired => 1,
28                                 debug => 1,
29                                 });
30
31 # replace CR by <br> in librarian note
32 # $subscription->{opacnote} =~ s/\n/\<br\/\>/g;
33
34 $template->param(
35         biblionumber => $query->param('biblionumber'),
36         subscription_LOOP => $subscriptions
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;