Bugzilla – Attachment 11103 Details for
Bug 7896
Acquisition statistics wizard: add filters and cell values
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 7896: follow-up: Allow translation of strings
0002-Bug-7896-follow-up-Allow-translation-of-strings.patch (text/plain), 5.15 KB, created by
Julian Maurice
on 2012-07-24 11:40:29 UTC
(
hide
)
Description:
Bug 7896: follow-up: Allow translation of strings
Filename:
MIME Type:
Creator:
Julian Maurice
Created:
2012-07-24 11:40:29 UTC
Size:
5.15 KB
patch
obsolete
>From a9de33537dd23f690936487d2c9a76e350697970 Mon Sep 17 00:00:00 2001 >From: Julian Maurice <julian.maurice@biblibre.com> >Date: Tue, 24 Jul 2012 13:30:23 +0200 >Subject: [PATCH 2/2] Bug 7896: follow-up: Allow translation of strings > >--- > .../prog/en/modules/reports/acquisitions_stats.tt | 35 ++++++++++++++---- > reports/acquisitions_stats.pl | 38 +++----------------- > 2 files changed, 34 insertions(+), 39 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/acquisitions_stats.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/acquisitions_stats.tt >index 9b25715..0742336 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/acquisitions_stats.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/acquisitions_stats.tt >@@ -18,10 +18,26 @@ > [% IF ( do_it ) %] > [% FOREACH mainloo IN mainloop %] > <h1>Acquisitions statistics </h1> >- [% IF ( mainloo.loopfilter.size ) %] >- <p><b>Filtered on:</b></p> >- [% FOREACH loopfilte IN mainloo.loopfilter %] >- <p>[% loopfilte.crit %]: [% loopfilte.filter %]</p> >+ [% IF ( mainloo.loopfilter.size ) %] >+ <p><b>Filtered on:</b></p> >+ [% FOREACH loopfilte IN mainloo.loopfilter %] >+ <p> >+ [% SWITCH loopfilte.crit %] >+ [% CASE '0' %] Placed on (from) >+ [% CASE '1' %] Placed on (to) >+ [% CASE '2' %] Received on (from) >+ [% CASE '3' %] Received on (to) >+ [% CASE '4' %] Supplier >+ [% CASE '5' %] Home branch >+ [% CASE '6' %] Collection >+ [% CASE '7' %] Item type >+ [% CASE '8' %] Budget >+ [% CASE '9' %] Sort1 >+ [% CASE '10' %] Sort2 >+ [% CASE %] Unknown filter >+ [% END %] >+ : [% loopfilte.filter %] >+ </p> > [% END %] > [% END %] > >@@ -242,8 +258,15 @@ > <td>Vendor</td> > <td><input type="radio" checked="checked" name="Line" value="aqbooksellers.name" /></td> > <td><input type="radio" name="Column" value="aqbooksellers.name" /></td> >- <td>[% CGIBookSeller %]</td> >- </tr> >+ <td> >+ <select name="Filter"> >+ <option value="">All suppliers</option> >+ [% FOREACH bookseller IN booksellers %] >+ <option value="[% bookseller.name %]">[% bookseller.name %]</option> >+ [% END %] >+ </select> >+ </td> >+ </tr> > <tr> > <td>Home branch</td> > <td><input type="radio" name="Line" value="items.homebranch" /></td> >diff --git a/reports/acquisitions_stats.pl b/reports/acquisitions_stats.pl >index 9a74365..de4b0f3 100755 >--- a/reports/acquisitions_stats.pl >+++ b/reports/acquisitions_stats.pl >@@ -117,30 +117,15 @@ if ($do_it) { > } > else { > my $dbh = C4::Context->dbh; >- my @select; >- my %select; > my $req; > $req = $dbh->prepare("SELECT distinctrow id,name FROM aqbooksellers ORDER BY name"); > $req->execute; >- push @select, ""; >- $select{''} = "All Suppliers"; >- while ( my ( $value, $desc ) = $req->fetchrow ) { >- push @select, $desc; >- $select{$value}=$desc; >- } >- my $CGIBookSellers = CGI::scrolling_list( >- -name => 'Filter', >- -id => 'supplier', >- -values => \@select, >- -labels => \%select, >- -size => 1, >- -multiple => 0 >- ); >+ my $booksellers = $req->fetchall_arrayref({}); > > $req = $dbh->prepare("SELECT DISTINCTROW itemtype,description FROM itemtypes ORDER BY description"); > $req->execute; >- undef @select; >- undef %select; >+ my @select; >+ my %select; > push @select, ""; > $select{''} = "All Item Types"; > while ( my ( $value, $desc ) = $req->fetchrow ) { >@@ -256,7 +241,7 @@ else { > } > > $template->param( >- CGIBookSeller => $CGIBookSellers, >+ booksellers => $booksellers, > CGIItemType => $CGIItemTypes, > CGIBudget => $CGIBudget, > hassort1 => $hassort1, >@@ -305,20 +290,7 @@ sub calculate { > } else { > $cell{filter} = format_date(@$filters[$i]); > } >- given ($i) { >- when (0) { $cell{crit} = "Placed On From" } >- when (1) { $cell{crit} = "Placed On To" } >- when (2) { $cell{crit} = "Received On From" } >- when (3) { $cell{crit} = "Received On To" } >- when (4) { $cell{crit} = "Bookseller" } >- when (5) { $cell{crit} = "Home branch" } >- when (6) { $cell{crit} = "Collection" } >- when (7) { $cell{crit} = "Doc Type" } >- when (8) { $cell{crit} = "Budget" } >- when (9) { $cell{crit} = "Sort1" } >- when (10) { $cell{crit} = "Sort2" } >- default { $cell{crit} = "" } >- } >+ $cell{crit} = $i; > push @loopfilter, \%cell; > } > } >-- >1.7.10.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 7896
:
8863
|
8865
|
11103
|
12945
|
12946
|
13818
|
13819