# as the old-style API and the NEW one are the only public functions.
#
@EXPORT = qw(
- &updateBiblio &updateBiblioItem &updateItem
- &itemcount &newbiblio &newbiblioitem
- &modnote &newsubject &newsubtitle
- &modbiblio &checkitems
- &newitems &modbibitem
- &modsubtitle &modsubject &modaddauthor &moditem &countitems
- &delitem &deletebiblioitem &delbiblio
- &getbiblio
- &getbiblioitembybiblionumber
- &getbiblioitem &getitemsbybiblioitem
- &skip
- &newcompletebiblioitem
-
- &MARCfind_oldbiblionumber_from_MARCbibid
- &MARCfind_MARCbibid_from_oldbiblionumber
- &MARCfind_marc_from_kohafield
- &MARCfindsubfield
- &MARCgettagslib
-
- &NEWnewbiblio &NEWnewitem
- &NEWmodbiblio &NEWmoditem
- &NEWdelbiblio &NEWdelitem
-
- &MARCaddbiblio &MARCadditem
- &MARCmodsubfield &MARCaddsubfield
- &MARCmodbiblio &MARCmoditem
- &MARCkoha2marcBiblio &MARCmarc2koha
- &MARCkoha2marcItem &MARChtml2marc
- &MARCgetbiblio &MARCgetitem
- &MARCaddword &MARCdelword
- &char_decode
+ &updateBiblio &updateBiblioItem &updateItem
+ &itemcount &newbiblio &newbiblioitem
+ &modnote &newsubject &newsubtitle
+ &modbiblio &checkitems
+ &newitems &modbibitem
+ &modsubtitle &modsubject &modaddauthor &moditem &countitems
+ &delitem &deletebiblioitem &delbiblio
+ &getbiblio
+ &getbiblioitembybiblionumber
+ &getbiblioitem &getitemsbybiblioitem
+ &skip
+ &newcompletebiblioitem
+
+ &MARCfind_oldbiblionumber_from_MARCbibid
+ &MARCfind_MARCbibid_from_oldbiblionumber
+ &MARCfind_marc_from_kohafield
+ &MARCfindsubfield
+ &MARCfind_itemtype
+ &MARCgettagslib
+
+ &NEWnewbiblio &NEWnewitem
+ &NEWmodbiblio &NEWmoditem
+ &NEWdelbiblio &NEWdelitem
+
+ &MARCaddbiblio &MARCadditem
+ &MARCmodsubfield &MARCaddsubfield
+ &MARCmodbiblio &MARCmoditem
+ &MARCkoha2marcBiblio &MARCmarc2koha
+ &MARCkoha2marcItem &MARChtml2marc
+ &MARCgetbiblio &MARCgetitem
+ &MARCaddword &MARCdelword
+ &char_decode
);
#
=over 4
-=item @tagslib = &MARCgettagslib($dbh,1|0);
+=item @tagslib = &MARCgettagslib($dbh,1|0,$itemtype);
last param is 1 for liblibrarian and 0 for libopac
+$itemtype contains the itemtype framework reference. If empty or does not exist, the default one is used
returns a hash with tag/subfield meaning
=item ($tagfield,$tagsubfield) = &MARCfind_marc_from_kohafield($dbh,$kohafield);
=cut
sub MARCgettagslib {
- my ($dbh,$forlibrarian)= @_;
+ my ($dbh,$forlibrarian,$itemtype)= @_;
+ $itemtype="" unless $itemtype;
my $sth;
my $libfield = ($forlibrarian eq 1)? 'liblibrarian' : 'libopac';
- $sth=$dbh->prepare("select tagfield,$libfield as lib,mandatory from marc_tag_structure order by tagfield");
- $sth->execute;
+ # check that itemtype framework exists
+ $sth=$dbh->prepare("select count(*) from marc_tag_structure where itemtype=? order by ?");
+ $sth->execute($itemtype,$itemtype);
+ my ($total) = $sth->fetchrow;
+ $itemtype="" unless ($total >0);
+ $sth=$dbh->prepare("select tagfield,$libfield as lib,mandatory from marc_tag_structure where itemtype=? order by tagfield");
+ $sth->execute($itemtype);
my ($lib,$tag,$res,$tab,$mandatory,$repeatable);
while ( ($tag,$lib,$mandatory) = $sth->fetchrow) {
$res->{$tag}->{lib}=$lib;
$res->{$tag}->{mandatory}=$mandatory;
}
- $sth=$dbh->prepare("select tagfield,tagsubfield,$libfield as lib,tab, mandatory, repeatable,authorised_value,thesaurus_category,value_builder,kohafield,seealso from marc_subfield_structure order by tagfield,tagsubfield");
- $sth->execute;
+ $sth=$dbh->prepare("select tagfield,tagsubfield,$libfield as lib,tab, mandatory, repeatable,authorised_value,thesaurus_category,value_builder,kohafield,seealso from marc_subfield_structure where itemtype=? order by tagfield,tagsubfield");
+ $sth->execute($itemtype);
my $subfield;
my $authorised_value;
return $res;
}
+sub MARCfind_itemtype {
+ my ($dbh,$bibid) = @_;
+ my ($tagfield,$tagsubfield) = MARCfind_marc_from_kohafield($dbh,"biblioitems.itemtype");
+ my $sth = $dbh->prepare("select subfieldvalue from marc_subfield_table where bibid=? and tag=? and subfieldcode=?");
+ $sth->execute($bibid,$tagfield,$tagsubfield);
+ my ($subfieldvalue) = $sth->fetchrow;
+ return $subfieldvalue;
+}
sub MARCdelsubfield {
# delete a subfield for $bibid / tag / tagorder / subfield / subfieldorder
my ($dbh,$bibid,$tag,$tagorder,$subfield,$subfieldorder) = @_;
# $Id$
# $Log$
+# Revision 1.88 2004/05/18 15:23:49 tipaul
+# framework management : 1 MARC framework for each itemtype
+#
# Revision 1.87 2004/05/18 11:54:07 tipaul
# getitemtypes moved in Koha.pm
#
# returns a reference to a hash of references to branches...
my %branches;
my $dbh = C4::Context->dbh;
- my $sth=$dbh->prepare("select * from branches");
+ my $sth=$dbh->prepare("select * from branches order by branchname");
$sth->execute;
while (my $branch=$sth->fetchrow_hashref) {
my $nsth = $dbh->prepare("select categorycode from branchrelations where branchcode = ?");
# returns a reference to a hash of references to branches...
my %itemtypes;
my $dbh = C4::Context->dbh;
- my $sth=$dbh->prepare("select * from itemtypes");
+ my $sth=$dbh->prepare("select * from itemtypes order by description");
$sth->execute;
while (my $IT=$sth->fetchrow_hashref) {
$itemtypes{$IT->{'itemtype'}}=$IT;
use vars qw( $authorised_values_sth);
use vars qw( $is_a_modif );
+my $itemtype; # created here because it can be used in build_authorized_values_list sub
+
=item find_value
($indicators, $value) = find_value($tag, $subfield, $record,$encoding);
=cut
sub build_authorized_values_list ($$$$$) {
- my($tag, $subfield, $value, $dbh,$authorised_values_sth) = @_;
+ my($tag, $subfield, $value, $dbh,$authorised_values_sth) = @_;
- my @authorised_values;
- my %authorised_lib;
+ my @authorised_values;
+ my %authorised_lib;
- # builds list, depending on authorised value...
+ # builds list, depending on authorised value...
- #---- branch
- if ($tagslib->{$tag}->{$subfield}->{'authorised_value'} eq "branches" ) {
- my $sth=$dbh->prepare("select branchcode,branchname from branches");
+ #---- branch
+ if ($tagslib->{$tag}->{$subfield}->{'authorised_value'} eq "branches" ) {
+ my $sth=$dbh->prepare("select branchcode,branchname from branches order by branchname");
$sth->execute;
push @authorised_values, ""
unless ($tagslib->{$tag}->{$subfield}->{mandatory});
while (my ($branchcode,$branchname) = $sth->fetchrow_array) {
- push @authorised_values, $branchcode;
- $authorised_lib{$branchcode}=$branchname;
- }
-
- #----- itemtypes
- } elsif ($tagslib->{$tag}->{$subfield}->{authorised_value} eq "itemtypes") {
- my $sth=$dbh->prepare("select itemtype,description from itemtypes");
- $sth->execute;
- push @authorised_values, ""
- unless ($tagslib->{$tag}->{$subfield}->{mandatory});
-
- while (my ($itemtype,$description) = $sth->fetchrow_array) {
- push @authorised_values, $itemtype;
- $authorised_lib{$itemtype}=$description;
+ push @authorised_values, $branchcode;
+ $authorised_lib{$branchcode}=$branchname;
}
- #---- "true" authorised value
- } else {
- $authorised_values_sth->execute
- ($tagslib->{$tag}->{$subfield}->{authorised_value});
+ #----- itemtypes
+ } elsif ($tagslib->{$tag}->{$subfield}->{authorised_value} eq "itemtypes") {
+ my $sth=$dbh->prepare("select itemtype,description from itemtypes order by description");
+ $sth->execute;
+ push @authorised_values, "" unless ($tagslib->{$tag}->{$subfield}->{mandatory});
+
+ while (my ($itemtype,$description) = $sth->fetchrow_array) {
+ push @authorised_values, $itemtype;
+ $authorised_lib{$itemtype}=$description;
+ }
+ $value=$itemtype unless ($value);
- push @authorised_values, ""
- unless ($tagslib->{$tag}->{$subfield}->{mandatory});
+ #---- "true" authorised value
+ } else {
+ $authorised_values_sth->execute($tagslib->{$tag}->{$subfield}->{authorised_value});
- while (my ($value,$lib) = $authorised_values_sth->fetchrow_array) {
- push @authorised_values, $value;
- $authorised_lib{$value}=$lib;
- }
+ push @authorised_values, "" unless ($tagslib->{$tag}->{$subfield}->{mandatory});
+
+ while (my ($value,$lib) = $authorised_values_sth->fetchrow_array) {
+ push @authorised_values, $value;
+ $authorised_lib{$value}=$lib;
+ }
}
return CGI::scrolling_list( -name => 'field_value',
-values => \@authorised_values,
my $breedingid = $input->param('breedingid');
my $z3950 = $input->param('z3950');
my $op = $input->param('op');
+$itemtype = $input->param('itemtype');
my $dbh = C4::Context->dbh;
my $bibid;
if ($oldbiblionumber) {
$bibid = &MARCfind_MARCbibid_from_oldbiblionumber($dbh,$oldbiblionumber);
+ # find itemtype
+ $itemtype = &MARCfind_itemtype($dbh,$bibid) if $bibid;
}else {
$bibid = $input->param('bibid');
+ $itemtype = &MARCfind_itemtype($dbh,$bibid) if $bibid;
}
my ($template, $loggedinuser, $cookie)
= get_template_and_user({template_name => "acqui.simple/addbiblio.tmpl",
debug => 1,
});
-$tagslib = &MARCgettagslib($dbh,1);
+$tagslib = &MARCgettagslib($dbh,1,$itemtype);
my $record=-1;
my $encoding="";
$record = MARCgetbiblio($dbh,$bibid) if ($bibid);
+warn "R".$record->as_formatted;
($record,$encoding) = MARCfindbreeding($dbh,$breedingid) if ($breedingid);
$is_a_modif=0;
($bibid,$oldbibnum,$oldbibitemnum) = NEWnewbiblio($dbh,$record);
}
# now, redirect to additem page
- print $input->redirect("additem.pl?bibid=$bibid");
+ print $input->redirect("additem.pl?bibid=$bibid&itemtype=$itemtype");
+ warn "redirect : $itemtype";
exit;
#------------------------------------------------------------------------------------------------------------------------------
} elsif ($op eq "addfield") {
&NEWdelbiblio($dbh,$bibid);
print "Content-Type: text/html\n\n<META HTTP-EQUIV=Refresh CONTENT=\"0; URL=/cgi-bin/koha/search.marc/search.pl?type=intranet\"></html>";
exit;
-#------------------------------------------------------------------------------------------------------------------------------#------------------------------------------------------------------------------------------------------------------------------
+#------------------------------------------------------------------------------------------------------------------------------
+#------------------------------------------------------------------------------------------------------------------------------
} else {
#------------------------------------------------------------------------------------------------------------------------------
build_tabs ($template, $record, $dbh,$encoding);
oldbiblioitemnumtagsubfield => $oldbiblioitemnumtagsubfield,
oldbiblioitemnumber => $oldbiblioitemnumber );
}
+$template->param(
+ itemtype => $itemtype
+ );
output_html_with_http_headers $input, $cookie, $template->output;
\ No newline at end of file
use C4::Output;
use C4::Interface::CGI::Output;
use HTML::Template;
+use C4::Koha;
my $query = new CGI;
debug => 1,
}
);
+
+# get itemtype list
+my $itemtypes = getitemtypes;
+my @itemtypesloop;
+foreach my $thisitemtype (keys %$itemtypes) {
+ my %row =(value => $thisitemtype,
+ description => $itemtypes->{$thisitemtype}->{'description'},
+ );
+ push @itemtypesloop, \%row;
+}
+
my $marc_p = C4::Context->boolean_preference("marc");
-$template->param( NOTMARC => !$marc_p );
+$template->param( NOTMARC => !$marc_p,
+ itemtypeloop => \@itemtypesloop );
output_html_with_http_headers $query, $cookie, $template->output;
my $op = $input->param('op');
my $itemnum = $input->param('itemnum');
-my $tagslib = &MARCgettagslib($dbh,1);
+# find itemtype
+my $itemtype = &MARCfind_itemtype($dbh,$bibid);
+
+my $tagslib = &MARCgettagslib($dbh,1,$itemtype);
my $record = MARCgetbiblio($dbh,$bibid);
my $itemrecord;
my $nextop="additem";
use HTML::Template;
sub StringSearch {
- my ($env,$searchstring,$type)=@_;
+ my ($env,$searchstring,$itemtype)=@_;
my $dbh = C4::Context->dbh;
$searchstring=~ s/\'/\\\'/g;
my @data=split(' ',$searchstring);
my $count=@data;
- my $sth=$dbh->prepare("Select tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,seealso,authorised_value,thesaurus_category,value_builder from marc_subfield_structure where (tagfield like ?) order by tagfield");
- $sth->execute("$searchstring%");
+ my $sth=$dbh->prepare("Select tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,seealso,authorised_value,thesaurus_category,value_builder from marc_subfield_structure where (tagfield like ? and itemtype=?) order by tagfield");
+ $sth->execute("$searchstring%",$itemtype);
my @results;
my $cnt=0;
while (my $data=$sth->fetchrow_hashref){
- push(@results,$data);
- $cnt ++;
+ push(@results,$data);
+ $cnt ++;
}
- # $sth->execute;
$sth->finish;
$dbh->disconnect;
return ($cnt,\@results);
my $input = new CGI;
my $tagfield=$input->param('tagfield');
my $tagsubfield=$input->param('tagsubfield');
+my $itemtype=$input->param('itemtype');
my $pkfield="tagfield";
my $offset=$input->param('offset');
my $script_name="/cgi-bin/koha/admin/marc_subfields_structure.pl";
if ($op) {
$template->param(script_name => $script_name,
tagfield =>$tagfield,
+ itemtype => $itemtype,
$op => 1); # we show only the TMPL_VAR names $op
} else {
$template->param(script_name => $script_name,
tagfield =>$tagfield,
+ itemtype => $itemtype,
else => 1); # we show only the TMPL_VAR names $op
}
closedir DIR;
# build values list
- my $sth=$dbh->prepare("select tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,seealso,authorised_value,thesaurus_category,value_builder from marc_subfield_structure where tagfield=?"); # and tagsubfield='$tagsubfield'");
- $sth->execute($tagfield);
+ my $sth=$dbh->prepare("select tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,seealso,authorised_value,thesaurus_category,value_builder from marc_subfield_structure where tagfield=? and itemtype=?"); # and tagsubfield='$tagsubfield'");
+ $sth->execute($tagfield,$itemtype);
my @loop_data = ();
my $toggle="white";
my $i=0;
} elsif ($op eq 'add_validate') {
my $dbh = C4::Context->dbh;
$template->param(tagfield => "$input->param('tagfield')");
- my $sth=$dbh->prepare("replace marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,seealso,authorised_value,thesaurus_category,value_builder)
- values (?,?,?,?,?,?,?,?,?,?,?,?)");
+ my $sth=$dbh->prepare("replace marc_subfield_structure (tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,seealso,authorised_value,thesaurus_category,value_builder,itemtype)
+ values (?,?,?,?,?,?,?,?,?,?,?,?,?)");
my @tagsubfield = $input->param('tagsubfield');
my @liblibrarian = $input->param('liblibrarian');
my @libopac = $input->param('libopac');
$seealso,
$authorised_value,
$thesaurus_category,
- $value_builder);
+ $value_builder,$itemtype);
}
}
}
$sth->finish;
- print "Content-Type: text/html\n\n<META HTTP-EQUIV=Refresh CONTENT=\"0; URL=marc_subfields_structure.pl?tagfield=$tagfield\"></html>";
+ print "Content-Type: text/html\n\n<META HTTP-EQUIV=Refresh CONTENT=\"0; URL=marc_subfields_structure.pl?tagfield=$tagfield&itemtype=$itemtype\"></html>";
exit;
# END $OP eq ADD_VALIDATE
# called by default form, used to confirm deletion of data in DB
} elsif ($op eq 'delete_confirm') {
my $dbh = C4::Context->dbh;
- my $sth=$dbh->prepare("select tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,thesaurus_category,value_builder from marc_subfield_structure where tagfield=? and tagsubfield=?");
+ my $sth=$dbh->prepare("select tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,thesaurus_category,value_builder from marc_subfield_structure where tagfield=? and tagsubfield=? and itemtype=?");
$sth->execute($tagfield,$tagsubfield);
my $data=$sth->fetchrow_hashref;
$sth->finish;
delete_link => $script_name,
tagfield =>$tagfield,
tagsubfield => $tagsubfield,
+ itemtype => $itemtype,
);
# END $OP eq DELETE_CONFIRM
################## DELETE_CONFIRMED ##################################
} elsif ($op eq 'delete_confirmed') {
my $dbh = C4::Context->dbh;
unless (C4::Context->config('demo') eq 1) {
- my $sth=$dbh->prepare("delete from marc_subfield_structure where tagfield=? and tagsubfield=?");
- $sth->execute($tagfield,$tagsubfield);
+ my $sth=$dbh->prepare("delete from marc_subfield_structure where tagfield=? and tagsubfield=? and itemtype=?");
+ $sth->execute($tagfield,$tagsubfield,$itemtype);
$sth->finish;
}
- print "Content-Type: text/html\n\n<META HTTP-EQUIV=Refresh CONTENT=\"0; URL=marc_subfields_structure.pl?tagfield=$tagfield\"></html>";
+ print "Content-Type: text/html\n\n<META HTTP-EQUIV=Refresh CONTENT=\"0; URL=marc_subfields_structure.pl?tagfield=$tagfield&itemtype=$itemtype\"></html>";
exit;
$template->param(tagfield => $tagfield);
# END $OP eq DELETE_CONFIRMED
################## DEFAULT ##################################
} else { # DEFAULT
my $env;
- my ($count,$results)=StringSearch($env,$tagfield,'web');
+ my ($count,$results)=StringSearch($env,$tagfield,$itemtype);
my $toggle="white";
my @loop_data = ();
for (my $i=$offset; $i < ($offset+$pagesize<$count?$offset+$pagesize:$count); $i++){
$row_data{authorised_value} = $results->[$i]{'authorised_value'};
$row_data{thesaurus_category} = $results->[$i]{'thesaurus_category'};
$row_data{value_builder} = $results->[$i]{'value_builder'};
- $row_data{delete} = "$script_name?op=delete_confirm&tagfield=$tagfield&tagsubfield=".$results->[$i]{'tagsubfield'};
+ $row_data{delete} = "$script_name?op=delete_confirm&tagfield=$tagfield&tagsubfield=".$results->[$i]{'tagsubfield'}."&itemtype=$itemtype";
$row_data{bgcolor} = $toggle;
push(@loop_data, \%row_data);
}
$template->param(loop => \@loop_data);
- $template->param(edit => "<a href=\"$script_name?op=add_form&tagfield=$tagfield\">");
+ $template->param(edit => "<a href=\"$script_name?op=add_form&tagfield=$tagfield&itemtype=$itemtype\">");
if ($offset>0) {
my $prevpage = $offset-$pagesize;
$template->param(prev =>"<a href=\"$script_name?offset=$prevpage\">");
use strict;
use CGI;
use C4::Auth;
+use C4::Koha;
use C4::Context;
use C4::Output;
use C4::Interface::CGI::Output;
use C4::Context;
use HTML::Template;
-sub StringSearch {
- my ($env,$searchstring,$type)=@_;
- my $dbh = C4::Context->dbh;
- $searchstring=~ s/\'/\\\'/g;
- my @data=split(' ',$searchstring);
- my $count=@data;
- my $sth=$dbh->prepare("Select tagfield,liblibrarian,libopac,repeatable,mandatory,authorised_value from marc_tag_structure where (tagfield >= ?) order by tagfield");
- $sth->execute($data[0]);
- my @results;
- while (my $data=$sth->fetchrow_hashref){
- push(@results,$data);
- }
- # $sth->execute;
- $sth->finish;
- return (scalar(@results),\@results);
-}
-
+# retrieve parameters
my $input = new CGI;
+my $itemtype = $input->param('itemtype'); # set to select framework
+$itemtype="" unless $itemtype;
+my $existingitemtype = $input->param('existingitemtype'); # set when we have to create a new framework (in itemtype) by copying an old one (in existingitemtype)
+$existingitemtype = "" unless $existingitemtype;
+my $itemtypeinfo = getitemtypeinfo($itemtype);
my $searchfield=$input->param('searchfield');
$searchfield=0 unless $searchfield;
+$searchfield=~ s/\,//g;
+
my $offset=$input->param('offset');
+my $op = $input->param('op');
+my $pagesize=20;
+
my $script_name="/cgi-bin/koha/admin/marctagstructure.pl";
my $dbh = C4::Context->dbh;
+# open template
my ($template, $loggedinuser, $cookie)
= get_template_and_user({template_name => "parameters/marctagstructure.tmpl",
query => $input,
flagsrequired => {parameters => 1},
debug => 1,
});
-my $pagesize=20;
-my $op = $input->param('op');
-$searchfield=~ s/\,//g;
+# get itemtype list
+my $itemtypes = getitemtypes;
+my @itemtypesloop;
+foreach my $thisitemtype (keys %$itemtypes) {
+ my $selected = 1 if $thisitemtype eq $itemtype;
+ my %row =(value => $thisitemtype,
+ selected => $selected,
+ description => $itemtypes->{$thisitemtype}->{'description'},
+ );
+ push @itemtypesloop, \%row;
+}
+
+# check that itemtype framework is defined in marc_tag_structure
+my $sth=$dbh->prepare("select count(*) from marc_tag_structure where itemtype=?");
+$sth->execute($itemtype);
+my ($itemtypeexist) = $sth->fetchrow;
+if ($itemtypeexist) {
+} else {
+ # if itemtype does not exists, then OP must be changed to "create itemtype" if we are not on the way to create it
+ # (op = itemtyp_create_confirm)
+ if ($op eq "itemtype_create_confirm") {
+ duplicate_framework($itemtype, $existingitemtype);
+ } else {
+ $op = "itemtype_create";
+ }
+}
+$template->param(itemtypeloop => \@itemtypesloop);
if ($op) {
$template->param(script_name => $script_name,
$op => 1); # we show only the TMPL_VAR names $op
else => 1); # we show only the TMPL_VAR names $op
}
+
################## ADD_FORM ##################################
# called by default. Used to create form to add or modify a record
if ($op eq 'add_form') {
#---- if primkey exists, it's a modify action, so read values to modify...
my $data;
if ($searchfield) {
- my $sth=$dbh->prepare("select tagfield,liblibrarian,libopac,repeatable,mandatory,authorised_value from marc_tag_structure where tagfield=?");
- $sth->execute($searchfield);
+ $sth=$dbh->prepare("select tagfield,liblibrarian,libopac,repeatable,mandatory,authorised_value from marc_tag_structure where tagfield=? and itemtype=?");
+ $sth->execute($searchfield,$itemtype);
$data=$sth->fetchrow_hashref;
$sth->finish;
}
repeatable => CGI::checkbox('repeatable',$data->{'repeatable'}?'checked':'',1,''),
mandatory => CGI::checkbox('mandatory',$data->{'mandatory'}?'checked':'',1,''),
authorised_value => $authorised_value,
+ itemtype => $itemtype,
);
# END $OP eq ADD_FORM
################## ADD_VALIDATE ##################################
# called by add_form, used to insert/modify data in DB
} elsif ($op eq 'add_validate') {
- my $dbh = C4::Context->dbh;
- my $sth=$dbh->prepare("replace marc_tag_structure (tagfield,liblibrarian,libopac,repeatable,mandatory,authorised_value) values (?,?,?,?,?,?)");
+ $sth=$dbh->prepare("replace marc_tag_structure (tagfield,liblibrarian,libopac,repeatable,mandatory,authorised_value,itemtype) values (?,?,?,?,?,?,?)");
my $tagfield =$input->param('tagfield');
my $liblibrarian = $input->param('liblibrarian');
my $libopac =$input->param('libopac');
$libopac,
$repeatable?1:0,
$mandatory?1:0,
- $authorised_value
+ $authorised_value,
+ $itemtype
);
}
$sth->finish;
- print "Content-Type: text/html\n\n<META HTTP-EQUIV=Refresh CONTENT=\"0; URL=marctagstructure.pl?tagfield=$tagfield\"></html>";
+ print "Content-Type: text/html\n\n<META HTTP-EQUIV=Refresh CONTENT=\"0; URL=marctagstructure.pl?tagfield=$tagfield&itemtype=$itemtype\"></html>";
exit;
# END $OP eq ADD_VALIDATE
################## DELETE_CONFIRM ##################################
# called by default form, used to confirm deletion of data in DB
} elsif ($op eq 'delete_confirm') {
- my $dbh = C4::Context->dbh;
- my $sth=$dbh->prepare("select tagfield,liblibrarian,libopac,repeatable,mandatory,authorised_value from marc_tag_structure where tagfield=?");
+ $sth=$dbh->prepare("select tagfield,liblibrarian,libopac,repeatable,mandatory,authorised_value from marc_tag_structure where tagfield=?");
$sth->execute($searchfield);
my $data=$sth->fetchrow_hashref;
$sth->finish;
################## DELETE_CONFIRMED ##################################
# called by delete_confirm, used to effectively confirm deletion of data in DB
} elsif ($op eq 'delete_confirmed') {
- my $dbh = C4::Context->dbh;
unless (C4::Context->config('demo') eq 1) {
$dbh->do("delete from marc_tag_structure where tagfield='$searchfield'");
$dbh->do("delete from marc_subfield_structure where tagfield='$searchfield'");
}
# END $OP eq DELETE_CONFIRMED
+################## ITEMTYPE_CREATE ##################################
+# called automatically if an unexisting itemtype is selected
+} elsif ($op eq 'itemtype_create') {
+ $sth = $dbh->prepare("select count(*),marc_tag_structure.itemtype,description from marc_tag_structure,itemtypes where itemtypes.itemtype=marc_tag_structure.itemtype group by marc_tag_structure.itemtype");
+ $sth->execute;
+ my @existingitemtypeloop;
+ while (my ($tot,$thisitemtype,$description) = $sth->fetchrow) {
+ if ($tot>0) {
+ my %line = ( value => $thisitemtype,
+ description => $description,
+ );
+ push @existingitemtypeloop,\%line;
+ }
+ }
+ $template->param(existingitemtypeloop => \@existingitemtypeloop,
+ itemtype => $itemtype,
+ ITdescription => $itemtypeinfo->{description},
+ );
################## DEFAULT ##################################
} else { # DEFAULT
+ # here, $op can be unset or set to "itemtype_create_confirm".
if ($searchfield ne '') {
- $template->param(searchfield => "<p>You Searched for <strong>$searchfield<strong></p>");
+ $template->param(searchfield => $searchfield);
}
my $env;
- my ($count,$results)=StringSearch($env,$searchfield,'web');
+ my ($count,$results)=StringSearch($env,$searchfield,$itemtype);
my $toggle="white";
my @loop_data = ();
for (my $i=$offset; $i < ($offset+$pagesize<$count?$offset+$pagesize:$count); $i++){
$row_data{repeatable} = $results->[$i]{'repeatable'};
$row_data{mandatory} = $results->[$i]{'mandatory'};
$row_data{authorised_value} = $results->[$i]{'authorised_value'};
- $row_data{subfield_link} ="marc_subfields_structure.pl?tagfield=".$results->[$i]{'tagfield'};
- $row_data{edit} = "$script_name?op=add_form&searchfield=".$results->[$i]{'tagfield'};
- $row_data{delete} = "$script_name?op=delete_confirm&searchfield=".$results->[$i]{'tagfield'};
+ $row_data{subfield_link} ="marc_subfields_structure.pl?tagfield=".$results->[$i]{'tagfield'}."&itemtype=".$itemtype;
+ $row_data{edit} = "$script_name?op=add_form&searchfield=".$results->[$i]{'tagfield'}."&itemtype=".$itemtype;
+ $row_data{delete} = "$script_name?op=delete_confirm&searchfield=".$results->[$i]{'tagfield'}."&itemtype=".$itemtype;
$row_data{bgcolor} = $toggle;
push(@loop_data, \%row_data);
}
prevpage=> $prevpage,
searchfield => $searchfield,
script_name => $script_name,
+ itemtype => $itemtype,
);
}
if ($offset+$pagesize<$count) {
$template->param(nextpage =>$nextpage,
searchfield => $searchfield,
script_name => $script_name,
+ itemtype => $itemtype,
);
}
} #---- END $OP eq DEFAULT
$template->param(loggeninuser => $loggedinuser);
output_html_with_http_headers $input, $cookie, $template->output;
+
+
+#
+# the sub used for searches
+#
+sub StringSearch {
+ my ($env,$searchstring,$itemtype)=@_;
+ my $dbh = C4::Context->dbh;
+ $searchstring=~ s/\'/\\\'/g;
+ my @data=split(' ',$searchstring);
+ my $count=@data;
+ my $sth=$dbh->prepare("Select tagfield,liblibrarian,libopac,repeatable,mandatory,authorised_value from marc_tag_structure where (tagfield >= ? and itemtype=?) order by tagfield");
+ $sth->execute($data[0], $itemtype);
+ my @results;
+ while (my $data=$sth->fetchrow_hashref){
+ push(@results,$data);
+ }
+ # $sth->execute;
+ $sth->finish;
+ return (scalar(@results),\@results);
+}
+
+#
+# the sub used to duplicate a framework from an existing one in MARC parameters tables.
+#
+sub duplicate_framework {
+ my ($newitemtype,$olditemtype) = @_;
+ my $sth = $dbh->prepare("select tagfield,liblibrarian,libopac,repeatable,mandatory,authorised_value from marc_tag_structure where itemtype=?");
+ $sth->execute($olditemtype);
+ my $sth_insert = $dbh->prepare("insert into marc_tag_structure (tagfield, liblibrarian, libopac, repeatable, mandatory, authorised_value, itemtype) values (?,?,?,?,?,?,?)");
+ while ( my ($tagfield,$liblibrarian,$libopac,$repeatable,$mandatory,$authorised_value) = $sth->fetchrow) {
+ $sth_insert->execute($tagfield,$liblibrarian,$libopac,$repeatable,$mandatory,$authorised_value,$newitemtype);
+ }
+
+ $sth = $dbh->prepare("select itemtype,tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,thesaurus_category,value_builder,seealso from marc_subfield_structure where itemtype=?");
+ $sth->execute($olditemtype);
+ $sth_insert = $dbh->prepare("insert into marc_subfield_structure (itemtype,tagfield,tagsubfield,liblibrarian,libopac,repeatable,mandatory,kohafield,tab,authorised_value,thesaurus_category,value_builder,seealso) values (?,?,?,?,?,?,?,?,?,?,?,?,?)");
+ while ( my ($itemtype, $tagfield, $tagsubfield, $liblibrarian, $libopac, $repeatable, $mandatory, $kohafield, $tab, $authorised_value, $thesaurus_category, $value_builder, $seealso) = $sth->fetchrow) {
+ $sth_insert->execute($newitemtype, $tagfield, $tagsubfield, $liblibrarian, $libopac, $repeatable, $mandatory, $kohafield, $tab, $authorised_value, $thesaurus_category, $value_builder, $seealso);
+ }
+}
+
<p>
<input type="hidden" name="op" value="addbiblio">
<input type="hidden" name="addfield_field">
+ <input type="hidden" name="itemtype" value="<!-- TMPL_VAR name="itemtype" -->">
<input type="hidden" name="oldbiblionumber" value="<!-- TMPL_VAR name="oldbiblionumber" -->">
<!-- TMPL_IF name="bibid" -->
<input type="button" value="Save" onClick='Check(this.form)' accesskey="w" class="button catalogue">
<!-- /TMPL_IF -->
<a href="javascript:PopupZ3950()" class="button catalogue">z3950 search</a>
</p>
+</div>
+
<div class="tabs">
<!-- TMPL_IF name="0XX" -->
- <a href="#0XX">0</a>
+ <a href="javascript:active(0)">0</a>
<!-- /TMPL_IF -->
<!-- TMPL_IF name="1XX" -->
- <a href="#1XX">1</a>
+ <a href="javascript:active(1)">1</a>
<!-- /TMPL_IF -->
<!-- TMPL_IF name="2XX" -->
- <a href="#2XX">2</a>
+ <a href="javascript:active(2)">2</a>
<!-- /TMPL_IF -->
<!-- TMPL_IF name="3XX" -->
- <a href="#3XX">3</a>
+ <a href="javascript:active(3)">3</a>
<!-- /TMPL_IF -->
<!-- TMPL_IF name="4XX" -->
- <a href="#4XX">4</a>
+ <a href="javascript:active(4)">4</a>
<!-- /TMPL_IF -->
<!-- TMPL_IF name="5XX" -->
- <a href="#5XX">5</a>
+ <a href="javascript:active(5)">5</a>
<!-- /TMPL_IF -->
<!-- TMPL_IF name="6XX" -->
- <a href="#6XX">6</a>
+ <a href="javascript:active(6)">6</a>
<!-- /TMPL_IF -->
<!-- TMPL_IF name="7XX" -->
- <a href="#7XX">7</a>
+ <a href="javascript:active(7)">7</a>
<!-- /TMPL_IF -->
<!-- TMPL_IF name="8XX" -->
- <a href="#8XX">8</a>
+ <a href="javascript:active(8)">8</a>
<!-- /TMPL_IF -->
<!-- TMPL_IF name="9XX" -->
- <a href="#9XX">9</a>
+ <a href="javascript:active(9)">9</a>
<!-- /TMPL_IF -->
</div>
- <div name="0XX" id="0XX" class="tab">
- <table>
+
+ <div name="0XX" id="0XX" class="tab" style="visibility:visible">
+ <table class="noborder">
<!-- TMPL_LOOP name="0XX" -->
<!-- TMPL_IF name="tag" -->
<tr>
</table>
</div>
- <div name="1XX" id="1XX" class="tab">
- <table>
+ <div name="1XX" id="1XX" class="tab">
+ <table class="noborder">
<!-- TMPL_LOOP name="1XX" -->
<!-- TMPL_IF name="tag" -->
<tr>
</tr>
<!-- /tmpl_loop -->
<!-- /tmpl_loop -->
- </table>
- </div>
+ </table>
+ </div>
- <div name="2XX" id="2XX" class="tab">
- <table>
+ <div name="2XX" id="2XX" class="tab">
+ <table class="noborder">
<!-- TMPL_LOOP name="2XX" -->
<!-- TMPL_IF name="tag" -->
<tr>
</tr>
<!-- /tmpl_loop -->
<!-- /tmpl_loop -->
- </table>
- </div>
+ </table>
+ </div>
- <div name="3XX" id="3XX" class="tab">
- <table>
+ <div name="3XX" id="3XX" class="tab">
+ <table class="noborder">
<!-- TMPL_LOOP name="3XX" -->
<!-- TMPL_IF name="tag" -->
<tr>
</tr>
<!-- /tmpl_loop -->
<!-- /tmpl_loop -->
- </table>
- </div>
+ </table>
+ </div>
- <div name="4XX" id="4XX" class="tab">
- <table>
+ <div name="4XX" id="4XX" class="tab">
+ <table class="noborder">
<!-- TMPL_LOOP name="4XX" -->
<!-- TMPL_IF name="tag" -->
<tr>
</tr>
<!-- /tmpl_loop -->
<!-- /tmpl_loop -->
- </table>
- </div>
+ </table>
+ </div>
- <div name="5XX" id="5XX" class="tab">
- <table>
+ <div name="5XX" id="5XX" class="tab">
+ <table class="noborder">
<!-- TMPL_LOOP name="5XX" -->
<!-- TMPL_IF name="tag" -->
<tr>
</tr>
<!-- /tmpl_loop -->
<!-- /tmpl_loop -->
- </table>
- </div>
+ </table>
+ </div>
- <div name="6XX" id="6XX" class="tab">
- <table>
+ <div name="6XX" id="6XX" class="tab">
+ <table class="noborder">
<!-- TMPL_LOOP name="6XX" -->
<!-- TMPL_IF name="tag" -->
<tr>
</tr>
<!-- /tmpl_loop -->
<!-- /tmpl_loop -->
- </table>
- </div>
+ </table>
+ </div>
- <div name="7XX" id="7XX" class="tab">
- <table>
+ <div name="7XX" id="7XX" class="tab">
+ <table class="noborder">
<!-- TMPL_LOOP name="7XX" -->
<!-- TMPL_IF name="tag" -->
<tr>
</tr>
<!-- /tmpl_loop -->
<!-- /tmpl_loop -->
- </table>
- </div>
+ </table>
+ </div>
- <div name="8XX" id="8XX" class="tab">
- <table>
+ <div name="8XX" id="8XX" class="tab">
+ <table class="noborder">
<!-- TMPL_LOOP name="8XX" -->
<!-- TMPL_IF name="tag" -->
<tr>
</tr>
<!-- /tmpl_loop -->
<!-- /tmpl_loop -->
- </table>
- </div>
+ </table>
+ </div>
- <div name="9XX" id="9XX" class="tab">
- <table>
+ <div name="9XX" id="9XX" class="tab">
+ <table class="noborder">
<!-- TMPL_LOOP name="9XX" -->
<!-- TMPL_IF name="tag" -->
<tr>
</tr>
<!-- /tmpl_loop -->
<!-- /tmpl_loop -->
- </div>
+ </table>
+ </div>
<div name="hidden" id="hidden" class="tab">
- <table width=90% cellspacing=0 cellpadding=2 border=0>
+ <table class="noborder">
<!-- TMPL_LOOP name="hidden_loop" -->
<tr>
<td width="3%"> </td>
</form>
<script LANGUAGE="JavaScript">
function _(s) { return s } // dummy function for gettext
+function active(numlayer)
+{
+ for (i=0; i < 10 ; i++ ) {
+ ong = i+"XX";
+ link = "link"+i;
+ if (numlayer==i) {
+ document.getElementById(ong).style.visibility="visible";
+ } else {
+ document.getElementById(ong).style.visibility="hidden";
+ }
+ }
+}
function Check(f) {
// Scan for nonempty fields
var field_is_nonempty_p = new Array();
<div id="bloc25">
<form action="isbnsearch.pl">
<h2 class="acquisition">To add a new biblio/item, scan or type the ISBN/ISSN number</h2>
- <p><label class="label20">ISBN</label> <input type="text" name="isbn" /></p>
- <p><label class="label20">Title</label> <input type="text" name="title" /></p>
- <p><input type="submit" value="Go" class="button acquisition"/></p>
- <!-- TMPL_IF NAME="NOTMARC" -->
- <p><a href="addbiblio-nomarc.pl" class="button acquisition">Create Empty biblio</a></p>
- <!-- TMPL_ELSE -->
- <p><a href="addbiblio.pl" class="button acquisition">Create Empty biblio</a></p>
- <!-- /TMPL_IF -->
+ <p><label class="label20">ISBN</label> <input type="text" name="isbn" /></p>
+ <p><label class="label20">Title</label> <input type="text" name="title" /></p>
+ <p><input type="submit" value="Go" class="button acquisition"/></p>
</form>
+ <!-- TMPL_IF NAME="NOTMARC" -->
+ <p><a href="addbiblio-nomarc.pl" class="button acquisition">Create Empty biblio</a></p>
+ <!-- TMPL_ELSE -->
+ <p>
+ <form action="addbiblio.pl" method="post">
+ <select name="itemtype">
+ <option value="">Default</option>
+ <!-- TMPL_LOOP name="itemtypeloop" -->
+ <option value="<!-- TMPL_VAR name="value" -->"><!-- TMPL_VAR name="description" --></option>
+ <!-- /TMPL_LOOP -->
+ </select>
+ <input type="submit" value="Create Empty biblio" class="button acquisition">
+ </p>
+ <!-- /TMPL_IF -->
</div>
<div id="bloc25">
<h2 class="acquisition">Hint</h2>
<!-- /TMPL_IF -->
<!-- TMPL_LOOP name="item" -->
<p>
- <!-- TMPL_VAR name="subfield" --> - <!-- TMPL_IF name="mandatory" --><b><!-- /TMPL_IF --><!-- TMPL_VAR name="marc_lib" --><!-- TMPL_IF name="mandatory" --> *</b><!-- /TMPL_IF -->
+ <label><!-- TMPL_VAR name="subfield" --> - <!-- TMPL_IF name="mandatory" --><b><!-- /TMPL_IF --><!-- TMPL_VAR name="marc_lib" --><!-- TMPL_IF name="mandatory" --> *</b><!-- /TMPL_IF --></label>
<!-- TMPL_VAR name="marc_value" -->
<input type="hidden" name="tag" value="<!-- TMPL_VAR name="tag" -->">
<input type="hidden" name="subfield" value="<!-- TMPL_VAR name="subfield" -->">
<div class="tabs">
<!-- TMPL_IF name="0XX" -->
- <a href="#0XX">0</a>
+ <a href="javascript:active(0)"><div id="link0">0</div></a>
<!-- /TMPL_IF -->
<!-- TMPL_IF name="1XX" -->
- <a href="#1XX">1</a>
+ <a href="javascript:active(1)"><div id="link1">1</div></a>
<!-- /TMPL_IF -->
<!-- TMPL_IF name="2XX" -->
- <a href="#2XX">2</a>
+ <a href="javascript:active(2)"><div id="link2">2</div></a>
<!-- /TMPL_IF -->
<!-- TMPL_IF name="3XX" -->
- <a href="#3XX">3</a>
+ <a href="javascript:active(3)"><div id="link3">3</div></a>
<!-- /TMPL_IF -->
<!-- TMPL_IF name="4XX" -->
- <a href="#4XX">4</a>
+ <a href="javascript:active(4)"><div id="link4">4</div></a>
<!-- /TMPL_IF -->
<!-- TMPL_IF name="5XX" -->
- <a href="#5XX">5</a>
+ <a href="javascript:active(5)"><div id="link5">5</div></a>
<!-- /TMPL_IF -->
<!-- TMPL_IF name="6XX" -->
- <a href="#6XX">6</a>
+ <a href="javascript:active(6)"><div id="link6">6</div></a>
<!-- /TMPL_IF -->
<!-- TMPL_IF name="7XX" -->
- <a href="#7XX">7</a>
+ <a href="javascript:active(7)"><div id="link7">7</div></a>
<!-- /TMPL_IF -->
<!-- TMPL_IF name="8XX" -->
- <a href="#8XX">8</a>
+ <a href="javascript:active(8)"><div id="link8">8</div></a>
<!-- /TMPL_IF -->
<!-- TMPL_IF name="9XX" -->
- <a href="#9XX">9</a>
+ <a href="javascript:active(9)"><div id="link9">9</div></a>
<!-- /TMPL_IF -->
- <a href="#10XX">I<br/>t<br/>e<br/>m<br/>s</a>
+ <a href="javascript:active(10)">I<br/>t<br/>e<br/>m<br/>s</a>
</div>
- <div name="0XX" id="0XX" class="tab">
+ <div name="0XX" id="0XX" class="tab" style="visibility:visible">
<table>
<!-- TMPL_LOOP name="0XX" -->
<tr>
</table>
</div>
<script language="JavaScript" type="text/javascript">
+function active(numlayer)
+{
+ for (i=0; i <= 10 ; i++ ) {
+ ong = i+"XX";
+ link = "link"+i;
+ if (numlayer==i) {
+ document.getElementById(ong).style.visibility="visible";
+ } else {
+ document.getElementById(ong).style.visibility="hidden";
+ }
+ }
+}
+
function confirm_deletion() {
var is_confirmed = confirm('Are you sure you want to delete this biblio?');
if (is_confirmed) {
<!-- TMPL_INCLUDE NAME="cat-top.inc" -->
+<div id="mainbloc">
<!-- TMPL_LOOP NAME="BIBLIO_RESULTS" -->
<!-- TMPL_IF NAME="norequests" -->
<!-- TMPL_ELSE -->
- <table border=0 cellpadding=10 align=right>
- <tr>
- <td>
- <a class="button" href=request.pl?bib=<!-- TMPL_VAR NAME="biblionumber" -->>Requests</a>
- </td>
- </tr>
- </table>
+ <a class="button" href=request.pl?bib=<!-- TMPL_VAR NAME="biblionumber" -->>Requests</a>
<!-- /TMPL_IF -->
- <font SIZE=6><em><!-- TMPL_VAR NAME="title" --> (<!-- TMPL_VAR NAME="author" -->)
- <!-- TMPL_VAR NAME="class" --></em></font><p>
- <table cellspacing="0" cellpadding="5" border="1" align="left" width="220">
- <!--------------BIBLIO RECORD TABLE-------------->
- <tr valign="top">
- <td bgcolor="#cccc99" background="/images/background-mem.gif">
- <b>BIBLIO RECORD <!-- TMPL_VAR NAME="biblionumber" --></b>
- </td>
- </tr>
- <tr valign="top">
- <td>
- <br/><a href="MARCdetail.pl?bib=<!-- TMPL_VAR name="biblionumber" -->" class="button">MARC</a><br/><br/>
- <FONT SIZE=2 face="arial, helvetica">
+ <h1 class="catalogue"><!-- TMPL_VAR NAME="title" --> (<!-- TMPL_VAR NAME="author" -->) <!-- TMPL_VAR NAME="class" --></h1>
+ <div id="bloc25">
+ <h2 class="catalogue">BIBLIO RECORD <!-- TMPL_VAR NAME="biblionumber" --></h2>
+ <p><a href="MARCdetail.pl?bib=<!-- TMPL_VAR name="biblionumber" -->" class="button">MARC</a></p>
+ <p>
<!-- TMPL_IF name="isbn" --><b>ISBN:</b><a href="/cgi-bin/koha/opac-searchresults.pl?isbn=<!-- TMPL_VAR NAME="isbn" ESCAPE="URL" -->"><!-- TMPL_VAR NAME="ISBN" --></a><!-- /TMPL_IF --><br>
<!-- TMPL_IF name="subtitle" --><b>Subtitle:</b><!-- TMPL_VAR NAME="subtitle" --><!-- /TMPL_IF --><br>
<!-- TMPL_IF name="author" --><b>Author:</b> <a href="/cgi-bin/koha/opac-searchresults.pl?author=<!-- TMPL_VAR NAME="author" ESCAPE="URL" -->"><!-- TMPL_VAR NAME="author" --></a><!-- /TMPL_IF --><br>
<!-- TMPL_IF name="lccn" --><b>LCCN:</b> <!-- TMPL_VAR name="lccn" --><!-- /TMPL_IF --><br>
<!-- TMPL_IF name="url" --><b>URL:</b> <a href="<!-- TMPL_VAR name="url" -->"><!-- TMPL_VAR NAME="url" --></a><!-- /TMPL_IF --><br>
<b>Total Number of Items:</b> <!-- TMPL_VAR NAME="count" -->
- </font>
- </td>
- </tr>
- </table>
+ </div>
<!-- /TMPL_LOOP -->
-<!-- FIXME - The help box overflows on the right. I think this is
- because it is specified as "width=70%", which the browser
- interprets as 70% of the width of the browser window. However,
- leaving out the "width=70%" makes the help box abut the "biblio
- record" box. I think the fix is to put all three boxes in a
- table, for layout, and make the help box as wide as it wants to
- be. -->
-
-<center>
-<table border=0 cellspacing=0 cellpadding=2>
- <tr bgcolor="#cccc99" background="/images/background-mem.gif">
- <th>Item type</th>
- <th>Location</th>
- <th>Date Due</th>
- <th>Last seen</th>
- <th>Barcode</th>
- <td>Volume</td>
- </tr>
- <!-- TMPL_LOOP NAME="ITEM_RESULTS" -->
+<div id="bloc25">
+ <h2 class="catalogue">Items</h2>
+ <table>
<tr>
- <td><!-- TMPL_VAR NAME="description" --></td>
- <td><!-- TMPL_VAR NAME="branchname" --> <!-- TMPL_IF name="itemcallnumber" --> <!-- TMPL_VAR NAME="itemcallnumber" --><!-- /TMPL_IF --></td>
- <td><!-- TMPL_VAR NAME="datedue" --></td>
- <td><!-- TMPL_VAR NAME="datelastseen" --></td>
- <td><a href="/cgi-bin/koha/moredetail.pl?type=<!-- TMPL_VAR NAME="type" -->&item=<!-- TMPL_VAR NAME="itemnumber" -->&bib=<!-- TMPL_VAR NAME="biblionumber" -->&bi=<!-- TMPL_VAR NAME="biblioitemnumber" -->"><!-- TMPL_VAR NAME="barcode" --></a></td>
- <td><!-- TMPL_VAR NAME="volumeddesc" --></td>
- <!-- TMPL_IF NAME="type" -->
+ <th class="catalogue">Item type</th>
+ <th class="catalogue">Location</th>
+ <th class="catalogue">Date Due</th>
+ <th class="catalogue">Last seen</th>
+ <th class="catalogue">Barcode</th>
+ <th class="catalogue">Volume</th>
+ </tr>
+ <!-- TMPL_LOOP NAME="ITEM_RESULTS" -->
+ <tr>
+ <td><!-- TMPL_VAR NAME="description" --></td>
+ <td><!-- TMPL_VAR NAME="branchname" --> <!-- TMPL_IF name="itemcallnumber" --> <!-- TMPL_VAR NAME="itemcallnumber" --><!-- /TMPL_IF --></td>
+ <td><!-- TMPL_VAR NAME="datedue" --></td>
+ <td><!-- TMPL_VAR NAME="datelastseen" --></td>
+ <td><a href="/cgi-bin/koha/moredetail.pl?type=<!-- TMPL_VAR NAME="type" -->&item=<!-- TMPL_VAR NAME="itemnumber" -->&bib=<!-- TMPL_VAR NAME="biblionumber" -->&bi=<!-- TMPL_VAR NAME="biblioitemnumber" -->"><!-- TMPL_VAR NAME="barcode" --></a></td>
+ <td><!-- TMPL_VAR NAME="volumeddesc" --></td>
+ <!-- TMPL_IF NAME="type" -->
+ <td>
+ <a href=/cgi-bin/koha/maint/catmaintain.pl?type=fixitemtype&bi=<!-- TMPL_VAR NAME="biblioitemnumber" -->&item=<!-- TMPL_VAR NAME="itemtype" -->>Fix Itemtype</a>
+ </td>
+ <!-- /TMPL_IF -->
+ </tr>
+ <!-- /TMPL_LOOP -->
+ <!-- TMPL_LOOP NAME="WEB_RESULTS" -->
+ <tr>
+ <td><!-- TMPL_VAR NAME="itemtype" --></td>
+ <td>Website</td>
+ <td>Online</td>
+ <td>Available</td>
+ <td></td>
<td>
- <a href=/cgi-bin/koha/maint/catmaintain.pl?type=fixitemtype&bi=<!-- TMPL_VAR NAME="biblioitemnumber" -->&item=<!-- TMPL_VAR NAME="itemtype" -->>Fix Itemtype</a>
+ <a href="/cgi-bin/koha/moredetail.pl?item=<!-- TMPL_VAR NAME="itemnumber -->&bib=<!-- TMPL_VAR NAME="biblionumber" -->&bi=<!-- TMPL_VAR NAME="biblioitemnumber" -->">http://<!-- TMPL_VAR NAME="url" --></a>
</td>
- <!-- /TMPL_IF -->
- </tr>
- <!-- /TMPL_LOOP -->
- <!-- TMPL_LOOP NAME="WEB_RESULTS" -->
- <tr>
- <td><!-- TMPL_VAR NAME="itemtype" --></td>
- <td>Website</td>
- <td>Online</td>
- <td>Available</td>
- <td></td>
- <td>
- <a href="/cgi-bin/koha/moredetail.pl?item=<!-- TMPL_VAR NAME="itemnumber -->&bib=<!-- TMPL_VAR NAME="biblionumber" -->&bi=<!-- TMPL_VAR NAME="biblioitemnumber" -->">http://<!-- TMPL_VAR NAME="url" --></a>
- </td>
- </tr>
- <!-- /TMPL_LOOP -->
-</table>
-<p>
-</center>
-<br clear=all>
-<p />
-
-<!--
-<table border="1" cellspacing="0" cellpadding="5" width="90%">
-<tr valign="top">
-<td bgcolor="$main"
-background="/images/background-mem.gif"><b>Abstract</b></td>
-</tr>
-<tr valign="top">
-<!-- TMPL_LOOP NAME="BIBLIO_RESULTS" -->
-<td><!-- TMPL_VAR NAME="abstract" --></td>
-<!-- /TMPL_LOOP -->
-</tr>
-</table>
-<p />
-<table border="1" cellspacing="0" cellpadding="5" width="90%">
-<tr valign="top">
-<td bgcolor="$main" background="/images/background-mem.gif"><b>Links to
-Associated Websites<b></td>
-</tr>
-<!-- TMPL_LOOP NAME="SITE_RESULTS" -->
-<tr>
-<td><b>Title:</b> <!-- TMPL_VAR name="title" --><br>
-<b>Description:</b> <!-- TMPL_VAR name="description" --><br>
-<b>URL:</b><a href="http://<!-- TMPL_VAR name="url" -->">http://<TMPL_VAR
-name="url"></a><br>
-</td>
-</tr>
-<!-- /TMPL_LOOP -->
-</table>
-
--->
-
+ </tr>
+ <!-- /TMPL_LOOP -->
+ </table>
+</div>
<!-- TMPL_INCLUDE NAME="cat-bottom.inc" -->
<!-- TMPL_INCLUDE NAME="cat-top.inc" -->
-<center>
-<br>
-<!-- TMPL_LOOP NAME="BIBITEM_DATA" -->
-<table border=0 cellpadding=10 align=right>
-<tr>
- <td>
+<div id="mainbloc">
+ <div id="bloc25">
+ <!-- TMPL_LOOP NAME="BIBITEM_DATA" -->
+ <h2 class="catalogue">
+ <a href=/cgi-bin/koha/detail.pl?bib=<!-- TMPL_VAR NAME="biblionumber" -->&type=intra>
+ <!-- TMPL_VAR NAME="title" --> (<!-- TMPL_VAR NAME="author" -->)
+ </a>
+ </h2>
+ <p>
+ <form action=/cgi-bin/koha/modbibitem.pl>
+ <input type=hidden name=bibitem value=<!-- TMPL_VAR NAME="biblioitemnumber" -->>
+ <input type=hidden name=biblio value=<!-- TMPL_VAR NAME="biblionumber" -->>
+ <p><!-- TMPL_VAR NAME="biblioitemnumber" --> GROUP - <!-- TMPL_VAR NAME="description" --> </p>
+ <p><b>Biblionumber:</b> <!-- TMPL_VAR NAME="biblionumber" --></p>
+ <p><b>Item type:</b> <!-- TMPL_VAR NAME="itemtype" --></p>
+ <p><b>URL:</b> <!-- TMPL_VAR NAME="url" --></p>
+ <p><b>Loan length:</b> <!-- TMPL_VAR NAME="loanlength" --></p>
+ <p><b>Rental charge:</b> <!-- TMPL_VAR NAME="rentalcharge" --></p>
+ <p><b>Classification:</b> <!-- TMPL_VAR NAME="classification" --><!-- TMPL_VAR NAME="dewey" --><!-- TMPL_VAR NAME="subclass" --></p>
+ <p><b>ISBN:</b> <!-- TMPL_VAR NAME="isbn" --></p>
+ <p><b>Publisher:</b> <!-- TMPL_VAR NAME="publishercode" --> </p>
+ <p><b>Place:</b> <!-- TMPL_VAR NAME="place" --></p>
+ <p><b>Date:</b> <!-- TMPL_VAR NAME="publicationyear" --></p>
+ <p><b>Volume:</b> <!-- TMPL_VAR NAME="volumeddesc" --></p>
+ <p><b>Pages:</b> <!-- TMPL_VAR NAME="pages" --></p>
+ <p><b>Illus:</b> <!-- TMPL_VAR NAME="illus" --></p>
+ <p><b>Size:</b> <!-- TMPL_VAR NAME="size" --></p>
+ <p><b>Notes:</b> <!-- TMPL_VAR NAME="bnotes" --></p>
+ <p><b>No. of Items:</b> <!-- TMPL_VAR NAME="count" --></p>
+ </form>
+ <input type="image" name="submit" VALUE="modify" src="<!-- TMPL_VAR name="interface" -->/<!-- TMPL_VAR name="theme" -->/images/fileopen.png">
+ <input type="image" name="delete" VALUE="delete" src="<!-- TMPL_VAR name="interface" -->/<!-- TMPL_VAR name="theme" -->/images/edittrash.png">
<a class="button" href=/cgi-bin/koha/request.pl?bib=<!-- TMPL_VAR NAME="biblionumber" -->>Requests</a>
- </td>
-</tr>
-</table>
-<h1><a
-href=/cgi-bin/koha/detail.pl?bib=<!-- TMPL_VAR NAME="biblionumber" -->&type=intra><!-- TMPL_VAR NAME="title" -->
-(<!-- TMPL_VAR NAME="author" -->)</a></h1><P>
-<p>
-<form action=/cgi-bin/koha/modbibitem.pl>
-<input type=hidden name=bibitem value=<!-- TMPL_VAR NAME="biblioitemnumber" -->>
-<input type=hidden name=biblio value=<!-- TMPL_VAR NAME="biblionumber" -->>
-<!------------------BIBLIO ITEM------------------>
-<TABLE CELLSPACING=0 CELLPADDING=5 border=1 align=left>
-<TR VALIGN=TOP>
-<td bgcolor="99cc33" background="<!-- TMPL_VAR name="themelang" -->/images/background-mem.gif"
-><B><!-- TMPL_VAR NAME="biblioitemnumber" --> GROUP - <!-- TMPL_VAR NAME="description" --> </b> </TD>
-</TR>
-<tr VALIGN=TOP >
-<TD width=210 >
-<INPUT TYPE="image" name="submit" VALUE="modify" BORDER=0 src="<!-- TMPL_VAR name="interface" -->/<!-- TMPL_VAR name="theme" -->/images/fileopen.png">
-<INPUT TYPE="image" name="delete" VALUE="delete" border=0 src="<!-- TMPL_VAR name="interface" -->/<!-- TMPL_VAR name="theme" -->/images/edittrash.png">
-<br>
-<FONT SIZE=2 face="arial, helvetica">
-<b>Biblionumber:</b> <!-- TMPL_VAR NAME="biblionumber" --><br>
-<b>Item type:</b> <!-- TMPL_VAR NAME="itemtype" --><br>
-<b>URL:</b> <!-- TMPL_VAR NAME="url" --><br>
-<b>Loan length:</b> <!-- TMPL_VAR NAME="loanlength" --><br>
-<b>Rental charge:</b> <!-- TMPL_VAR NAME="rentalcharge" --><br>
-<b>Classification:</b> <!-- TMPL_VAR NAME="classification" --><!-- TMPL_VAR NAME="dewey" --><!-- TMPL_VAR NAME="subclass" --><br>
-<b>ISBN:</b> <!-- TMPL_VAR NAME="isbn" --><br>
-<b>Publisher:</b> <!-- TMPL_VAR NAME="publishercode" --> <br>
-<b>Place:</b> <!-- TMPL_VAR NAME="place" --><br>
-<b>Date:</b> <!-- TMPL_VAR NAME="publicationyear" --><br>
-<b>Volume:</b> <!-- TMPL_VAR NAME="volumeddesc" --><br>
-<b>Pages:</b> <!-- TMPL_VAR NAME="pages" --><br>
-<b>Illus:</b> <!-- TMPL_VAR NAME="illus" --><br>
-<b>Size:</b> <!-- TMPL_VAR NAME="size" --><br>
-<b>Notes:</b> <!-- TMPL_VAR NAME="bnotes" --><br>
-<b>No. of Items:</b> <!-- TMPL_VAR NAME="count" -->
-</font>
-</TD>
-</tr>
-</table>
-</form>
-<!-- /TMPL_LOOP -->
+ <!-- /TMPL_LOOP -->
+ </div>
<!-- TMPL_LOOP NAME="ITEM_DATA" -->
-<img src="<!-- TMPL_VAR name="themelang" -->/images/holder.gif" width=16 height=300 align=left>
-<TABLE CELLSPACING=0 CELLPADDING=5 border=1 align=left width=220 >
-<TR VALIGN=TOP>
-<td bgcolor="99cc33" background="<!-- TMPL_VAR name="themelang" -->/images/background-mem.gif"><B>BARCODE
-<!-- TMPL_VAR NAME="barcode" --></b></TD>
-</TR>
-<tr VALIGN=TOP>
-<TD width=220>
-<form action=/cgi-bin/koha/moditem.pl method=post>
-<input type=hidden name=bibitem value=<!-- TMPL_VAR NAME="biblioitemnumber" -->>
-<input type=hidden name=item value=<!-- TMPL_VAR NAME="itemnumber" -->>
-<input type=hidden name=type value=<!-- TMPL_VAR NAME="type" -->>
-<INPUT TYPE="image" name="submit" VALUE="modify" BORDER=0 src="<!-- TMPL_VAR name="interface" -->/<!-- TMPL_VAR name="theme" -->/images/fileopen.png">
-<INPUT TYPE="image" name="delete" VALUE="delete" BORDER=0 src="<!-- TMPL_VAR name="interface" -->/<!-- TMPL_VAR name="theme" -->/images/edittrash.png">
-<br>
-<FONT SIZE=2 face="arial, helvetica">
-<b>Home Branch:</b> <!-- TMPL_VAR NAME="homebranch" --><br>
-<b>Last seen:</b> <!-- TMPL_VAR NAME="datelastseen" --><br>
-<b>Last borrowed:</b> <!-- TMPL_VAR NAME="timestamp0" --><br>
-<!-- on issue bit -->
-<!-- TMPL_VAR NAME="issue" -->
-<!-- after -->
-<b>Last Borrower 1:</b> <!-- TMPL_VAR NAME="card0" --><br>
-<b>Last Borrower 2:</b> <!-- TMPL_VAR NAME="card1" --><br>
-<b>Current Branch:</b> <!-- TMPL_VAR NAME="holdingbranch" --><br>
-<b>Replacement Price:</b> <!-- TMPL_VAR NAME="replacementprice" --><br>
-<b>Item lost:</b> <!-- TMPL_VAR NAME="itemlost" --><br>
-<b>Paid for:</b> <!-- TMPL_VAR NAME="paidfor" --><br>
-<b>Notes:</b> <!-- TMPL_VAR NAME="itemnotes" --><br>
-<b>Renewals:</b> <!-- TMPL_VAR NAME="renewals" --><br>
-<b><a href="/cgi-bin/koha/acqui/acquire.pl?recieve=<!-- TMPL_VAR NAME="ordernumber" -->&biblio=<!-- TMPL_VAR NAME="biblionumber" -->&invoice=<!-- TMPL_VAR NAME="booksellerinvoicenumber" -->&catview=yes">
-Accession</a>
-Date:<!-- TMPL_VAR NAME="dateaccessioned" --><br>
-<b>Cancelled: <!-- TMPL_VAR NAME="wthdrawn" --><br>
-<b><a
-href=/cgi-bin/koha/bookcount.pl?&bib=<!-- TMPL_VAR NAME="biblionumber" -->&bi=<!-- TMPL_VAR NAME="biblioitemnumber" -->&itm=<!-- TMPL_VAR NAME="itemnumber" -->>Total
-Issues:</a></b> <!-- TMPL_VAR NAME="issues" --><br>
-<b>Group Number:</b> <!-- TMPL_VAR NAME="biblioitemnumber" --> <br>
-<b>Biblio number:</b> <!-- TMPL_VAR NAME="biblionumber" --> <br>
-
-
-
-</font>
-</TD>
-</tr>
-</table>
+<div id="bloc25">
+ <h2 class="catalogue">BARCODE <!-- TMPL_VAR NAME="barcode" --></h2>
+ <form action=/cgi-bin/koha/moditem.pl method=post>
+ <input type=hidden name=bibitem value=<!-- TMPL_VAR NAME="biblioitemnumber" -->>
+ <input type=hidden name=item value=<!-- TMPL_VAR NAME="itemnumber" -->>
+ <input type=hidden name=type value=<!-- TMPL_VAR NAME="type" -->>
+ <INPUT TYPE="image" name="submit" VALUE="modify" BORDER=0 src="<!-- TMPL_VAR name="interface" -->/<!-- TMPL_VAR name="theme" -->/images/fileopen.png">
+ <INPUT TYPE="image" name="delete" VALUE="delete" BORDER=0 src="<!-- TMPL_VAR name="interface" -->/<!-- TMPL_VAR name="theme" -->/images/edittrash.png">
+ <br>
+ <b>Home Branch:</b> <!-- TMPL_VAR NAME="homebranch" --><br>
+ <b>Last seen:</b> <!-- TMPL_VAR NAME="datelastseen" --><br>
+ <b>Last borrowed:</b> <!-- TMPL_VAR NAME="timestamp0" --><br>
+ <!-- on issue bit -->
+ <!-- TMPL_VAR NAME="issue" -->
+ <!-- after -->
+ <b>Last Borrower 1:</b> <!-- TMPL_VAR NAME="card0" --><br>
+ <b>Last Borrower 2:</b> <!-- TMPL_VAR NAME="card1" --><br>
+ <b>Current Branch:</b> <!-- TMPL_VAR NAME="holdingbranch" --><br>
+ <b>Replacement Price:</b> <!-- TMPL_VAR NAME="replacementprice" --><br>
+ <b>Item lost:</b> <!-- TMPL_VAR NAME="itemlost" --><br>
+ <b>Paid for:</b> <!-- TMPL_VAR NAME="paidfor" --><br>
+ <b>Notes:</b> <!-- TMPL_VAR NAME="itemnotes" --><br>
+ <b>Renewals:</b> <!-- TMPL_VAR NAME="renewals" --><br>
+ <b><a href="/cgi-bin/koha/acqui/acquire.pl?recieve=<!-- TMPL_VAR NAME="ordernumber" -->&biblio=<!-- TMPL_VAR NAME="biblionumber" -->&invoice=<!-- TMPL_VAR NAME="booksellerinvoicenumber" -->&catview=yes">
+ Accession</a>
+ Date:<!-- TMPL_VAR NAME="dateaccessioned" --><br>
+ <b>Cancelled: <!-- TMPL_VAR NAME="wthdrawn" --><br>
+ <b><a
+ href=/cgi-bin/koha/bookcount.pl?&bib=<!-- TMPL_VAR NAME="biblionumber" -->&bi=<!-- TMPL_VAR NAME="biblioitemnumber" -->&itm=<!-- TMPL_VAR NAME="itemnumber" -->>Total
+ Issues:</a></b> <!-- TMPL_VAR NAME="issues" --><br>
+ <b>Group Number:</b> <!-- TMPL_VAR NAME="biblioitemnumber" --> <br>
+ <b>Biblio number:</b> <!-- TMPL_VAR NAME="biblionumber" --> <br>
+ </h2>
+</div>
</form>
<!-- /TMPL_LOOP -->
</div>
<div id="bloc100">
<form method="post">
+ Select a branch :
<select name="branch">
<option value="">Default</option>
<!-- TMPL_LOOP name="branchloop" -->
-<html>
<!-- clarification needed about this page. many questions... what is Lib? a Library? -->
<!-- TMPL_INCLUDE NAME="parameters-top.inc" -->
+<div id="mainbloc">
<!-- TMPL_IF name="add_form" -->
<!---------------------------------------------------------------------------->
<H1>
</H1>
<form action='<!-- TMPL_VAR name="script_name" -->' name=Aform method=post>
<input type=hidden name=op value='add_validate'>
+ <input type="hidden" name="itemtype" value="<!-- TMPL_VAR name="itemtype" -->">
<table>
<tr><th>Field</th>
- <th>Lib for librarians / for opac</th>
- <th>Repet</th>
- <th>Mand</th>
- <th>Koha field</th>
- <th>Tab</th>
- <th>See also (in searches)</th>
- <th>Authorised value or<br/>
- Thesaurus category</th>
+ <th colspan=2>Constraints</th>
</tr>
<!-- TMPL_LOOP name="loop" -->
- <tr valign=top bgcolor='<!-- TMPL_VAR name="bgcolor" -->'>
- <td><!-- TMPL_VAR name="tagfield" --> - <!-- TMPL_VAR name="tagsubfield" --></td>
- <td><input type=text name="liblibrarian" value="<!-- TMPL_VAR name="liblibrarian" -->" size=40 maxlength=80><br/>
- <input type=text name="libopac" value="<!-- TMPL_VAR name="libopac" -->" size=40 maxlength=80></td>
- <td><!-- TMPL_VAR name="repeatable" --></td>
- <td><!-- TMPL_VAR name="mandatory" --></td>
- <td><!-- TMPL_VAR name="kohafield" --></td>
- <td><!-- TMPL_VAR name="tab" --></td>
- <td><input type="text" name="seealso" value="<!-- TMPL_VAR name="seealso" -->" size=20 maxlength=80></td>
- <td><!-- TMPL_VAR name="authorised_value" --><br/>
- or <!-- TMPL_VAR name="thesaurus_category" --><br/>
- or <!-- TMPL_VAR name="value_builder" --></td>
+ <tr bgcolor='<!-- TMPL_VAR name="bgcolor" -->'>
+ <td>
+ <p><!-- TMPL_VAR name="tagfield" --> - <!-- TMPL_VAR name="tagsubfield" --></p>
+ <p><input type=text name="liblibrarian" value="<!-- TMPL_VAR name="liblibrarian" -->" size=40 maxlength=80></p>
+ <p><input type=text name="libopac" value="<!-- TMPL_VAR name="libopac" -->" size=40 maxlength=80></p>
+ <td>
+ <p><label>Appears in tab:</label> <!-- TMPL_VAR name="tab" --></p>
+ <p><label>Repeatable:</label> <!-- TMPL_VAR name="repeatable" --></p>
+ <p><label>Mandatory:</label><!-- TMPL_VAR name="mandatory" --></p>
+ <p><label>See also:</label> <input type="text" name="seealso" value="<!-- TMPL_VAR name="seealso" -->" size=20 maxlength=80></p>
+ </td>
+ <td>
+ <p><label>Koha link:</label> <!-- TMPL_VAR name="kohafield" --></p>
+ <p><label>Auth value:</label> <!-- TMPL_VAR name="authorised_value" --></p>
+ <p><label>Thesaurus:</label> <!-- TMPL_VAR name="thesaurus_category" --></p>
+ <p><label>plugin:</label> <!-- TMPL_VAR name="value_builder" --></td>
<!-- /TMPL_LOOP -->
</table>
<INPUT type=submit value='OK'>
<!---------------------------------------------------------------------------->
<!-- TMPL_IF name="else" -->
-<h1>MARC subfield structure admin for <!-- TMPL_VAR name="tagfield" --></h1>
+<h1>MARC subfield structure admin for <!-- TMPL_VAR name="tagfield" --> (framework <!--TMPL_VAR name="itemtype" -->)</h1>
<p>This screen shows the subfields associated with the selected tag. You can edit subfields or add a new one by clicking on edit. </p>
<p>The column <b>Koha field</b> shows that the subfield is linked with a Koha field. Koha can manage a MARC interface, or a Koha interface. This link ensures that both DB are synchronized, thus you can change from a MARC to a Koha interface easily.</p>
-<table border=0 cellspacing=0 cellpadding=2 width="80%">
-<tr valign=top bgcolor=#99cc33>
- <td background="<!-- TMPL_VAR NAME='themelang' -->/images/background-mem.gif" width=5%><b>Subfield</b></td>
- <td background="<!-- TMPL_VAR NAME='themelang' -->/images/background-mem.gif" width=30%><b>Lib</b></td>
- <td background="<!-- TMPL_VAR NAME='themelang' -->/images/background-mem.gif" width=10%><b>Koha field</b> <span style="font-size:8;color:red" title="the koha-DB field linked to this subfield">?</span></td>
- <td background="<!-- TMPL_VAR NAME='themelang' -->/images/background-mem.gif" width="8%"><b>Rep</b> <span style="font-size:8;color:red" title="subfield may be repeated (1=yes, 0=no)">?</span></td>
- <td background="<!-- TMPL_VAR NAME='themelang' -->/images/background-mem.gif" width="8%"><b>Mand</b> <span style="font-size:8;color:red" title="subfield is mandatory (1=yes, 0=no)">?</span></td>
- <td background="<!-- TMPL_VAR NAME='themelang' -->/images/background-mem.gif" width="8%"><b>Tab</b> <span style="font-size:8;color:red" title="subfield is shown in which tab (0-9 or item)">?</span></td>
- <td background="<!-- TMPL_VAR NAME='themelang' -->/images/background-mem.gif" width="8%"><b>See also</b> <span style="font-size:8;color:red" title="if subfields entered here, searches on this field will also be done on seealso subfields (syntax 200a,300e)">?</span></td>
- <td background="<!-- TMPL_VAR NAME='themelang' -->/images/background-mem.gif" width="8%"><b>Auth value</b> <span style="font-size:8;color:red" title="values authorised for this subfield">?</span></td>
- <td background="<!-- TMPL_VAR NAME='themelang' -->/images/background-mem.gif" width="8%"><b>Thesaurus</b> <span style="font-size:8;color:red" title="Thesaurus linked to this subfield">?</span></td>
- <td background="<!-- TMPL_VAR NAME='themelang' -->/images/background-mem.gif" width="8%"><b>Val build</b> <span style="font-size:8;color:red" title="Value builder">?</span></td>
- <td background="<!-- TMPL_VAR NAME='themelang' -->/images/background-mem.gif" width="8%">Delete</td>
+<table>
+<tr>
+ <th>Subfield</th>
+ <th>Lib</th>
+ <th>Koha field<span style="font-size:8;color:red" title="the koha-DB field linked to this subfield">?</span></th>
+ <th>Rep<span style="font-size:8;color:red" title="subfield may be repeated (1=yes, 0=no)">?</span></th>
+ <th>Mand <span style="font-size:8;color:red" title="subfield is mandatory (1=yes, 0=no)">?</span></th>
+ <th>Tab <span style="font-size:8;color:red" title="subfield is shown in which tab (0-9 or item)">?</span></th>
+ <th>See also<span style="font-size:8;color:red" title="if subfields entered here, searches on this field will also be done on seealso subfields (syntax 200a,300e)">?</span></th>
+ <th>Auth value<span style="font-size:8;color:red" title="values authorised for this subfield">?</span></th>
+ <th>Thesaurus<span style="font-size:8;color:red" title="Thesaurus linked to this subfield">?</span></th>
+ <th>Val build<span style="font-size:8;color:red" title="Value builder">?</span></th>
+ <th>Delete</th>
<!-- TMPL_LOOP name="loop" -->
-<tr valign=top bgcolor='<!-- TMPL_VAR name="bgcolor" -->'>
+<tr bgcolor='<!-- TMPL_VAR name="bgcolor" -->'>
<td><!-- TMPL_VAR name="tagsubfield" --></td>
<td><!-- TMPL_VAR name="liblibrarian" --></td>
<td><!-- TMPL_VAR name="kohafield" --></td>
</tr>
<!-- /TMPL_LOOP -->
</table>
-<table width=60%>
- <tr>
- <td width="25%"><!-- TMPL_VAR name="edit" --><img src="<!-- TMPL_VAR NAME='interface' -->/<!-- TMPL_VAR name="theme" -->/images/fileopen.png" width=32 hspace=0 vspace=0 border=0></a></td>
- <td width="25%"><a href="marctagstructure.pl?searchfield=<!-- TMPL_VAR name="tagfield" -->"><img src="<!-- TMPL_VAR NAME='interface' -->/<!-- TMPL_VAR name="theme" -->/images/2uparrow.png" width=32 hspace=0 vspace=0 border=0></a></td>
- <td width="25%"><!-- TMPL_IF name="previous" --><input type=image src="<!-- TMPL_VAR NAME='interface' -->/<!-- TMPL_VAR name="theme" -->/images/1leftarrow.png" title="previous" ALT="previous" BORDER=0 ></a><!-- /TMPL_IF --></td>
- <td width="25%"><!-- TMPL_IF name="next" --><!-- TMPL_VAR name="next" --><input type=image src="<!-- TMPL_VAR NAME='interface' -->/<!-- TMPL_VAR name="theme" -->/images/1rightarrow.png" title="next" ALT="next" BORDER=0></a><!-- /TMPL_IF --></td>
- </tr>
-</table>
+<!-- TMPL_VAR name="edit" -->
+ <img src="<!-- TMPL_VAR NAME='interface' -->/<!-- TMPL_VAR name="theme" -->/images/fileopen.png" width=32 hspace=0 vspace=0 border=0>
+</a>
+<a href="marctagstructure.pl?searchfield=<!-- TMPL_VAR name="tagfield" -->">
+ <img src="<!-- TMPL_VAR NAME='interface' -->/<!-- TMPL_VAR name="theme" -->/images/2uparrow.png" width=32 hspace=0 vspace=0 border=0>
+</a>
+<!-- TMPL_IF name="previous" -->
+ <input type=image src="<!-- TMPL_VAR NAME='interface' -->/<!-- TMPL_VAR name="theme" -->/images/1leftarrow.png" title="previous" ALT="previous" BORDER=0 >
+ </a><!-- /TMPL_IF -->
+<!-- TMPL_IF name="next" -->
+ <!-- TMPL_VAR name="next" -->
+ <input type=image src="<!-- TMPL_VAR NAME='interface' -->/<!-- TMPL_VAR name="theme" -->/images/1rightarrow.png" title="next" ALT="next" BORDER=0>
+ </a>
<!-- /TMPL_IF -->
+<!-- /TMPL_IF -->
+
+</div>
<!-- TMPL_INCLUDE NAME="parameters-bottom.inc" -->
-</html>
<!-- TMPL_INCLUDE NAME="parameters-top.inc" -->
+<div id="mainbloc">
+<h1 class="parameters">MARC tag structure admin for <!-- TMPL_IF name="itemtype" --><!-- TMPL_VAR name="itemtype" --><!-- TMPL_ELSE -->default MARC framework<!-- /TMPL_IF --></h1>
<script>
function _(s) { return s } // dummy function for gettext
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
<!-- TMPL_IF name="add_form" -->
<!---------------------------------------------------------------------------->
- <h1>
+ <h1 class="parameters">
<!-- TMPL_IF NAME="use-heading-flags-p" -->
<!-- TMPL_IF NAME="heading-modify-tag-p" -->Modify tag<!-- /TMPL_IF -->
<!-- TMPL_IF NAME="heading-add-tag-p" -->Add tag<!-- /TMPL_IF -->
<!-- TMPL_ELSE --><!-- TMPL_VAR name="action" --><!-- /TMPL_IF -->
</h1>
<form action='<!-- TMPL_VAR name="script_name" -->' name="Aform" method="post">
- <input type=hidden name=op value='add_validate'>
- <table>
- <tr><td>Tag</td><td><!-- TMPL_VAR name="searchfield" --></td></tr>
- <tr><td>Lib for librarians</td><td><input type="text" name="liblibrarian" value='<!-- TMPL_VAR name="liblibrarian" escape=HTML -->' size=80 maxlength=100></td></tr>
- <tr><td>Lib for opac</td><td><input type="text" name="libopac" value='<!-- TMPL_VAR name="libopac" escape=HTML -->' size=80 maxlength=100></td></tr>
- <tr><td>Repeatable</td><td><!-- TMPL_VAR name="repeatable" --></td></tr>
- <tr><td>Mandatory</td><td><!-- TMPL_VAR name="mandatory" --></td></tr>
- <tr><td>Authorised value</td><td><!-- TMPL_VAR name="authorised_value" --> (if you select a value here, the indicators will be limited to the authorised value list)</td></tr>
- <tr><td> </td><td><INPUT type="button" value='OK' onClick='Check(this.form)'></td></tr>
- </table>
+ <input type=hidden name=op value='add_validate'>
+ <input type="hidden" name="itemtype" value="<!-- TMPL_VAR name="itemtype" -->">
+ <p><label>Tag<label><!-- TMPL_VAR name="searchfield" --></p>
+ <p><label>Lib for librarians</label><input type="text" name="liblibrarian" value='<!-- TMPL_VAR name="liblibrarian" escape=HTML -->' size=80 maxlength=100></p>
+ <p><label>Lib for opac</label><input type="text" name="libopac" value='<!-- TMPL_VAR name="libopac" escape=HTML -->' size=80 maxlength=100></p>
+ <p><label>Repeatable</label><!-- TMPL_VAR name="repeatable" --></p>
+ <p><label>Mandatory</label><!-- TMPL_VAR name="mandatory" --></p>
+ <p><label>Authorised value</label><!-- TMPL_VAR name="authorised_value" --> (if you select a value here, the indicators will be limited to the authorised value list)</p>
+ <p><label> </label><input type="button" value='OK' class="button" onClick='Check(this.form)'></p>
</form>
<!-- /TMPL_IF -->
<!-- TMPL_IF name="delete_confirm" -->
<!---------------------------------------------------------------------------->
-<table border=0 cellspacing=0 cellpadding=2>
- <tr valign=top bgcolor=#99cc33>
- <td background="<!-- TMPL_VAR name="themelang" -->/images/background-mem.gif"><b>tag</b></td>
- <td background="<!-- TMPL_VAR name="themelang" -->/images/background-mem.gif"><b><!-- TMPL_VAR name="searchfield" --></b></td>
+<table>
+ <tr>
+ <td>tag</td>
+ <td><!-- TMPL_VAR name="searchfield" --></td>
</tr>
<tr><td> </td><td><!-- TMPL_VAR name="liblibrarian" --></td></tr>
<form action='<!-- TMPL_VAR name="script_name" -->' method=post><input type=hidden name=op value=delete_confirmed><input type=hidden name=searchfield value='<!-- TMPL_VAR name="searchfield" -->'>
<input type=submit value=OK>
</form>
<!-- /TMPL_IF -->
+<!-- TMPL_IF name="itemtype_create" -->
+<!---------------------------------------------------------------------------->
+ <form action='<!-- TMPL_VAR name="script_name" -->' method=post>
+ <input type="hidden" name="op" value="itemtype_create_confirm">
+ <input type="hidden" name="itemtype" value="<!-- TMPL_VAR name="itemtype" -->">
+ Create itemtype framework for <!-- TMPL_VAR name="itemtype" --> (<!-- TMPL_VAR name="ITdescription" -->) using
+ <select name="existingitemtype">
+ <option value="">Default</option>
+ <!-- TMPL_LOOP name="existingitemtypeloop" -->
+ <option value="<!-- TMPL_VAR name="value" -->"><!-- TMPL_VAR name="description" --></option>
+ <!-- /TMPL_LOOP -->
+ </select>
+ <input type=submit value="OK" class="button">
+ </form>
+<!-- /TMPL_IF -->
<!---------------------------------------------------------------------------->
<!-- TMPL_IF name="else" -->
-<h1>MARC tag structure admin</h1>
-<b>NOTE : if you change the link between a MARC subfield and a non-MARC field, ask your administrator to run misc/rebuildnonmarc.pl script.</b>
+<div id="bloc25">
+<h2 class="parameters">Select an itemtype</h2>
<form action='<!-- TMPL_VAR name="script_name" -->' method=post>
- <input type=text name=searchfield value="">
- <input type=reset name=reset value="clr">
+ <select name="itemtype">
+ <option value="">Default</option>
+ <!-- TMPL_LOOP name="itemtypeloop" -->
+ <option value="<!-- TMPL_VAR name="value" -->" <!-- TMPL_IF name="selected" -->selected<!-- /TMPL_IF -->><!-- TMPL_VAR name="description" --></option>
+ <!-- /TMPL_LOOP -->
+ </select>
+ <input type=text name=searchfield value="<!-- TMPL_VAR name="searchfield" -->">
+ <input type="submit" value="OK" class="button">
</form>
-<!-- TMPL_VAR name="searchfield" -->
-<table border=0 cellspacing=0 cellpadding=2>
-<tr valign=top bgcolor=#99cc33>
- <td background="<!-- TMPL_VAR name="themelang" -->/images/background-mem.gif"><b>Tag</b></td>
- <td background="<!-- TMPL_VAR name="themelang" -->/images/background-mem.gif"><b>Lib</b></td>
- <td background="<!-- TMPL_VAR name="themelang" -->/images/background-mem.gif"><b>Repeatable</b></td>
- <td background="<!-- TMPL_VAR name="themelang" -->/images/background-mem.gif"><b>Mandatory</b></td>
- <td background="<!-- TMPL_VAR name="themelang" -->/images/background-mem.gif"><b>Authorised<br />value</b></td>
- <td background="<!-- TMPL_VAR name="themelang" -->/images/background-mem.gif"><b>Subfields</b></td>
- <td background="<!-- TMPL_VAR name="themelang" -->/images/background-mem.gif">Edit</td>
- <td background="<!-- TMPL_VAR name="themelang" -->/images/background-mem.gif">Delete</td>
-<!-- TMPL_LOOP name="loop" -->
-<tr valign=top bgcolor='<!-- TMPL_VAR name="bgcolor" -->'>
- <td><b><!-- TMPL_VAR name="tagfield" --></b></td>
- <td><!-- TMPL_VAR name="liblibrarian" --></td>
- <td><!-- TMPL_IF name="repeatable" -->Yes<!-- TMPL_ELSE -->No<!-- /TMPL_IF --></td>
- <td><!-- TMPL_IF name="mandatory" -->Yes<!-- TMPL_ELSE -->No<!-- /TMPL_IF --></td>
- <td><!-- TMPL_VAR name="authorised_value" --></td>
- <td><a href="<!-- TMPL_VAR name="subfield_link" -->">subfields</a></td>
- <td><a href="<!-- TMPL_VAR name="edit" -->"><img src="<!-- TMPL_VAR name="interface" -->/<!-- TMPL_VAR name="theme" -->/images/fileopen.png" width=32 hspace=0 vspace=0 border=0></a></td>
- <td><a href="<!-- TMPL_VAR name="delete" -->"><img src="<!-- TMPL_VAR name="interface" -->/<!-- TMPL_VAR name="theme" -->/images/edittrash.png" width=32 hspace=0 vspace=0 border=0></a></td>
-</tr>
-<!-- /TMPL_LOOP -->
-<form action='<!-- TMPL_VAR name="script_name" -->' method=post>
-<input type=hidden name=op value=add_form>
-</table>
- <form action='<!-- TMPL_VAR name="script_name" -->' method=post>
- <input type=hidden name=op value=add_form>
-<table width=40%>
+<b>NOTE : if you change the link between a MARC subfield and a non-MARC field, ask your administrator to run misc/rebuildnonmarc.pl script.</b>
+</div>
+<div id="bloc100">
+ <table>
<tr>
- <td width="33%">
- <input type=submit class="button" value="Add Tag" title="Add Tag" alt="Add Tag" >
- </td>
- <td width=33%>
- <!-- TMPL_IF name="isprevpage" -->
- <a href="<!-- TMPL_VAR name="script_name" -->?offset=<!-- TMPL_VAR name="prevpage" -->&searchfield=<!-- TMPL_VAR name="searchfield" -->">
- <input type=image src="<!-- TMPL_VAR name="interface" -->/<!-- TMPL_VAR name="theme" -->/images/1leftarrow.png" title="previous" ALT="previous" BORDER=0>
- </a>
- <!-- /TMPL_IF -->
- </td>
- <td width=33%>
- <!-- TMPL_IF name="nextpage" -->
- <a href="<!-- TMPL_VAR name="script_name" -->?offset=<!-- TMPL_VAR name="nextpage" -->&searchfield=<!-- TMPL_VAR name="searchfield" -->">
- <input type=image src="<!-- TMPL_VAR name="interface" -->/<!-- TMPL_VAR name="theme" -->/images/1rightarrow.png" title="next" ALT="next" BORDER=0>
- </a>
- <!-- /TMPL_IF -->
- </td>
+ <th>Tag</th>
+ <th>Lib</th>
+ <th>Repeatable</th>
+ <th>Mandatory</th>
+ <th>Authorised<br />value</th>
+ <th>Subfields</th>
+ <th>Edit</th>
+ <th>Delete</th>
+ <!-- TMPL_LOOP name="loop" -->
+ <tr valign=top bgcolor='<!-- TMPL_VAR name="bgcolor" -->'>
+ <td><b><!-- TMPL_VAR name="tagfield" --></b></td>
+ <td><!-- TMPL_VAR name="liblibrarian" --></td>
+ <td><!-- TMPL_IF name="repeatable" -->Yes<!-- TMPL_ELSE -->No<!-- /TMPL_IF --></td>
+ <td><!-- TMPL_IF name="mandatory" -->Yes<!-- TMPL_ELSE -->No<!-- /TMPL_IF --></td>
+ <td><!-- TMPL_VAR name="authorised_value" --></td>
+ <td><a href="<!-- TMPL_VAR name="subfield_link" -->" class="button">subfields</a></td>
+ <td><a href="<!-- TMPL_VAR name="edit" -->"><img src="<!-- TMPL_VAR name="interface" -->/<!-- TMPL_VAR name="theme" -->/images/fileopen.png" width=32 hspace=0 vspace=0 border=0></a></td>
+ <td><a href="<!-- TMPL_VAR name="delete" -->"><img src="<!-- TMPL_VAR name="interface" -->/<!-- TMPL_VAR name="theme" -->/images/edittrash.png" width=32 hspace=0 vspace=0 border=0></a></td>
</tr>
-</table>
-</form>
+ <!-- /TMPL_LOOP -->
+ <form action='<!-- TMPL_VAR name="script_name" -->' method=post>
+ <input type=hidden name=op value=add_form>
+ </table>
+ <form action='<!-- TMPL_VAR name="script_name" -->' method=post>
+ <input type=hidden name=op value=add_form>
+ <input type=submit class="button" value="Add Tag" title="Add Tag" alt="Add Tag" >
+ <!-- TMPL_IF name="isprevpage" -->
+ <a href="<!-- TMPL_VAR name="script_name" -->?offset=<!-- TMPL_VAR name="prevpage" -->&searchfield=<!-- TMPL_VAR name="searchfield" -->">
+ <input type=image src="<!-- TMPL_VAR name="interface" -->/<!-- TMPL_VAR name="theme" -->/images/1leftarrow.png" title="previous" ALT="previous" BORDER=0>
+ </a>
+ <!-- /TMPL_IF -->
+ <!-- TMPL_IF name="nextpage" -->
+ <a href="<!-- TMPL_VAR name="script_name" -->?offset=<!-- TMPL_VAR name="nextpage" -->&searchfield=<!-- TMPL_VAR name="searchfield" -->">
+ <input type=image src="<!-- TMPL_VAR name="interface" -->/<!-- TMPL_VAR name="theme" -->/images/1rightarrow.png" title="next" ALT="next" BORDER=0>
+ </a>
+ <!-- /TMPL_IF -->
+ </form>
+</div>
<!-- /TMPL_IF -->
+</div>
<!-- TMPL_INCLUDE NAME="parameters-bottom.inc" -->