From 3dfb2455908377e7bef5db270e7911f8ea47c39e Mon Sep 17 00:00:00 2001 From: tipaul Date: Tue, 17 Jan 2006 16:40:54 +0000 Subject: [PATCH] moving acqui.simple directory to cataloguing, as acqui.simple contains cataloguing scripts... --- .../addbiblio-nomarc.pl | 3 + {acqui.simple => cataloguing}/addbiblio.pl | 0 {acqui.simple => cataloguing}/addbooks.pl | 0 .../additem-nomarc.pl | 3 + {acqui.simple => cataloguing}/additem.pl | 0 {acqui.simple => cataloguing}/isbnsearch.pl | 0 .../keywordsearch.pl | 0 {acqui.simple => cataloguing}/savebiblio.pl | 0 {acqui.simple => cataloguing}/saveitem.pl | 0 cataloguing/thesaurus_popup.pl | 126 ++++++++++++++++++ .../websitesearch.pl | 0 11 files changed, 132 insertions(+) rename {acqui.simple => cataloguing}/addbiblio-nomarc.pl (92%) rename {acqui.simple => cataloguing}/addbiblio.pl (100%) rename {acqui.simple => cataloguing}/addbooks.pl (100%) rename {acqui.simple => cataloguing}/additem-nomarc.pl (97%) rename {acqui.simple => cataloguing}/additem.pl (100%) rename {acqui.simple => cataloguing}/isbnsearch.pl (100%) rename {acqui.simple => cataloguing}/keywordsearch.pl (100%) rename {acqui.simple => cataloguing}/savebiblio.pl (100%) rename {acqui.simple => cataloguing}/saveitem.pl (100%) create mode 100755 cataloguing/thesaurus_popup.pl rename {acqui.simple => cataloguing}/websitesearch.pl (100%) diff --git a/acqui.simple/addbiblio-nomarc.pl b/cataloguing/addbiblio-nomarc.pl similarity index 92% rename from acqui.simple/addbiblio-nomarc.pl rename to cataloguing/addbiblio-nomarc.pl index 7859a60b5c..58787fe491 100755 --- a/acqui.simple/addbiblio-nomarc.pl +++ b/cataloguing/addbiblio-nomarc.pl @@ -26,6 +26,9 @@ # Suite 330, Boston, MA 02111-1307 USA # $Log$ +# Revision 1.1 2006/01/17 16:40:54 tipaul +# moving acqui.simple directory to cataloguing, as acqui.simple contains cataloguing scripts... +# # Revision 1.3 2005/05/04 08:45:22 tipaul # synch'ing 2.2 and head # diff --git a/acqui.simple/addbiblio.pl b/cataloguing/addbiblio.pl similarity index 100% rename from acqui.simple/addbiblio.pl rename to cataloguing/addbiblio.pl diff --git a/acqui.simple/addbooks.pl b/cataloguing/addbooks.pl similarity index 100% rename from acqui.simple/addbooks.pl rename to cataloguing/addbooks.pl diff --git a/acqui.simple/additem-nomarc.pl b/cataloguing/additem-nomarc.pl similarity index 97% rename from acqui.simple/additem-nomarc.pl rename to cataloguing/additem-nomarc.pl index 867e3410a8..d54123b920 100755 --- a/acqui.simple/additem-nomarc.pl +++ b/cataloguing/additem-nomarc.pl @@ -20,6 +20,9 @@ # Suite 330, Boston, MA 02111-1307 USA # $Log$ +# Revision 1.1 2006/01/17 16:40:54 tipaul +# moving acqui.simple directory to cataloguing, as acqui.simple contains cataloguing scripts... +# # Revision 1.8 2005/10/26 09:11:34 tipaul # big commit, still breaking things... # diff --git a/acqui.simple/additem.pl b/cataloguing/additem.pl similarity index 100% rename from acqui.simple/additem.pl rename to cataloguing/additem.pl diff --git a/acqui.simple/isbnsearch.pl b/cataloguing/isbnsearch.pl similarity index 100% rename from acqui.simple/isbnsearch.pl rename to cataloguing/isbnsearch.pl diff --git a/acqui.simple/keywordsearch.pl b/cataloguing/keywordsearch.pl similarity index 100% rename from acqui.simple/keywordsearch.pl rename to cataloguing/keywordsearch.pl diff --git a/acqui.simple/savebiblio.pl b/cataloguing/savebiblio.pl similarity index 100% rename from acqui.simple/savebiblio.pl rename to cataloguing/savebiblio.pl diff --git a/acqui.simple/saveitem.pl b/cataloguing/saveitem.pl similarity index 100% rename from acqui.simple/saveitem.pl rename to cataloguing/saveitem.pl diff --git a/cataloguing/thesaurus_popup.pl b/cataloguing/thesaurus_popup.pl new file mode 100755 index 0000000000..62518ba37d --- /dev/null +++ b/cataloguing/thesaurus_popup.pl @@ -0,0 +1,126 @@ +#!/usr/bin/perl + +# written 10/5/2002 by Paul +# build result field using bibliothesaurus table + + +# 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::Auth; +use CGI; +use C4::Context; +use HTML::Template; +use C4::Search; +use C4::Output; +use C4::Authorities; +use C4::Interface::CGI::Output; +# get all the data .... +my %env; + +my $input = new CGI; +my $result = $input->param('result'); +my $search_string= $input->param('search_string'); +$search_string = $result unless ($search_string); +my $op = $input->param('op'); +my $id = $input->param('id'); +my $category = $input->param('category'); +my $index= $input->param('index'); +my $insert = $input->param('insert'); +my $nohierarchy = $input->param('nohierarchy'); # if 1, just show the last part of entry (Marseille). If 0, show everything (Europe -- France --Marseille) +my $dbh = C4::Context->dbh; + +# make the page ... +#print $input->header; +if ($op eq "select") { + my $sti = $dbh->prepare("select father,stdlib from bibliothesaurus where id=?"); + $sti->execute($id); + my ($father,$freelib_text) = $sti->fetchrow_array; + if (length($result)>0) { + if ($nohierarchy) { + $result .= "|$freelib_text"; + } else { + $result .= "|$father $freelib_text"; + } + } else { + if ($nohierarchy) { + $result = "$freelib_text"; + } else { + $result = "$father $freelib_text"; + } + } +} +if ($op eq "add") { + newauthority($dbh,$category,$insert,$insert,'',1,''); + $search_string=$insert; +} +my ($template, $loggedinuser, $cookie) + = get_template_and_user({template_name => "thesaurus_popup.tmpl", + query => $input, + type => "intranet", + authnotrequired => 0, + flagsrequired => {parameters => 1}, + debug => 1, + }); +# /search thesaurus terms starting by search_string +my @freelib; +my %stdlib; +my $select_list; +if ($search_string) { +# my $sti=$dbh->prepare("select id,freelib from bibliothesaurus where freelib like '".$search_string."%' and category ='$category'"); + my $sti=$dbh->prepare("select id,freelib,father from bibliothesaurus where match (category,freelib) AGAINST (?) and category =?"); + $sti->execute($search_string,$category); + while (my $line=$sti->fetchrow_hashref) { + if ($nohierarchy) { + $stdlib{$line->{'id'}} = "$line->{'freelib'}"; + } else { + $stdlib{$line->{'id'}} = "$line->{'father'} $line->{'freelib'}"; + } + push(@freelib,$line->{'id'}); + } + $select_list= CGI::scrolling_list( -name=>'id', + -values=> \@freelib, + -default=> "", + -size=>1, + -multiple=>0, + -labels=> \%stdlib + ); +} +my @x = SearchDeeper('',$category,$search_string); +#my @son; +#foreach (my $value @$x) { +# warn \@$x[$value]->{'stdlib'}; +#} +my $dig_list= CGI::scrolling_list( -name=>'search_string', + -values=> \@x, + -default=> "", + -size=>1, + -multiple=>0, + ); + +$template->param(select_list => $select_list, + search_string => $search_string, + dig_list => $dig_list, + result => $result, + category => $category, + index => $index, + nohierarchy => $nohierarchy, + ); +output_html_with_http_headers $input, $cookie, $template->output; + + diff --git a/acqui.simple/websitesearch.pl b/cataloguing/websitesearch.pl similarity index 100% rename from acqui.simple/websitesearch.pl rename to cataloguing/websitesearch.pl -- 2.20.1