@@ -, +, @@ 1) Search for an item in OPAC 2) Open OPAC detail 3) Click 'MARC View' link 4) Look for something with multiple lines (e.g. 260 or 942) 5) In another tab, Go to staff client and log in 6) Go to the staff client URL similar to: /cgi-bin/koha/catalogue/detail.pl?biblionumber=##### page where ##### is the biblionumber. 7) Edit -> record 8) Note the framework used. 9) More -> Administration shown in OPAC. OPAC tab --- opac/opac-MARCdetail.pl | 62 +++++++++++++++++++++++++++------------------- 1 files changed, 36 insertions(+), 26 deletions(-) --- a/opac/opac-MARCdetail.pl +++ a/opac/opac-MARCdetail.pl @@ -1,26 +1,28 @@ #!/usr/bin/perl -# Copyright 2000-2002 Katipo Communications -# Parts copyright 2010 BibLibre -# # This file is part of Koha. # -# Koha is free software; you can redistribute it and/or modify it under the -# terms of the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or (at your option) any later -# version. +# Copyright (C) 2000-2002 Katipo Communications +# Parts Copyright (C) 2010 BibLibre +# Parts Copyright (C) 2013 Mark Tompsett +# +# Koha is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. # -# Koha is distributed in the hope that it will be useful, but WITHOUT ANY -# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR -# A PARTICULAR PURPOSE. See the GNU General Public License for more details. +# Koha is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. # -# You should have received a copy of the GNU General Public License along -# with Koha; if not, write to the Free Software Foundation, Inc., -# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# You should have received a copy of the GNU General Public License +# along with Koha; if not, see . + =head1 NAME -MARCdetail.pl : script to show a biblio in MARC format +opac-MARCdetail.pl : script to show a biblio in MARC format =head1 SYNOPSIS @@ -41,8 +43,7 @@ the items attached to the biblio =cut -use strict; -use warnings; +use Modern::Perl; use C4::Auth; use C4::Context; @@ -172,12 +173,20 @@ for ( my $tabloop = 0 ; $tabloop <= 9 ; $tabloop++ ) { # loop through each subfield for my $i ( 0 .. $#subf ) { $subf[$i][0] = "@" unless defined($subf[$i][0]); - my $sf_def = $tagslib->{ $fields[$x_i]->tag() }->{ $subf[$i][0] }; - next if ( ($sf_def->{tab}||0) != $tabloop ); - next if ( ($sf_def->{hidden}||0) > 0 ); + my $sf_def = $tagslib->{ $fields[$x_i]->tag() }; + $sf_def = $sf_def->{ $subf[$i][0] } if defined($sf_def); + my ($tab,$hidden,$lib); + $tab = $sf_def->{tab} if defined($sf_def); + $tab = $tab // int($fields[$x_i]->tag()/100); + $hidden = $sf_def->{hidden} if defined($sf_def); + $hidden = $hidden // 0; + next if ( $tab != $tabloop ); + next if ( $hidden > 0 ); my %subfield_data; - $subfield_data{marc_lib} = ($sf_def->{lib} eq $previous) ? '--' : $sf_def->{lib}; - $previous = $sf_def->{lib}; + $lib = $sf_def->{lib} if defined($sf_def); + $lib = $lib // '--'; + $subfield_data{marc_lib} = ($lib eq $previous) ? '--' : $lib; + $previous = $lib; $subfield_data{link} = $sf_def->{link}; $subf[$i][1] =~ s/\n//g; if ( $sf_def->{isurl} ) { @@ -211,12 +220,13 @@ for ( my $tabloop = 0 ; $tabloop <= 9 ; $tabloop++ ) { $tag_data{tag} = $tagslib->{ $fields[$x_i]->tag() }->{lib}; } else { - $tag_data{tag} = - $fields[$x_i]->tag() - . ' ' + my $sf_def = $tagslib->{ $fields[$x_i]->tag() }; + my $lib; + $lib = $sf_def->{lib} if defined($sf_def); + $lib = $lib // ''; + $tag_data{tag} = $fields[$x_i]->tag() . ' ' . C4::Koha::display_marc_indicators($fields[$x_i]) - . ' - ' - . $tagslib->{ $fields[$x_i]->tag() }->{lib}; + . " - $lib"; } } my @tmp = @subfields_data; --