[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] koha cataloguing/addbiblio.pl cataloguing/addbo...
From: |
paul poulain |
Subject: |
[Koha-cvs] koha cataloguing/addbiblio.pl cataloguing/addbo... |
Date: |
Thu, 19 Jan 2006 12:48:00 +0000 |
CVSROOT: /cvsroot/koha
Module name: koha
Branch:
Changes by: paul poulain <address@hidden> 06/01/19 12:48:00
Modified files:
cataloguing : addbiblio.pl addbooks.pl additem.pl
Added files:
koha-tmpl/intranet-tmpl/prog/en/cataloguing: addbiblio.tmpl
addbooks.tmpl
additem.tmpl
Log message:
moving cataloguing scripts to a cataloguing directory (more logic than
acqui.simple !!!) & updating prog templates
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/koha/koha/cataloguing/addbiblio.pl.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/cataloguing/addbooks.pl.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/cataloguing/additem.pl.diff?tr1=1.1&tr2=1.2&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/koha/koha/koha-tmpl/intranet-tmpl/prog/en/cataloguing/addbiblio.tmpl?rev=1.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha/koha-tmpl/intranet-tmpl/prog/en/cataloguing/addbooks.tmpl?rev=1.1
http://cvs.savannah.gnu.org/viewcvs/koha/koha/koha-tmpl/intranet-tmpl/prog/en/cataloguing/additem.tmpl?rev=1.1
Patches:
Index: koha/cataloguing/addbiblio.pl
diff -u koha/cataloguing/addbiblio.pl:1.1 koha/cataloguing/addbiblio.pl:1.2
--- koha/cataloguing/addbiblio.pl:1.1 Tue Jan 17 16:40:54 2006
+++ koha/cataloguing/addbiblio.pl Thu Jan 19 12:48:00 2006
@@ -1,6 +1,6 @@
#!/usr/bin/perl
-# $Id: addbiblio.pl,v 1.1 2006/01/17 16:40:54 tipaul Exp $
+# $Id: addbiblio.pl,v 1.2 2006/01/19 12:48:00 tipaul Exp $
# Copyright 2000-2002 Katipo Communications
#
@@ -179,7 +179,7 @@
$subfield_data{marc_value}= build_authorized_values_list($tag,
$subfield, $value, $dbh,$authorised_values_sth);
# it's a thesaurus / authority field
} elsif ($tagslib->{$tag}->{$subfield}->{authtypecode}) {
- $subfield_data{marc_value}="<input type=\"text\"
name=\"field_value\" value=\"$value\" size=\"67\" maxlength=\"255\" DISABLE
READONLY> <a
href=\"javascript:Dopop('../authorities/auth_finder.pl?authtypecode=".$tagslib->{$tag}->{$subfield}->{authtypecode}."&index=$i',$i)\">...</a>";
+ $subfield_data{marc_value}="<input type=\"text\"
name=\"field_value\" value=\"$value\" size=\"67\" maxlength=\"255\" DISABLE
READONLY /> <a
href=\"javascript:Dopop('../authorities/auth_finder.pl?authtypecode=".$tagslib->{$tag}->{$subfield}->{authtypecode}."&index=$i',$i)\">...</a>";
# it's a plugin field
} elsif ($tagslib->{$tag}->{$subfield}->{'value_builder'}) {
# opening plugin. Just check wether we are on a developper
computer on a production one
@@ -192,18 +192,18 @@
require $plugin;
my $extended_param =
plugin_parameters($dbh,$rec,$tagslib,$i,$tabloop);
my ($function_name,$javascript) =
plugin_javascript($dbh,$rec,$tagslib,$i,$tabloop);
- $subfield_data{marc_value}="<input type=\"text\"
name=\"field_value\" value=\"$value\" size=\"67\" maxlength=\"255\"
OnFocus=\"javascript:Focus$function_name($i)\"
OnBlur=\"javascript:Blur$function_name($i)\"> <a
href=\"javascript:Clic$function_name($i)\">...</a> $javascript";
+ $subfield_data{marc_value}="<input type=\"text\"
name=\"field_value\" value=\"$value\" size=\"67\" maxlength=\"255\"
OnFocus=\"javascript:Focus$function_name($i)\"
OnBlur=\"javascript:Blur$function_name($i)\" /> <a
href=\"javascript:Clic$function_name($i)\">...</a> $javascript";
# it's an hidden field
} elsif ($tag eq '') {
- $subfield_data{marc_value}="<input type=\"hidden\"
name=\"field_value\" value=\"$value\">";
+ $subfield_data{marc_value}="<input type=\"hidden\"
name=\"field_value\" value=\"$value\" />";
} elsif ($tagslib->{$tag}->{$subfield}->{'hidden'}) {
- $subfield_data{marc_value}="<input type=\"text\"
name=\"field_value\" value=\"$value\" size=\"70\" maxlength=\"255\" DISABLE
READONLY>";
+ $subfield_data{marc_value}="<input type=\"text\"
name=\"field_value\" value=\"$value\" size=\"70\" maxlength=\"255\" DISABLE
READONLY />";
# it's a standard field
} else {
if (length($value) >100) {
$subfield_data{marc_value}="<textarea
name=\"field_value\" cols=\"70\" rows=\"5\" >$value</textarea>";
} else {
- $subfield_data{marc_value}="<input type=\"text\"
name=\"field_value\" value=\"$value\" size=\"70\">"; #"
+ $subfield_data{marc_value}="<input type=\"text\"
name=\"field_value\" value=\"$value\" size=\"70\" />"; #"
}
}
return \%subfield_data;
@@ -360,7 +360,7 @@
$frameworkcode = &MARCfind_frameworkcode($dbh,$biblionumber) if ($biblionumber
and not ($frameworkcode));
$frameworkcode='' if ($frameworkcode eq 'Default');
my ($template, $loggedinuser, $cookie)
- = get_template_and_user({template_name => "acqui.simple/addbiblio.tmpl",
+ = get_template_and_user({template_name => "cataloguing/addbiblio.tmpl",
query => $input,
type => "intranet",
authnotrequired => 0,
Index: koha/cataloguing/addbooks.pl
diff -u koha/cataloguing/addbooks.pl:1.1 koha/cataloguing/addbooks.pl:1.2
--- koha/cataloguing/addbooks.pl:1.1 Tue Jan 17 16:40:54 2006
+++ koha/cataloguing/addbooks.pl Thu Jan 19 12:48:00 2006
@@ -1,6 +1,6 @@
#!/usr/bin/perl
-# $Id: addbooks.pl,v 1.1 2006/01/17 16:40:54 tipaul Exp $
+# $Id: addbooks.pl,v 1.2 2006/01/19 12:48:00 tipaul Exp $
#
# Modified address@hidden 12:00 01 April 2001
@@ -48,7 +48,7 @@
my $success = $query->param('biblioitem');
my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
{
- template_name => "acqui.simple/addbooks.tmpl",
+ template_name => "cataloguing/addbooks.tmpl",
query => $query,
type => "intranet",
authnotrequired => 0,
Index: koha/cataloguing/additem.pl
diff -u koha/cataloguing/additem.pl:1.1 koha/cataloguing/additem.pl:1.2
--- koha/cataloguing/additem.pl:1.1 Tue Jan 17 16:40:54 2006
+++ koha/cataloguing/additem.pl Thu Jan 19 12:48:00 2006
@@ -1,6 +1,6 @@
#!/usr/bin/perl
-# $Id: additem.pl,v 1.1 2006/01/17 16:40:54 tipaul Exp $
+# $Id: additem.pl,v 1.2 2006/01/19 12:48:00 tipaul Exp $
# Copyright 2000-2002 Katipo Communications
#
@@ -58,7 +58,7 @@
my $itemtype = &MARCfind_frameworkcode($dbh,$biblionumber);
my $tagslib = &MARCgettagslib($dbh,1,$itemtype);
-my $record = MARCgetbiblio($dbh,$bibid);
+my $record = MARCgetbiblio($dbh,$biblionumber);
# warn "==>".$record->as_formatted;
my $oldrecord = MARCmarc2koha($dbh,$record);
my $itemrecord;
@@ -95,11 +95,11 @@
}
}
# check for item barcode # being unique
- my $addedolditem = MARCmarc2koha($dbh,$addeditem);
+ my $addedolditem = MARCmarc2koha($dbh,$record);
my $exists = get_item_from_barcode($addedolditem->{'barcode'});
push @errors,"barcode_not_unique" if($exists);
# if barcode exists, don't create, but report The problem.
- $itemnumber =
NEWnewitem($dbh,$addeditem,$biblionumber,$biblioitemnumber) unless ($exists);
+ $itemnumber =
NEWnewitem($dbh,$addedolditem,$biblionumber,$biblioitemnumber) unless ($exists);
$nextop = "additem";
#------------------------------------------------------------------------------------------------------------------------------
} elsif ($op eq "edititem") {
@@ -123,7 +123,7 @@
# build indicator hash.
my @ind_tag = $input->param('ind_tag');
my @indicator = $input->param('indicator');
-# my $itemnum = $input->param('itemnum');
+# my $itemnumber = $input->param('itemnumber');
my %indicators;
for (my $i=0;$i<=$#ind_tag;$i++) {
$indicators{$ind_tag[$i]} = $indicator[$i];
@@ -131,8 +131,8 @@
my $itemrecord =
MARChtml2marc($dbh,address@hidden,address@hidden,address@hidden,%indicators);
# MARC::Record builded => now, record in DB
# warn "R: ".$record->as_formatted;
- my ($oldbiblionumber,$oldbibnum,$oldbibitemnum) =
NEWmoditem($dbh,$record,$bibid,$itemnum,0);
- $itemnum="";
+ my ($oldbiblionumber,$oldbibnum,$oldbibitemnum) =
NEWmoditem($dbh,$record,$biblionumber,$itemnumber,0);
+ $itemnumber="";
$nextop="additem";
}
@@ -141,7 +141,7 @@
# build screen with existing items. and "new" one
#------------------------------------------------------------------------------------------------------------------------------
my ($template, $loggedinuser, $cookie)
- = get_template_and_user({template_name => "acqui.simple/additem.tmpl",
+ = get_template_and_user({template_name => "cataloguing/additem.tmpl",
query => $input,
type => "intranet",
authnotrequired => 0,
@@ -152,7 +152,7 @@
my %indicators;
$indicators{995}=' ';
# now, build existiing item list
-my $temp = MARCgetbiblio($dbh,$bibid);
+my $temp = MARCgetbiblio($dbh,$biblionumber);
my @fields = $temp->fields();
#my @fields = $record->fields();
my %witness; #---- stores the list of subfields used at least once, with the
"meaning" of the code
@@ -237,7 +237,7 @@
my $test = (C4::Context->preference("IndependantBranches")) &&
($tag eq $branchtagfield) && ($subfield
eq $branchtagsubfield) &&
(C4::Context->userenv->{flags} != 1) &&
($value) && ($value ne C4::Context->userenv->{branch}) ;
-# print $input->redirect(".pl?bibid=$bibid") if ($test);
+# print $input->redirect(".pl?biblionumber=$biblionumber") if
($test);
# search for itemcallnumber if applicable
if ($tagslib->{$tag}->{$subfield}->{kohafield} eq
'items.itemcallnumber' && C4::Context->preference('itemcallnumber')) {
my $CNtag =
substr(C4::Context->preference('itemcallnumber'),0,3);
@@ -316,8 +316,7 @@
# what's the next op ? it's what we are not in : an add if we're editing,
otherwise, and edit.
$template->param(item_loop => address@hidden,
item_header_loop =>
address@hidden,
- bibid => $bibid,
- biblionumber =>$oldbiblionumber,
+ biblionumber => $biblionumber,
title => $oldrecord->{title},
author => $oldrecord->{author},
item => address@hidden,
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] koha cataloguing/addbiblio.pl cataloguing/addbo...,
paul poulain <=