From 984cbad1ac48ea0a0295739819df50e024f9bbc1 Mon Sep 17 00:00:00 2001 From: tipaul Date: Thu, 4 Aug 2005 13:19:54 +0000 Subject: [PATCH] synch'ing 2.2 and head --- bookshelves/shelves.pl | 7 +++- bull/serial-issues.pl | 87 +++++++++++++++++++++++++----------------- 2 files changed, 56 insertions(+), 38 deletions(-) diff --git a/bookshelves/shelves.pl b/bookshelves/shelves.pl index 7d1e519adc..dfd79efe4d 100755 --- a/bookshelves/shelves.pl +++ b/bookshelves/shelves.pl @@ -190,10 +190,13 @@ sub viewshelf { # # $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 # -# 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 # # Revision 1.5 2004/12/16 11:30:57 tipaul diff --git a/bull/serial-issues.pl b/bull/serial-issues.pl index 75ebf97f16..59eec456f6 100755 --- a/bull/serial-issues.pl +++ b/bull/serial-issues.pl @@ -14,45 +14,60 @@ use HTML::Template; my $query = new CGI; my $op = $query->param('op'); my $dbh = C4::Context->dbh; +my $selectview = $query->param('selectview'); +$selectview = C4::Context->preference("SubscriptionHistory") unless $selectview; + my $sth; # my $id; my ($template, $loggedinuser, $cookie); -my ($subscriptionid); - -$subscriptionid = $query->param('subscriptionid'); -my $subscription = &getsubscription($subscriptionid); - -($template, $loggedinuser, $cookie) -= get_template_and_user({template_name => "bull/serial-issues.tmpl", - query => $query, - type => "intranet", - authnotrequired => 0, - flagsrequired => {catalogue => 1}, - debug => 1, - }); - -# replace CR by
in librarian note -$subscription->{librariannote} =~ s/\n/\/g; +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}; -$template->param( - startdate => format_date($subscription->{startdate}), - periodicity => $subscription->{periodicity}, - dow => $subscription->{dow}, - 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, - ); + ($template, $loggedinuser, $cookie) + = get_template_and_user({template_name => "bull/full-serial-issues.tmpl", + query => $query, + type => "intranet", + authnotrequired => 1, + debug => 1, + }); + + # replace CR by
in librarian note + # $subscription->{opacnote} =~ s/\n/\/g; + + $template->param( + biblionumber => $query->param('biblionumber'), + years => $subscriptions, + yearmin => $yearmin, + yearmax =>$yearmax, + bibliotitle => $title, + suggestion => C4::Context->preference("suggestion"), + virtualshelves => C4::Context->preference("virtualshelves"), + ); +} 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
in librarian note + # $subscription->{opacnote} =~ s/\n/\/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; -- 2.39.5