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

(-)a/C4/Csv.pm (-2 / +7 lines)
Lines 98-109 sub GetMarcFieldsForCsv { Link Here
98
98
99
# Returns informations aboout csv profiles suitable for html templates
99
# Returns informations aboout csv profiles suitable for html templates
100
sub GetCsvProfilesLoop {
100
sub GetCsvProfilesLoop {
101
   # List of existing profiles
101
    my ( $type ) = @_;
102
    # List of existing profiles
102
    my $dbh = C4::Context->dbh;
103
    my $dbh = C4::Context->dbh;
103
    my $sth;
104
    my $sth;
104
    my $query = "SELECT export_format_id, profile FROM export_format";
105
    my $query = "SELECT export_format_id, profile FROM export_format";
106
    if ( $type ) {
107
        $query .= " WHERE type = ?";
108
    }
109
105
    $sth = $dbh->prepare($query);
110
    $sth = $dbh->prepare($query);
106
    $sth->execute();
111
    $sth->execute( $type ? $type : () );
107
    return $sth->fetchall_arrayref({});
112
    return $sth->fetchall_arrayref({});
108
113
109
}
114
}
(-)a/C4/VirtualShelves/Page.pm (-1 / +1 lines)
Lines 458-464 sub shelfpage { Link Here
458
        shelvesloopall                                                     => [ ( @shelvesloop, @shelveslooppriv ) ],
458
        shelvesloopall                                                     => [ ( @shelvesloop, @shelveslooppriv ) ],
459
        numberCanManage                                                    => $numberCanManage,
459
        numberCanManage                                                    => $numberCanManage,
460
        "BiblioDefaultView" . C4::Context->preference("BiblioDefaultView") => 1,
460
        "BiblioDefaultView" . C4::Context->preference("BiblioDefaultView") => 1,
461
        csv_profiles                                                       => GetCsvProfilesLoop()
461
        csv_profiles                                                       => GetCsvProfilesLoop('marc')
462
    );
462
    );
463
    if (   $shelfnumber
463
    if (   $shelfnumber
464
        or $shelves
464
        or $shelves
(-)a/basket/basket.pl (-1 / +1 lines)
Lines 121-127 my $resultsarray = \@results; Link Here
121
121
122
$template->param(
122
$template->param(
123
    BIBLIO_RESULTS => $resultsarray,
123
    BIBLIO_RESULTS => $resultsarray,
124
    csv_profiles => GetCsvProfilesLoop(),
124
    csv_profiles => GetCsvProfilesLoop('marc'),
125
    bib_list => $bib_list,
125
    bib_list => $bib_list,
126
);
126
);
127
127
(-)a/basket/downloadcart.pl (-1 / +1 lines)
Lines 89-95 if ($bib_list && $format) { Link Here
89
    print $output;
89
    print $output;
90
90
91
} else { 
91
} else { 
92
    $template->param(csv_profiles => GetCsvProfilesLoop());
92
    $template->param(csv_profiles => GetCsvProfilesLoop('marc'));
93
    $template->param(bib_list => $bib_list); 
93
    $template->param(bib_list => $bib_list); 
94
    output_html_with_http_headers $query, $cookie, $template->output;
94
    output_html_with_http_headers $query, $cookie, $template->output;
95
}
95
}
(-)a/opac/opac-downloadcart.pl (-1 / +1 lines)
Lines 89-95 if ($bib_list && $format) { Link Here
89
    print $output;
89
    print $output;
90
90
91
} else { 
91
} else { 
92
    $template->param(csv_profiles => GetCsvProfilesLoop());
92
    $template->param(csv_profiles => GetCsvProfilesLoop('marc'));
93
    $template->param(bib_list => $bib_list); 
93
    $template->param(bib_list => $bib_list); 
94
    output_html_with_http_headers $query, $cookie, $template->output;
94
    output_html_with_http_headers $query, $cookie, $template->output;
95
}
95
}
(-)a/opac/opac-downloadshelf.pl (-1 / +1 lines)
Lines 94-100 if ( ShelfPossibleAction( (defined($borrowernumber) ? $borrowernumber : -1), $sh Link Here
94
        print $output;
94
        print $output;
95
95
96
    } else {
96
    } else {
97
        $template->param(csv_profiles => GetCsvProfilesLoop());
97
        $template->param(csv_profiles => GetCsvProfilesLoop('marc'));
98
        $template->param(shelfid => $shelfid); 
98
        $template->param(shelfid => $shelfid); 
99
        output_html_with_http_headers $query, $cookie, $template->output;
99
        output_html_with_http_headers $query, $cookie, $template->output;
100
    }
100
    }
(-)a/virtualshelves/downloadshelf.pl (-2 / +1 lines)
Lines 88-94 if ($shelfid && $format) { Link Here
88
    print $output;
88
    print $output;
89
}
89
}
90
else {
90
else {
91
    $template->param(csv_profiles => GetCsvProfilesLoop());
91
    $template->param(csv_profiles => GetCsvProfilesLoop('marc'));
92
    $template->param(shelfid => $shelfid); 
92
    $template->param(shelfid => $shelfid); 
93
    output_html_with_http_headers $query, $cookie, $template->output;
93
    output_html_with_http_headers $query, $cookie, $template->output;
94
}
94
}
95
- 

Return to bug 10853