synch'ing 2.2 and head

This commit is contained in:
tipaul 2005-08-04 13:19:54 +00:00
parent 89f7388354
commit 984cbad1ac
2 changed files with 56 additions and 38 deletions

View file

@ -190,10 +190,13 @@ sub viewshelf {
# #
# $Log$ # $Log$
# Revision 1.7 2005/04/27 18:16:19 oleonard # Revision 1.8 2005/08/04 13:19:54 tipaul
# synch'ing 2.2 and head
#
# Revision 1.5.2.2 2005/04/27 18:15:27 oleonard
# Left out some instances in the previous update # Left out some instances in the previous update
# #
# Revision 1.6 2005/04/27 17:17:41 oleonard # Revision 1.5.2.1 2005/04/27 16:55:38 oleonard
# Moving alternating row colors to the template, adding publicationyear and itemtype variables # Moving alternating row colors to the template, adding publicationyear and itemtype variables
# #
# Revision 1.5 2004/12/16 11:30:57 tipaul # Revision 1.5 2004/12/16 11:30:57 tipaul

View file

@ -14,45 +14,60 @@ use HTML::Template;
my $query = new CGI; my $query = new CGI;
my $op = $query->param('op'); my $op = $query->param('op');
my $dbh = C4::Context->dbh; my $dbh = C4::Context->dbh;
my $selectview = $query->param('selectview');
$selectview = C4::Context->preference("SubscriptionHistory") unless $selectview;
my $sth; my $sth;
# my $id; # my $id;
my ($template, $loggedinuser, $cookie); my ($template, $loggedinuser, $cookie);
my ($subscriptionid); my $biblionumber = $query->param('biblionumber');
if ($selectview eq "full"){
my $subscriptions = get_full_subscription_list_from_biblionumber($biblionumber);
my $title = $subscriptions->[0]{bibliotitle};
my $yearmin=$subscriptions->[0]{year};
my $yearmax=$subscriptions->[scalar(@$subscriptions)-1]{year};
$subscriptionid = $query->param('subscriptionid'); ($template, $loggedinuser, $cookie)
my $subscription = &getsubscription($subscriptionid); = get_template_and_user({template_name => "bull/full-serial-issues.tmpl",
query => $query,
($template, $loggedinuser, $cookie) type => "intranet",
= get_template_and_user({template_name => "bull/serial-issues.tmpl", authnotrequired => 1,
query => $query, debug => 1,
type => "intranet", });
authnotrequired => 0,
flagsrequired => {catalogue => 1}, # replace CR by <br> in librarian note
debug => 1, # $subscription->{opacnote} =~ s/\n/\<br\/\>/g;
});
$template->param(
# replace CR by <br> in librarian note biblionumber => $query->param('biblionumber'),
$subscription->{librariannote} =~ s/\n/\<br\/\>/g; years => $subscriptions,
yearmin => $yearmin,
$template->param( yearmax =>$yearmax,
startdate => format_date($subscription->{startdate}), bibliotitle => $title,
periodicity => $subscription->{periodicity}, suggestion => C4::Context->preference("suggestion"),
dow => $subscription->{dow}, virtualshelves => C4::Context->preference("virtualshelves"),
numberlength => $subscription->{numberlength}, );
weeklength => $subscription->{weeklength},
monthlength => $subscription->{monthlength},
librariannote => $subscription->{librariannote},
numberingmethod => $subscription->{numberingmethod},
arrivalplanified => $subscription->{arrivalplanified},
status => $subscription->{status},
biblionumber => $subscription->{biblionumber},
bibliotitle => $subscription->{bibliotitle},
notes => $subscription->{notes},
subscriptionid => $subscription->{subscriptionid}
);
$template->param(
"periodicity$subscription->{periodicity}" => 1,
"arrival$subscription->{dow}" => 1,
);
} else {
my $subscriptions = get_subscription_list_from_biblionumber($biblionumber);
($template, $loggedinuser, $cookie)
= get_template_and_user({template_name => "bull/serial-issues.tmpl",
query => $query,
type => "intranet",
authnotrequired => 1,
debug => 1,
});
# replace CR by <br> in librarian note
# $subscription->{opacnote} =~ s/\n/\<br\/\>/g;
$template->param(
biblionumber => $query->param('biblionumber'),
subscription_LOOP => $subscriptions,
suggestion => C4::Context->preference("suggestion"),
virtualshelves => C4::Context->preference("virtualshelves"),
);
}
output_html_with_http_headers $query, $cookie, $template->output; output_html_with_http_headers $query, $cookie, $template->output;