3 # Copyright 2008-2009 LibLime
5 # This file is part of Koha.
7 # Koha is free software; you can redistribute it and/or modify it under the
8 # terms of the GNU General Public License as published by the Free Software
9 # Foundation; either version 2 of the License, or (at your option) any later
12 # Koha is distributed in the hope that it will be useful, but WITHOUT ANY
13 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
14 # A PARTICULAR PURPOSE. See the GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License along with
17 # Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
18 # Suite 330, Boston, MA 02111-1307 USA
28 use C4
::Search
; # enabled_staff_search_views
31 my $dbh = C4
::Context
->dbh;
32 my $biblionumber = $query->param('biblionumber');
33 my $frameworkcode = $query->param('frameworkcode');
34 $frameworkcode = GetFrameworkCode
( $biblionumber ) unless ($frameworkcode);
36 $query->param('popup')
37 ; # if set to 1, then don't insert links, it's just to show the biblio
39 my $tagslib = GetMarcStructure
(1,$frameworkcode);
40 my $record = GetMarcBiblio
($biblionumber);
41 my $biblio = GetBiblioData
($biblionumber);
43 my ( $template, $loggedinuser, $cookie ) = get_template_and_user
(
45 template_name
=> "catalogue/labeledMARCdetail.tmpl",
49 flagsrequired
=> { catalogue
=> 1 },
54 $template->param( count
=> 1, bibliotitle
=> $biblio->{title
} );
56 #Getting the list of all frameworks
58 $dbh->prepare("select frameworktext, frameworkcode from biblio_framework");
63 push @select_fwk, "Default";
64 $select_fwk{"Default"} = "Default";
66 while ( my ( $description, $fwk ) = $queryfwk->fetchrow ) {
67 push @select_fwk, $fwk;
68 $select_fwk{$fwk} = $description;
70 $curfwk=$frameworkcode;
71 my $framework=CGI
::scrolling_list
( -name
=> 'Frameworks',
74 -OnChange
=> 'Changefwk(this);',
75 -values => \
@select_fwk,
76 -labels
=> \
%select_fwk,
79 $template->param(framework
=> $framework);
83 for my $field ($record->fields)
85 my $tag = $field->tag;
86 next if ! exists $tagslib->{$tag}->{lib
};
87 my $label = $tagslib->{$tag}->{lib
};
88 if ($label eq $prevlabel)
98 : join ' ', map { $_->[1] } $field->subfields;
106 marc_data
=> \
@marc_data,
107 biblionumber
=> $biblionumber,
109 labeledmarcview
=> 1,
110 z3950_search_params
=> C4
::Search
::z3950_search_args
($biblio),
111 C4
::Search
::enabled_staff_search_views
,
114 output_html_with_http_headers
$query, $cookie, $template->output;