X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=blobdiff_plain;f=detail.pl;h=917444d6b7aa628f993433231171c038b822bdfb;hb=ab1294b661ee2fec8c896f123c7384206f713bd6;hp=1090d600a967057ae9517e4699d48533a01be42a;hpb=94858443301c7e15740c0d007b8abf341027c76f;p=koha_fer
diff --git a/detail.pl b/detail.pl
index 1090d600a9..917444d6b7 100755
--- a/detail.pl
+++ b/detail.pl
@@ -1,343 +1,104 @@
#!/usr/bin/perl
-
-#script to display detailed information
-#written 8/11/99
-
+# NOTE: Use standard 8-space tabs for this file (indents are 4 spaces)
+
+# Copyright 2000-2002 Katipo Communications
+#
+# This file is part of Koha.
+#
+# Koha is free software; you can redistribute it and/or modify it under the
+# terms of the GNU General Public License as published by the Free Software
+# Foundation; either version 2 of the License, or (at your option) any later
+# version.
+#
+# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+# A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along with
+# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
+# Suite 330, Boston, MA 02111-1307 USA
+
+use HTML::Template;
use strict;
-use C4::Search;
+require Exporter;
+use C4::Context;
+use C4::Output; # contains gettemplate
use CGI;
-use C4::Output;
-
-my $input = new CGI;
-my $type = $input->param('type');
-my $bib = $input->param('bib');
-my @items = &ItemInfo(undef, $bib, $type);
-my @temp = split('\t', $items[0]);
-my $count = @items;
-my $dat = &bibdata($bib);
-my ($websitecount, @websites) = &getwebsites($bib);
-my ($authorcount, $addauthor) = &addauthor($bib);
-my ($webbiblioitemcount, @webbiblioitems) = &getwebbiblioitems($bib);
-my $additional = $addauthor->[0]->{'author'};
-my $main;
-my $secondary;
-my $colour;
-
-
-if ($type eq '') {
- $type = 'opac';
-} # if
-
-# setup colours
-if ($type eq 'opac') {
- $main = '#99cccc';
- $secondary = '#efe5ef';
-} else {
- $main = '#cccc99';
- $secondary = '#ffffcc';
-} # else
-$colour = $secondary;
-
-for (my $i = 1; $i < $authorcount; $i++) {
- $additional .= "|" . $addauthor->[$i]->{'author'};
-} # for
-
-print $input->header;
-print startpage();
-print startmenu($type);
-
-if ($type ne 'opac'){
- print << "EOF";
-
-EOF
-} # if
-
-if ($type eq 'catmain'){
- print mkheadr(3,"Catalogue Maintenance");
-} # if
-
-if ($dat->{'author'} ne ''){
- print mkheadr(3,"$dat->{'title'} ($dat->{'author'}) $temp[4]");
-} else {
- print mkheadr(3,"$dat->{'title'} $temp[4]");
-} # if
-
-print << "EOF";
-
-EOF -} else { - print << "EOF"; - | -EOF -} # else +my $query=new CGI; +my $type=$query->param('type'); +($type) || ($type='intra'); -print << "EOF"; -BIBLIO RECORD -EOF +my $biblionumber=$query->param('bib'); -if ($type ne 'opac') { - print "$bib"; +# change back when ive fixed request.pl +my @items = ItemInfo(undef, $biblionumber, $type); +my $norequests = 1; +foreach my $itm (@items) { + $norequests = 0 unless $itm->{'notforloan'}; } -print << "EOF"; - | -
-EOF
-
-if ($type ne 'opac') {
- print << "EOF";
-
-EOF
-} # if
-
-print << "EOF";
- - -EOF -if ($type ne 'opac') { - print << "EOF"; -Subtitle: $dat->{'subtitle'} -Author: $dat->{'author'} -Additional Author: $additional -Series Title: $dat->{'seriestitle'} -Subject: $dat->{'subject'} -Copyright: $dat->{'copyrightdate'} -Notes: $dat->{'notes'} -Unititle: $dat->{'unititle'} -Analytical Author: -Analytical Title: -Serial: $dat->{'serial'} -Total Number of Items: $count -
-EOF
+my $dat=bibdata($biblionumber);
+my ($authorcount, $addauthor)= &addauthor($biblionumber);
+my ($webbiblioitemcount, @webbiblioitems) = &getwebbiblioitems($biblionumber);
+my ($websitecount, @websites) = &getwebsites($biblionumber);
-} else {
- if ($dat->{'subtitle'} ne ''){
- print "Subtitle: $dat->{'subtitle'} -EOF - -} # if - -print << "EOF"; - |
-
"; -print mktablehdr(); +$results[0]=$dat; -if ($type ne 'opac') { - print << "EOF"; -
HELP
-Update Biblio for all Items: Click on the Modify button [left] to amend the biblio. Any changes you make will update the record for all the items listed above.
-Updating the Biblio for only ONE or SOME Items: -EOF +my $resultsarray=\@results; +my $itemsarray=\@items; +my $webarray=\@webbiblioitems; +my $sitearray=\@websites; - if ($type eq 'catmain') { - print << "EOF"; -If some of the items listed above need a different biblio, -you need to click on the wrong item, then shift the group it belongs to, to the correct biblio. -You will need to know the correct biblio number -
-Abstract | -
$dat->{'abstract'} | -
Links to Associated Websites | -
Title: $websites[$i]->{'title'} -Description: $websites[$i]->{'description'} -URL: http://$websites[$i]->{'url'} - |
-
Abstract | -
$dat->{'abstract'} | -
Link to Associated Websites | -
Title: $websites[$i]->{'title'} -Description: $websites[$i]->{'description'} -URL: http://$websites[$i]->{'url'} - |
-