From dda34020b9fc1517924069047e2d2a43a69a753c Mon Sep 17 00:00:00 2001 From: tonnesen Date: Wed, 23 Oct 2002 20:27:51 +0000 Subject: [PATCH] Fixed seriestitle bug in detail templates. Fixed bug in circulation module when there was only one branch/printer or when the cookie was set to a non-existent branch/printer --- circ/branchtransfers.pl | 3 +++ circ/circulation.pl | 5 +++++ circ/returns.pl | 3 +++ circ/selectbranchprinter.pl | 6 ++++++ .../intranet-tmpl/default/en/catalogue/detail-opac.tmpl | 2 +- koha-tmpl/intranet-tmpl/default/en/catalogue/detail.tmpl | 2 +- koha-tmpl/opac-tmpl/default/en/opac-detail.tmpl | 1 + 7 files changed, 20 insertions(+), 2 deletions(-) diff --git a/circ/branchtransfers.pl b/circ/branchtransfers.pl index 2e3397da04..70990a00e0 100755 --- a/circ/branchtransfers.pl +++ b/circ/branchtransfers.pl @@ -57,6 +57,9 @@ my $printer = $query->param("printer"); ($branch) || ($branch=$query->cookie('branch')) ; ($printer) || ($printer=$query->cookie('printer')) ; +($branches->{$branch}) || ($branch=(keys %$branches)[0]); +($printers->{$printer}) || ($printer=(keys %$printers)[0]); + my $request=$query->param('request'); diff --git a/circ/circulation.pl b/circ/circulation.pl index a468ee48d5..a4bab247d8 100755 --- a/circ/circulation.pl +++ b/circ/circulation.pl @@ -53,6 +53,11 @@ my $printer = $query->param("printer"); ($branch) || ($branch=$query->cookie('branch')) ; ($printer) || ($printer=$query->cookie('printer')) ; +($branches->{$branch}) || ($branch=(keys %$branches)[0]); +($printers->{$printer}) || ($printer=(keys %$printers)[0]); + + + #set up cookie..... my $info = ''; my $branchcookie; diff --git a/circ/returns.pl b/circ/returns.pl index d6cf8e3eaa..3339ba01da 100755 --- a/circ/returns.pl +++ b/circ/returns.pl @@ -49,6 +49,9 @@ my $printer = $query->param("printer"); ($branch) || ($branch=$query->cookie('branch')) ; ($printer) || ($printer=$query->cookie('printer')) ; +($branches->{$branch}) || ($branch=(keys %$branches)[0]); +($printers->{$printer}) || ($printer=(keys %$printers)[0]); + # # Some code to handle the error if there is no branch or printer setting..... diff --git a/circ/selectbranchprinter.pl b/circ/selectbranchprinter.pl index 83a980403f..3d06df78ba 100644 --- a/circ/selectbranchprinter.pl +++ b/circ/selectbranchprinter.pl @@ -49,6 +49,10 @@ my $printer=$query->param('printer'); ($branch) || ($branch=$query->cookie('branch')); ($printer) || ($printer=$query->cookie('printer')); +($branches->{$branch}) || ($branch=(keys %$branches)[0]); +($printers->{$printer}) || ($printer=(keys %$printers)[0]); + + # is you force a selection.... my $oldbranch = $branch; my $oldprinter = $printer; @@ -99,6 +103,7 @@ if ($printercount>1) { EOF } else { my ($printer) = keys %$printers; + $printerform.="Printer: ".$printers->{$printer}->{printername}; } if ($branchcount>1) { @@ -107,6 +112,7 @@ if ($branchcount>1) { EOF } else { my ($branch) = keys %$branches; + $branchform.= "Branch: ".$branches->{$branch}->{branchname}; } diff --git a/koha-tmpl/intranet-tmpl/default/en/catalogue/detail-opac.tmpl b/koha-tmpl/intranet-tmpl/default/en/catalogue/detail-opac.tmpl index f47ca05a57..8ad1c28b4c 100644 --- a/koha-tmpl/intranet-tmpl/default/en/catalogue/detail-opac.tmpl +++ b/koha-tmpl/intranet-tmpl/default/en/catalogue/detail-opac.tmpl @@ -28,7 +28,7 @@ Subtitle:
Author:
Additional Author:
-Series Title:
+Series Title:
Subject:
Copyright:
Notes:
diff --git a/koha-tmpl/intranet-tmpl/default/en/catalogue/detail.tmpl b/koha-tmpl/intranet-tmpl/default/en/catalogue/detail.tmpl index 19091e41de..fb044328e8 100644 --- a/koha-tmpl/intranet-tmpl/default/en/catalogue/detail.tmpl +++ b/koha-tmpl/intranet-tmpl/default/en/catalogue/detail.tmpl @@ -49,7 +49,7 @@ border="0" src="/images/delete-mem.gif"> Author: >
Additional Author:
-Series Title:
+Series Title:
Subject:
Copyright:
Notes:
diff --git a/koha-tmpl/opac-tmpl/default/en/opac-detail.tmpl b/koha-tmpl/opac-tmpl/default/en/opac-detail.tmpl index 4daf839f30..02d5afcf2d 100644 --- a/koha-tmpl/opac-tmpl/default/en/opac-detail.tmpl +++ b/koha-tmpl/opac-tmpl/default/en/opac-detail.tmpl @@ -30,6 +30,7 @@ Subtitle:
+Series Title:
Author:
Subject:
Copyright:
-- 2.39.5