|
Lines 26-31
use C4::Auth qw( get_template_and_user );
Link Here
|
| 26 |
use C4::Output qw( output_html_with_http_headers ); |
26 |
use C4::Output qw( output_html_with_http_headers ); |
| 27 |
use C4::Record; |
27 |
use C4::Record; |
| 28 |
use C4::Ris qw( marc2ris ); |
28 |
use C4::Ris qw( marc2ris ); |
|
|
29 |
use C4::XSLT; |
| 29 |
|
30 |
|
| 30 |
use Koha::CsvProfiles; |
31 |
use Koha::CsvProfiles; |
| 31 |
use Koha::Biblios; |
32 |
use Koha::Biblios; |
|
Lines 77-87
if ( $bib_list && $format ) {
Link Here
|
| 77 |
} elsif ( $format eq 'bibtex' ) { |
78 |
} elsif ( $format eq 'bibtex' ) { |
| 78 |
$output .= marc2bibtex( $record, $biblionumber ); |
79 |
$output .= marc2bibtex( $record, $biblionumber ); |
| 79 |
} |
80 |
} |
|
|
81 |
elsif ($format =~ /^xsl\.(.*)$/) { |
| 82 |
$output .= XSLTParse4Display($biblio, $record, 'XSLTCustomExport', 1, undef, , '', $1, ''); |
| 83 |
} |
| 80 |
} |
84 |
} |
| 81 |
} |
85 |
} |
| 82 |
|
86 |
|
| 83 |
# If it was a CSV export we change the format after the export so the file extension is fine |
87 |
# If it was a CSV export we change the format after the export so the file extension is fine |
| 84 |
$format = "csv" if ( $format =~ m/^\d+$/ ); |
88 |
$format = "csv" if ( $format =~ m/^\d+$/ ); |
|
|
89 |
$format = "html" if ( $format =~ /^xsl\./ ); |
| 85 |
|
90 |
|
| 86 |
print $query->header( |
91 |
print $query->header( |
| 87 |
-type => 'application/octet-stream', |
92 |
-type => 'application/octet-stream', |
|
Lines 92-97
if ( $bib_list && $format ) {
Link Here
|
| 92 |
|
97 |
|
| 93 |
} else { |
98 |
} else { |
| 94 |
$template->param( csv_profiles => Koha::CsvProfiles->search( { type => 'marc', used_for => 'export_records' } ) ); |
99 |
$template->param( csv_profiles => Koha::CsvProfiles->search( { type => 'marc', used_for => 'export_records' } ) ); |
|
|
100 |
$template->param( xsl_exports => CustomXSLTExportList() ); |
| 95 |
$template->param( bib_list => $bib_list ); |
101 |
$template->param( bib_list => $bib_list ); |
| 96 |
output_html_with_http_headers $query, $cookie, $template->output; |
102 |
output_html_with_http_headers $query, $cookie, $template->output; |
| 97 |
} |
103 |
} |