10 use C4
::Languages
qw(getTranslatedLanguages);
13 my ($template, $borrowernumber, $cookie)
14 = get_template_and_user
({template_name
=> "opac-detail.tmpl",
18 flagsrequired
=> {borrow
=> 1},
22 my @languages_options = getTranslatedLanguages
($query);
23 my $languages_count = @languages_options;
24 if($languages_count > 1){
25 $template->param(languages
=> \
@languages_options);
27 my $biblionumber=$query->param('biblionumber');
28 $template->param(biblionumber
=> $biblionumber);
30 # grab the XML, run it through our stylesheet, push it out to the browser
31 my $xmlrecord = GetXmlBiblio
($biblionumber);
32 #my $xslfile = "/home/kohacat/etc/xslt/MARC21slim2HTML.xsl";
33 #my $xslfile = "/home/kohacat/etc/xslt/MARC21slim2English.xsl";
34 my $xslfile = C4
::Context
->config('intranetdir')."/koha-tmpl/intranet-tmpl/prog/en/xslt/compact.xsl";
35 my $parser = XML
::LibXML
->new();
36 my $xslt = XML
::LibXSLT
->new();
37 my $source = $parser->parse_string($xmlrecord);
38 my $style_doc = $parser->parse_file($xslfile);
39 my $stylesheet = $xslt->parse_stylesheet($style_doc);
40 my $results = $stylesheet->transform($source);
41 my $newxmlrecord = $stylesheet->output_string($results);
42 print "Content-type: text/html\n\n";