[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] CVS: koha thesaurus_popup.pl,1.11,1.12
From: |
Paul POULAIN |
Subject: |
[Koha-cvs] CVS: koha thesaurus_popup.pl,1.11,1.12 |
Date: |
Fri, 14 Nov 2003 14:01:15 -0800 |
Update of /cvsroot/koha/koha
In directory sc8-pr-cvs1:/tmp/cvs-serv26385
Modified Files:
thesaurus_popup.pl
Log Message:
minor fixes in thesaurus_popup & authorities.pm
NEW plugin : the plugin that manages 60X field in UNIMARC (i think it's the
same in marc21). Used to search a thesaurus entry & parse bibliothesaurus table
for category NC (Common Name in french).
The user can enter a search term, and see entries corresponding. If the search
is a real entry in the thesaurus, and this entry has dependencies, they are
shown too.
For example, if the thesaurus contains :
Geo -- Europe -- France -- Marseille
Geo -- Europe -- France -- Paris
Hist -- Europe -- France -- Revolution
A search on "France"
shows
Geo --Europe --France and Hist -- Europe -- France on the left panel
When the user clic on Geo -- Europe -- France,
Marseille & Paris are shown on the right panel.
When the user selects a value, it's reported to the MARC editor.
NOTE : template ONLY IN FRENCH (but it's 11PM for instance, & i plan to go to
bed :-) )
Index: thesaurus_popup.pl
===================================================================
RCS file: /cvsroot/koha/koha/thesaurus_popup.pl,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -r1.11 -r1.12
*** thesaurus_popup.pl 11 Apr 2003 15:09:03 -0000 1.11
--- thesaurus_popup.pl 14 Nov 2003 22:00:42 -0000 1.12
***************
*** 48,58 ****
#print $input->header;
if ($op eq "select") {
! my $sti = $dbh->prepare("select stdlib from bibliothesaurus where
id=?");
$sti->execute($id);
! my ($freelib_text) = $sti->fetchrow_array;
if (length($result)>0) {
! $result .= "|$freelib_text";
} else {
! $result = $freelib_text;
}
}
--- 48,58 ----
#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) {
! $result .= "|$father $freelib_text";
} else {
! $result = "$father $freelib_text";
}
}
***************
*** 75,82 ****
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 from bibliothesaurus where
match (category,freelib) AGAINST (?) and category ='$category'");
$sti->execute($search_string);
while (my $line=$sti->fetchrow_hashref) {
! $stdlib{$line->{'id'}} = "$line->{'freelib'}";
push(@freelib,$line->{'id'});
}
--- 75,82 ----
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 ='$category'");
$sti->execute($search_string);
while (my $line=$sti->fetchrow_hashref) {
! $stdlib{$line->{'id'}} = "$line->{'father'} $line->{'freelib'}";
push(@freelib,$line->{'id'});
}
***************
*** 89,94 ****
--- 89,107 ----
);
}
+ my $x = SearchDeeper('',$category,$search_string);
+ #my @son;
+ #foreach (my $value @$x) {
+ # warn address@hidden>{'stdlib'};
+ #}
+ my $dig_list= CGI::scrolling_list( -name=>'search_string',
+ -values=> address@hidden,
+ -default=> "",
+ -size=>1,
+ -multiple=>0,
+ );
+
$template->param(select_list => $select_list,
search_string => $search_string,
+ dig_list => $dig_list,
result => $result,
category => $category,
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] CVS: koha thesaurus_popup.pl,1.11,1.12,
Paul POULAIN <=