[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] koha/serials serials-edit.pl subscription-detai...
From: |
Henri-Damien LAURENT |
Subject: |
[Koha-cvs] koha/serials serials-edit.pl subscription-detai... |
Date: |
Mon, 16 Jul 2007 15:49:15 +0000 |
CVSROOT: /cvsroot/koha
Module name: koha
Changes by: Henri-Damien LAURENT <hdl> 07/07/16 15:49:15
Modified files:
serials : serials-edit.pl subscription-detail.pl
subscription-renew.pl
Log message:
Bug Fixing
Getting back to serials-collection when edit finished.
subscription-renew is done in a popup.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/serials/serials-edit.pl?cvsroot=koha&r1=1.9&r2=1.10
http://cvs.savannah.gnu.org/viewcvs/koha/serials/subscription-detail.pl?cvsroot=koha&r1=1.7&r2=1.8
http://cvs.savannah.gnu.org/viewcvs/koha/serials/subscription-renew.pl?cvsroot=koha&r1=1.11&r2=1.12
Patches:
Index: serials-edit.pl
===================================================================
RCS file: /cvsroot/koha/koha/serials/serials-edit.pl,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -b -r1.9 -r1.10
--- serials-edit.pl 30 Jun 2007 06:23:10 -0000 1.9
+++ serials-edit.pl 16 Jul 2007 15:49:14 -0000 1.10
@@ -17,7 +17,7 @@
# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
# Suite 330, Boston, MA 02111-1307 USA
-# $Id: serials-edit.pl,v 1.9 2007/06/30 06:23:10 hdl Exp $
+# $Id: serials-edit.pl,v 1.10 2007/07/16 15:49:14 hdl Exp $
=head1 NAME
@@ -121,6 +121,7 @@
my $data=GetSerialInformation($tmpserialid);
$data->{publisheddate}=format_date($data->{publisheddate});
$data->{planneddate}=format_date($data->{planneddate});
+ $data->{'editdisable'}=(HasSubscriptionExpired($data->{subscriptionid})&&
$data->{'status1'});
push @serialdatalist,$data;
}
my $bibdata=GetBiblioData($serialdatalist[0]->{'biblionumber'});
@@ -135,12 +136,14 @@
PrepareItemrecordDisplay( $serialdatalist[0]->{'biblionumber'} );
}
$cell->{'subscriptionid'}=$subscriptionid;
- $cell->{'subscriptionexpired'}=HasSubscriptionExpired($subscriptionid);
$cell->{'itemid'} = "NNEW";
$cell->{'serialid'} = "NEW";
$cell->{'issuesatonce'} = 1;
push @newserialloop,$cell;
- push @subscriptionloop, {'subscriptionid'=>$subscriptionid};
+ push @subscriptionloop, {'subscriptionid'=>$subscriptionid,
+ 'abouttoexpire'=>abouttoexpire($subscriptionid),
+
'subscriptionexpired'=>HasSubscriptionExpired($subscriptionid),
+ };
}
$template->param(newserialloop=>address@hidden);
$template->param(subscriptions=>address@hidden);
@@ -248,13 +251,18 @@
}
}
}
- ### 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);
+# ### 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);
+
+ my $redirect ="serials-collection.pl?";
+ my %hashsubscription;
+ map{$hashsubscription{$_}=1} @subscriptionids;
+ $redirect.=join("&",map{"subscriptionid=".$_} sort keys
%hashsubscription);
print $query->redirect("$redirect");
}
Index: subscription-detail.pl
===================================================================
RCS file: /cvsroot/koha/koha/serials/subscription-detail.pl,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -b -r1.7 -r1.8
--- subscription-detail.pl 24 Apr 2007 13:54:30 -0000 1.7
+++ subscription-detail.pl 16 Jul 2007 15:49:14 -0000 1.8
@@ -48,6 +48,7 @@
}
my $subs = &GetSubscription($subscriptionid);
+# use Data::Dumper; warn $subscriptionid; warn Dumper($subs);
my ($routing, @routinglist) = getroutinglist($subscriptionid);
my ($totalissues,@serialslist) = GetSerials($subscriptionid);
$totalissues-- if $totalissues; # the -1 is to have 0 if this is a new
subscription (only 1 issue)
Index: subscription-renew.pl
===================================================================
RCS file: /cvsroot/koha/koha/serials/subscription-renew.pl,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -b -r1.11 -r1.12
--- subscription-renew.pl 27 Jun 2007 14:55:46 -0000 1.11
+++ subscription-renew.pl 16 Jul 2007 15:49:15 -0000 1.12
@@ -18,7 +18,7 @@
# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
# Suite 330, Boston, MA 02111-1307 USA
-# $Id: subscription-renew.pl,v 1.11 2007/06/27 14:55:46 hdl Exp $
+# $Id: subscription-renew.pl,v 1.12 2007/07/16 15:49:15 hdl Exp $
=head1 NAME
@@ -60,6 +60,7 @@
my $query = new CGI;
my $dbh = C4::Context->dbh;
+my $mode = $query->param('mode');
my $op = $query->param('op');
my $subscriptionid = $query->param('subscriptionid');
my $done = 0; # for after form has been submitted
@@ -81,8 +82,6 @@
$query->param('weeklength'), $query->param('monthlength'),
$query->param('note')
);
- print
$query->redirect('/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid='.$subscriptionid);
- exit;
}
my $subscription = GetSubscription($subscriptionid);
@@ -98,7 +97,7 @@
subscriptionid => $subscriptionid,
bibliotitle => $subscription->{bibliotitle},
$op => 1,
- done => $done,
+ popup => ($query->param('mode')eq "popup"),
);
# Print the page
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] koha/serials serials-edit.pl subscription-detai...,
Henri-Damien LAURENT <=