From b02dc10f6e44b46569b853ab73e397c04c9d3ab1 Mon Sep 17 00:00:00 2001 From: tipaul Date: Mon, 3 Jan 2005 12:56:30 +0000 Subject: [PATCH] * partial support of the "linkage" MARC feature : if you enter a "link" on a MARC subfield, the magnifying glass won't search on the field, but on the linked field. I agree it's a partial support. Will be improved, but I need to investigate MARC21 & UNIMARC diffs on this topic. --- MARCdetail.pl | 4 ++-- admin/marc_subfields_structure.pl | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/MARCdetail.pl b/MARCdetail.pl index 22e0282af8..f1b1f5d216 100755 --- a/MARCdetail.pl +++ b/MARCdetail.pl @@ -73,7 +73,6 @@ my $itemtype = &MARCfind_frameworkcode($dbh,$bibid); my $tagslib = &MARCgettagslib($dbh,1,$itemtype); my $record =MARCgetbiblio($dbh,$bibid); -warn "=>".$record->as_formatted; # open template my ($template, $loggedinuser, $cookie) = get_template_and_user({template_name => "catalogue/MARCdetail.tmpl", @@ -95,7 +94,7 @@ for (my $tabloop = 0; $tabloop<=10;$tabloop++) { # foreach my $field (@fields) { my @subfields_data; for (my $x_i=0;$x_i<=$#fields;$x_i++) { - warn "$tabloop => $x_i"; +# warn "$tabloop => $x_i"; # if tag <10, there's no subfield, use the "@" trick if ($fields[$x_i]->tag()<10) { next if ($tagslib->{$fields[$x_i]->tag()}->{'@'}->{tab} ne $tabloop); @@ -115,6 +114,7 @@ for (my $tabloop = 0; $tabloop<=10;$tabloop++) { next if ($tagslib->{$fields[$x_i]->tag()}->{$subf[$i][0]}->{hidden}); my %subfield_data; $subfield_data{marc_lib}=$tagslib->{$fields[$x_i]->tag()}->{$subf[$i][0]}->{lib}; + $subfield_data{link}=$tagslib->{$fields[$x_i]->tag()}->{$subf[$i][0]}->{link}; if ($tagslib->{$fields[$x_i]->tag()}->{$subf[$i][0]}->{isurl}) { $subfield_data{marc_value}="$subf[$i][1]"; } else { diff --git a/admin/marc_subfields_structure.pl b/admin/marc_subfields_structure.pl index 1686929685..128575d064 100755 --- a/admin/marc_subfields_structure.pl +++ b/admin/marc_subfields_structure.pl @@ -379,6 +379,7 @@ if ($op eq 'add_form') { $row_data{value_builder} = $results->[$i]{'value_builder'}; $row_data{hidden} = $results->[$i]{'hidden'}; $row_data{isurl} = $results->[$i]{'isurl'}; + $row_data{link} = $results->[$i]{'link'}; $row_data{delete} = "$script_name?op=delete_confirm&tagfield=$tagfield&tagsubfield=".$results->[$i]{'tagsubfield'}."&frameworkcode=$frameworkcode"; $row_data{bgcolor} = $toggle; if ($row_data{tab} eq -1) { -- 2.39.5