From 866708d29ac6600046741f89953b73ab8122b94f Mon Sep 17 00:00:00 2001 From: hdl Date: Sat, 30 Jun 2007 06:23:10 +0000 Subject: [PATCH] serials-edit.pl Changing redirection to serials-home.pl serials-home.pl Adding some parameters to serials-home script to display information passed by serials-edit.pl Preparing information for display. (template to get committed) --- serials/serials-edit.pl | 9 ++++++++- serials/serials-home.pl | 24 ++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 1 deletion(-) diff --git a/serials/serials-edit.pl b/serials/serials-edit.pl index 0ff3a296ff..cec92444ca 100755 --- a/serials/serials-edit.pl +++ b/serials/serials-edit.pl @@ -248,7 +248,14 @@ if ($op eq 'serialchangestatus') { } } } - print $query->redirect("serials-collection.pl?biblionumber=".$serialdatalist[0]->{biblionumber}); + ### FIXME this part of code is not very pretty. Nor is it very efficient... There MUST be a more perlish way to write it. But it works. + my $redirect ="serials-home.pl?"; + $redirect.=join("&",map{"serialseq=".$_} @serialseqs); + $redirect.="&".join("&",map{"planneddate=".$_} @planneddates); + $redirect.="&".join("&",map{"publisheddate=".$_} @publisheddates); + $redirect.="&".join("&",map{"status=".$_} @status); + $redirect.="&".join("&",map{"notes=".$_} @notes); + print $query->redirect("$redirect"); } $template->param(serialsadditems =>C4::Context->preference("serialsadditems")); diff --git a/serials/serials-home.pl b/serials/serials-home.pl index 7a8c5a28b1..2a3820eccc 100755 --- a/serials/serials-home.pl +++ b/serials/serials-home.pl @@ -55,6 +55,12 @@ my $routing = $query->param('routing'); my $searched = $query->param('searched'); my $biblionumber = $query->param('biblionumber'); +my @serialseqs = $query->param('serialseq'); +my @planneddates = $query->param('planneddate'); +my @publisheddates = $query->param('publisheddate'); +my @status = $query->param('status'); +my @notes = $query->param('notes'); + my ( $template, $loggedinuser, $cookie ) = get_template_and_user( { template_name => "serials/serials-home.tmpl", @@ -66,6 +72,24 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( } ); +if (@serialseqs){ + my @information; + my $index; + foreach my $seq (@serialseqs){ + if ($seq){ + ### FIXME This limitation that a serial must be given a title may not be very efficient for some library who do not update serials titles. + push @information, + { serialseq=>$seq, + publisheddate=>$publisheddates[$index], + planneddate=>$planneddates[$index], + notes=>$notes[$index], + status=>$status[$index] + } + } + $index++; + } + $template->param('information'=>\@information); +} my @subscriptions; if ($searched){ @subscriptions = GetSubscriptions( $title, $ISSN, $biblionumber ); -- 2.39.5