Bugzilla – Attachment 50273 Details for
Bug 7957
Routing lists: manage several routing list for each subscription, and export them as CSV
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 7957: Make CSV header translatable
Bug-7957-Make-CSV-header-translatable.patch (text/plain), 2.05 KB, created by
Julian Maurice
on 2016-04-15 13:35:34 UTC
(
hide
)
Description:
Bug 7957: Make CSV header translatable
Filename:
MIME Type:
Creator:
Julian Maurice
Created:
2016-04-15 13:35:34 UTC
Size:
2.05 KB
patch
obsolete
>From 384918b69425667bb3392491ad7bea51d18ada15 Mon Sep 17 00:00:00 2001 >From: Julian Maurice <julian.maurice@biblibre.com> >Date: Fri, 15 Apr 2016 15:35:11 +0200 >Subject: [PATCH] Bug 7957: Make CSV header translatable > >--- > C4/Serials/RoutingLists.pm | 11 ++++++++--- > .../prog/en/modules/serials/csv/routinglist-header.tt | 1 + > 2 files changed, 9 insertions(+), 3 deletions(-) > create mode 100644 koha-tmpl/intranet-tmpl/prog/en/modules/serials/csv/routinglist-header.tt > >diff --git a/C4/Serials/RoutingLists.pm b/C4/Serials/RoutingLists.pm >index 9f7ad52..305df27 100644 >--- a/C4/Serials/RoutingLists.pm >+++ b/C4/Serials/RoutingLists.pm >@@ -270,6 +270,7 @@ sub GetRoutingListAsCSV { > require C4::Biblio; > require C4::Serials; > require C4::Members; >+ require C4::Templates; > require Text::CSV::Encoded; > > my $csv = Text::CSV::Encoded->new( {encoding => "utf8" } ); >@@ -279,9 +280,13 @@ sub GetRoutingListAsCSV { > my $subscription = C4::Serials::GetSubscription($routinglist->{'subscriptionid'}); > my $biblio = C4::Biblio::GetBiblio($subscription->{'biblionumber'}); > >- my @headers = ("Subscription title", "Routing list", qw(Surname Firstname Notes)); >- $csv->combine(@headers); >- $output .= $csv->string() . "\n"; >+ my $template = C4::Templates::gettemplate('serials/csv/routinglist-header.tt', >+ 'intranet', new CGI); >+ my $header_row = $template->output; >+ # Remove EOL if any, then add it back, so we are sure there is only >+ # one EOL character >+ chomp $header_row; >+ $output .= $header_row . "\n"; > > foreach (@{$routinglist->{borrowers}}) { > my $member = C4::Members::GetMemberDetails($_); >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/serials/csv/routinglist-header.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/csv/routinglist-header.tt >new file mode 100644 >index 0000000..e3e36c4 >--- /dev/null >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/serials/csv/routinglist-header.tt >@@ -0,0 +1 @@ >+Subscription title,Routing list,Surname,Firstname,Notes >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 7957
:
9259
|
10973
|
13217
|
16614
|
21340
|
22726
|
35709
|
35801
|
35802
|
35803
|
35804
|
35842
|
35860
|
35872
|
35873
|
35874
|
35875
|
38425
|
41762
|
41763
|
41764
|
42427
|
42428
|
42429
|
47633
|
47634
|
47635
|
47659
|
47660
|
47661
|
47662
|
47663
|
47664
|
50226
|
50227
|
50228
|
50265
|
50266
|
50270
|
50273
|
97519
|
97520
|
97521
|
97522
|
97523
|
97524