[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] CVS: koha MARCdetail.pl,1.5,1.6 thesaurus_popup.pl,1.5,1.6
From: |
Paul POULAIN |
Subject: |
[Koha-cvs] CVS: koha MARCdetail.pl,1.5,1.6 thesaurus_popup.pl,1.5,1.6 |
Date: |
Tue, 12 Nov 2002 07:58:45 -0800 |
Update of /cvsroot/koha/koha
In directory usw-pr-cvs1:/tmp/cvs-serv9086
Modified Files:
MARCdetail.pl thesaurus_popup.pl
Log Message:
road to 1.3.2 :
* many bugfixes
* adding value_builder : you can map a subfield in the marc_subfield_structure
to a sub stored in "value_builder" directory. In this directory you can create
screen used to build values with any method. In this commit is a 1st draft of
the builder for 100$a unimarc french subfield, which is composed of 35 digits,
with 12 differents values (only the 4th first are provided for instance)
Index: MARCdetail.pl
===================================================================
RCS file: /cvsroot/koha/koha/MARCdetail.pl,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** MARCdetail.pl 22 Oct 2002 15:52:00 -0000 1.5
--- MARCdetail.pl 12 Nov 2002 15:58:43 -0000 1.6
***************
*** 60,63 ****
--- 60,64 ----
my $record =MARCgetbiblio($dbh,$bibid);
+ warn $record->as_formatted();
# open template
my $template = gettemplate("catalogue/MARCdetail.tmpl",0);
Index: thesaurus_popup.pl
===================================================================
RCS file: /cvsroot/koha/koha/thesaurus_popup.pl,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** thesaurus_popup.pl 13 Oct 2002 11:32:45 -0000 1.5
--- thesaurus_popup.pl 12 Nov 2002 15:58:43 -0000 1.6
***************
*** 2,6 ****
# written 10/5/2002 by Paul
! # build Subject field using bibliothesaurus table
--- 2,6 ----
# written 10/5/2002 by Paul
! # build result field using bibliothesaurus table
***************
*** 25,31 ****
use CGI;
use C4::Context;
use C4::Search;
! use C4::Circulation::Circ2;
use C4::Output;
# get all the data ....
--- 25,33 ----
use CGI;
use C4::Context;
+ use HTML::Template;
use C4::Search;
! #use C4::Circulation::Circ2;
use C4::Output;
+ #use C4::Biblio;
# get all the data ....
***************
*** 33,91 ****
my $input = new CGI;
! my $subject = $input->param('subject');
my $search_string= $input->param('search_string');
my $op = $input->param('op');
! my $freelib_text = $input->param('freelib_text');
my $dbh = C4::Context->dbh;
# make the page ...
! print $input->header;
if ($op eq "select") {
! $subject .= "|$freelib_text";
}
! print <<"EOF";
! <html>
! <head>
! <title>Subject builder</title>
! </head>
! <body>
! <form name="f_pop" action="thesaurus_popup.pl" method="post">
! <textarea name="subject" rows=10 cols=60>$subject </textarea></br>
! <p><input type="text" name="search_string" value="$search_string">
! <input type="hidden" name="op" value="search">
! <input type="submit" value="Search"></p>
! </form>
! EOF
# /search thesaurus terms starting by search_string
! if ($search_string) {
! print '<form name="f2_pop" action="thesaurus_popup.pl"
method="post">';
! print '<select name="freelib_text">';
! my $sti=$dbh->prepare("select freelib,stdlib from
bibliothesaurus where freelib like '".$search_string."%'");
! $sti->execute;
! while (my $line=$sti->fetchrow_hashref) {
! print "<option
value='$line->{'stdlib'}'>$line->{freelib}</option>";
! }
! print <<"EOF";
! </select>
! <input type="hidden" name="op" value="select">
! <input type="hidden" name="subject" value="$subject">
! <input type="submit" name="OK" value="OK">
! </form>
! EOF
}
! print <<"EOF";
! <form name="f3_pop" onSubmit="javascript:report()">
! <input type="submit" value="END">
! </form>
! <script>
! function report() {
! alert("REPORT");
! opener.document.f.subject.value=
document.f_pop.subject.value;
! self.close();
! return false;
! }
! </script>
! </body>
! </html>
! EOF
--- 35,87 ----
my $input = new CGI;
! my $result = $input->param('result');
my $search_string= $input->param('search_string');
my $op = $input->param('op');
! my $id = $input->param('id');
! my $category = $input->param('category');
! my $index= $input->param('index');
my $dbh = C4::Context->dbh;
# make the page ...
! #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;
! }
}
!
! my $template = gettemplate("thesaurus_popup.tmpl",0);
# /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'");
! $sti->execute;
! while (my $line=$sti->fetchrow_hashref) {
! $stdlib{$line->{'id'}} = "$line->{'freelib'}";
! push(@freelib,$line->{'id'});
}
! $select_list= CGI::scrolling_list( -name=>'id',
! -values=> address@hidden,
! -default=> "",
! -size=>1,
! -multiple=>0,
! -labels=> \%stdlib
! );
! }
! $template->param(select_list => $select_list,
! search_string => $search_string,
! result => $result,
! category => $category,
! index => $index
! );
! print "Content-Type: text/html\n\n", $template->output;
!
!
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] CVS: koha MARCdetail.pl,1.5,1.6 thesaurus_popup.pl,1.5,1.6,
Paul POULAIN <=