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 78-88
if ($bib_list && $format) {
Link Here
|
78 |
elsif ($format eq 'bibtex') { |
79 |
elsif ($format eq 'bibtex') { |
79 |
$output .= marc2bibtex($record, $biblionumber); |
80 |
$output .= marc2bibtex($record, $biblionumber); |
80 |
} |
81 |
} |
|
|
82 |
elsif ($format =~ /^xsl\.(.*)$/) { |
83 |
$output .= XSLTParse4Display($biblio, $record, 'XSLTCustomExport', 1, undef, , '', $1, ''); |
84 |
} |
81 |
} |
85 |
} |
82 |
} |
86 |
} |
83 |
|
87 |
|
84 |
# If it was a CSV export we change the format after the export so the file extension is fine |
88 |
# If it was a CSV export we change the format after the export so the file extension is fine |
85 |
$format = "csv" if ($format =~ m/^\d+$/); |
89 |
$format = "csv" if ($format =~ m/^\d+$/); |
|
|
90 |
$format = "html" if ($format =~ /^xsl\./); |
86 |
|
91 |
|
87 |
print $query->header( |
92 |
print $query->header( |
88 |
-type => 'application/octet-stream', |
93 |
-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 |
} |