View | Details | Raw Unified | Return to bug 13695
Collapse All | Expand All

(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-downloadcart.tt (+1 lines)
Lines 14-19 Link Here
14
                                <option value="">-- Choose format --</option>
14
                                <option value="">-- Choose format --</option>
15
                                <option value="ris">RIS (Zotero, EndNote, others)</option>
15
                                <option value="ris">RIS (Zotero, EndNote, others)</option>
16
                                <option value="bibtex">BibTeX</option>
16
                                <option value="bibtex">BibTeX</option>
17
                                <option value="isbd">ISBD</option>
17
                                <option value="iso2709">MARC</option>
18
                                <option value="iso2709">MARC</option>
18
                                [% FOREACH csv_profile IN csv_profiles %]
19
                                [% FOREACH csv_profile IN csv_profiles %]
19
                                    <option value="[% csv_profile.export_format_id %]">CSV - [% csv_profile.profile %]</option>
20
                                    <option value="[% csv_profile.export_format_id %]">CSV - [% csv_profile.profile %]</option>
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-downloadshelf.tt (+1 lines)
Lines 53-58 Link Here
53
                                            <option value="">-- Choose format --</option>
53
                                            <option value="">-- Choose format --</option>
54
                                            <option value="ris">RIS (Zotero, EndNote, others)</option>
54
                                            <option value="ris">RIS (Zotero, EndNote, others)</option>
55
                                            <option value="bibtex">BibTeX</option>
55
                                            <option value="bibtex">BibTeX</option>
56
                                            <option value="isbd">ISBD</option>
56
                                            <option value="iso2709">MARC</option>
57
                                            <option value="iso2709">MARC</option>
57
                                            [% FOREACH csv_profile IN csv_profiles %]
58
                                            [% FOREACH csv_profile IN csv_profiles %]
58
                                            <option value="[% csv_profile.export_format_id |html %]">CSV - [% csv_profile.profile |html %]</option>
59
                                            <option value="[% csv_profile.export_format_id |html %]">CSV - [% csv_profile.profile |html %]</option>
(-)a/opac/opac-downloadcart.pl (-4 / +12 lines)
Lines 52-59 if ($bib_list && $format) { Link Here
52
52
53
    my @bibs = split( /\//, $bib_list );
53
    my @bibs = split( /\//, $bib_list );
54
54
55
    my $marcflavour         = C4::Context->preference('marcflavour');
55
    my $marcflavour = C4::Context->preference('marcflavour');
56
    my $output;
56
    my $output;
57
    my $extension;
58
    my $type;
57
59
58
    # CSV   
60
    # CSV   
59
    if ($format =~ /^\d+$/) {
61
    if ($format =~ /^\d+$/) {
Lines 76-81 if ($bib_list && $format) { Link Here
76
            elsif ($format eq 'bibtex') {
78
            elsif ($format eq 'bibtex') {
77
                $output .= marc2bibtex($record, $biblio);
79
                $output .= marc2bibtex($record, $biblio);
78
            }
80
            }
81
            elsif ( $format eq 'isbd' ) {
82
                $output   .= GetISBDView($biblio, "opac");
83
                $extension = "txt";
84
                $type      = "text/plain";
85
            }
79
        }
86
        }
80
    }
87
    }
81
88
Lines 83-91 if ($bib_list && $format) { Link Here
83
    $format = "csv" if ($format =~ m/^\d+$/);
90
    $format = "csv" if ($format =~ m/^\d+$/);
84
91
85
    print $query->header(
92
    print $query->header(
86
	-type => 'application/octet-stream',
93
                               -type => ($type) ? $type : 'application/octet-stream',
87
	-'Content-Transfer-Encoding' => 'binary',
94
        -'Content-Transfer-Encoding' => 'binary',
88
	-attachment=>"cart.$format");
95
                         -attachment => ($extension) ? "cart.$format.$extension" : "cart.$format"
96
    );
89
    print $output;
97
    print $output;
90
98
91
} else { 
99
} else { 
(-)a/opac/opac-downloadshelf.pl (-4 / +11 lines)
Lines 57-62 if ( ShelfPossibleAction( (defined($borrowernumber) ? $borrowernumber : -1), $sh Link Here
57
        my ($items, $totitems)  = GetShelfContents($shelfid);
57
        my ($items, $totitems)  = GetShelfContents($shelfid);
58
        my $marcflavour         = C4::Context->preference('marcflavour');
58
        my $marcflavour         = C4::Context->preference('marcflavour');
59
        my $output;
59
        my $output;
60
        my $extension;
61
        my $type;
60
62
61
       # CSV
63
       # CSV
62
        if ($format =~ /^\d+$/) {
64
        if ($format =~ /^\d+$/) {
Lines 83-88 if ( ShelfPossibleAction( (defined($borrowernumber) ? $borrowernumber : -1), $sh Link Here
83
                elsif ($format eq 'bibtex') {
85
                elsif ($format eq 'bibtex') {
84
                    $output .= marc2bibtex($record, $biblionumber);
86
                    $output .= marc2bibtex($record, $biblionumber);
85
                }
87
                }
88
                elsif ( $format eq 'isbd' ) {
89
                    $output   .= GetISBDView($biblionumber, "opac");
90
                    $extension = "txt";
91
                    $type      = "text/plain";
92
                }
86
            }
93
            }
87
        }
94
        }
88
95
Lines 90-98 if ( ShelfPossibleAction( (defined($borrowernumber) ? $borrowernumber : -1), $sh Link Here
90
        $format = "csv" if ($format =~ m/^\d+$/);
97
        $format = "csv" if ($format =~ m/^\d+$/);
91
98
92
        print $query->header(
99
        print $query->header(
93
    	-type => 'application/octet-stream',
100
                                   -type => ($type) ? $type : 'application/octet-stream',
94
    	-'Content-Transfer-Encoding' => 'binary',
101
            -'Content-Transfer-Encoding' => 'binary',
95
    	-attachment=>"shelf.$format");
102
                             -attachment => ($extension) ? "shelf.$format.$extension" : "shelf.$format"
103
        );
96
        print $output;
104
        print $output;
97
105
98
    } else {
106
    } else {
99
- 

Return to bug 13695