(added) Ancillary files for new installer.
[koha.git] / modbib.pl
index 1baf558..7a63e28 100755 (executable)
--- a/modbib.pl
+++ b/modbib.pl
@@ -1,9 +1,29 @@
 #!/usr/bin/perl
 
+# $Id$
+
 #script to modify/delete biblios
 #written 8/11/99
 # modified 11/11/99 by chris@katipo.co.nz
 
+
+# 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 strict;
 
 use C4::Search;
@@ -12,17 +32,15 @@ use C4::Output;
 
 my $input = new CGI;
 
-my $submit = $input->param('submit.x');
-my $bibnum = $input->param('bibnum');
-my $data   = &bibdata($bibnum);
+my $bibnum=$input->param('bibnum');
+my $data=&bibdata($bibnum);
 my ($subjectcount, $subject)     = &subject($data->{'biblionumber'});
 my ($subtitlecount, $subtitle)   = &subtitle($data->{'biblionumber'});
 my ($addauthorcount, $addauthor) = &addauthor($data->{'biblionumber'});
 my $sub        = $subject->[0]->{'subject'};
 my $additional = $addauthor->[0]->{'author'};
-my %inputs;
 my $dewey;
-
+my $submit=$input->param('submit.x');
 if ($submit eq '') {
   print $input->redirect("/cgi-bin/koha/delbiblio.pl?biblio=$bibnum");
 } # if
@@ -31,17 +49,12 @@ print $input->header;
 # my ($analytictitle)  = &analytic($biblionumber,'t');
 # my ($analyticauthor) = &analytic($biblionumber,'a');
 print startpage();
-print startmenu();
+print startmenu('catalogue');
 
 # have to get all subtitles, subjects and additional authors
-for (my $i = 1; $i < $subjectcount; $i++) {
-  $sub = $sub . "|" . $subject->[$i]->{'subject'};
-} # for
-
-for (my $i = 1; $i < $addauthorcount; $i++) {
-  $additional = $additional . "|" . $addauthor->[$i]->{'author'};
-} # for
+$sub = join("|", map { $_->{'subject'} } @{$subject});
 
+$additional = join("|", map { $_->{'author'} } @{$addauthor});
 
 $dewey = $data->{'dewey'};
 $dewey =~ s/0+$//;
@@ -63,7 +76,7 @@ $data->{'title'} = &tidyhtml($data->{'title'});
 
 print << "EOF";
 <a href="modwebsites.pl?biblionumber=$data->{'biblionumber'}">Modify Website Links</a>
-<form action="updatebiblio.pl" method="post">
+<form action="updatebiblio.pl" method="post" name="f">
 <input type="hidden" name="biblionumber" value="$data->{'biblionumber'}">
 <input type="hidden" name="biblioitemnumber" value="$data=>{'biblioitemnumber'}">
 <table border="0" cellspacing="0" cellpadding="5">
@@ -81,7 +94,9 @@ print << "EOF";
 </tr>
 <tr valign="top">
 <td>Subject</td>
-<td><textarea name="subject" cols="40" rows="4">$sub</textarea></td>
+<td><textarea name="subject" cols="40" rows="4">$sub</textarea>
+<a href="javascript:Dopop()">...</a>
+</td>
 </tr>
 <tr valign="top">
 <td>Copyright Date</td>
@@ -123,6 +138,11 @@ print << "EOF";
 <br>
 <input type="submit" name="submit" value="Save Changes">
 </form>
+<script>
+function Dopop() {
+        newin=window.open("thesaurus_popup.pl?subject="+document.f.subject.value,"thesaurus",'width=500,height=400,toolbar=false,scrollbars=yes');
+}
+</script>
 EOF
 
 print endmenu();