=head1 DESCRIPTION
-This script needs a biblionumber in bib parameter (bibnumber from koha style DB. Automaticaly maps to marc biblionumber).
-It shows the biblio in a (nice) MARC format depending on MARC parameters tables.
-The template is in <templates_dir>/catalogue/MARCdetail.tmpl. this template must be divided in 11 "tabs".
-The 10 firsts presents the biblio, the 11th one presents the items attached to the biblio
+This script needs a biblionumber in bib parameter (bibnumber
+from koha style DB. Automaticaly maps to marc biblionumber).
+
+It shows the biblio in a (nice) MARC format depending on MARC
+parameters tables.
+
+The template is in <templates_dir>/catalogue/MARCdetail.tmpl.
+this template must be divided into 11 "tabs".
+
+The first 10 tabs present the biblio, the 11th one presents
+the items attached to the biblio
=head1 FUNCTIONS
use strict;
require Exporter;
+use C4::Auth;
use C4::Context;
use C4::Output;
+use C4::Interface::CGI::Output;
use CGI;
use C4::Search;
use MARC::Record;
my $tagslib = &MARCgettagslib($dbh,1);
my $record =MARCgetbiblio($dbh,$bibid);
+#warn $record->as_formatted();
# open template
-my $template = gettemplate("catalogue/MARCdetail.tmpl",0);
+my ($template, $loggedinuser, $cookie)
+ = get_template_and_user({template_name => "catalogue/MARCdetail.tmpl",
+ query => $query,
+ type => "intranet",
+ authnotrequired => 0,
+ flagsrequired => {catalogue => 1},
+ debug => 1,
+ });
+
# fill arrays
my @loop_data =();
my $tag;
item_header_loop => \@header_value_loop,
biblionumber => $biblionumber,
bibid => $bibid);
-print "Content-Type: text/html\n\n", $template->output;
+output_html_with_http_headers $query, $cookie, $template->output;