Bugzilla – Attachment 30542 Details for
Bug 12707
Remove CGI::scrolling_list from some Reports
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[Signed-off] Bug 12707: Remove CGI::scrolling_list from some Reports
Signed-off-Bug-12707-Remove-CGIscrollinglist-from-.patch (text/plain), 10.92 KB, created by
Marc Véron
on 2014-08-05 08:26:08 UTC
(
hide
)
Description:
[Signed-off] Bug 12707: Remove CGI::scrolling_list from some Reports
Filename:
MIME Type:
Creator:
Marc Véron
Created:
2014-08-05 08:26:08 UTC
Size:
10.92 KB
patch
obsolete
>From 4acf1832cdb3896f02ba3122da8313c3e90cf2ec Mon Sep 17 00:00:00 2001 >From: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> >Date: Sun, 3 Aug 2014 16:55:44 -0300 >Subject: [PATCH] [Signed-off] Bug 12707: Remove CGI::scrolling_list from some > Reports >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >This patch removes similar instances on 5 files, same code. >Also removes a commented one, changed in case some plan to >resurrect the code. > >This bug depends on Bug 12696. > >In all cases but the commented one, what was replaced >is a pulldown with one value, 'CSV' > >To test: >1. Apply patch for Bug 12696 >2. Apply this patch > >Check for the pulldown 'Into an application' > >3. Go to Reports > Statistics wizard > Borrowers >4. Go to Reports > Statistics wizard > Circulation >5. Go to Reports > Statistics wizard > Holds >6. Go to Reports > Top lists > Most-circulated items >7. Go to Reports > Inactive > Patrons who haven't checked out > >8. There is also a commented code on catalogue_stats, no fuctional >changes. > >Followed test plan. Patch behaves as expected. >Signed-off-by: Marc Véron <veron@veron.ch> >--- > .../intranet-tmpl/prog/en/modules/reports/borrowers_out.tt | 6 +++++- > .../intranet-tmpl/prog/en/modules/reports/borrowers_stats.tt | 6 +++++- > .../intranet-tmpl/prog/en/modules/reports/cat_issues_top.tt | 6 +++++- > .../intranet-tmpl/prog/en/modules/reports/issues_stats.tt | 6 +++++- > .../intranet-tmpl/prog/en/modules/reports/reserves_stats.tt | 6 +++++- > reports/borrowers_out.pl | 8 +------- > reports/borrowers_stats.pl | 7 +------ > reports/cat_issues_top.pl | 8 +------- > reports/catalogue_stats.pl | 8 +++----- > reports/issues_stats.pl | 8 +------- > reports/reserves_stats.pl | 10 +--------- > 11 files changed, 33 insertions(+), 46 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/borrowers_out.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/borrowers_out.tt >index 8d76853..bc6e6b2 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/borrowers_out.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/borrowers_out.tt >@@ -102,7 +102,11 @@ $(document).ready(function(){ > <label for="outputfile">To a file:</label> <input type="radio" name="output" value="file" id="outputfile" /> > <label class="inline" for="basename">Named: </label><input type="text" name="basename" id="basename" value="Export" /> > <label class="inline" for="MIME">Into an application </label> >- [% CGIextChoice %] >+ <select name="MIME" id="MIME" size="1"> >+ [% FOREACH value IN CGIextChoice %] >+ <option value="[% value %]">[% value %]</option> >+ [% END %] >+ </select> > <select name="sep" id="sep" size="1"> > [% FOREACH value IN CGIsepChoice.values.sort() %] > [% IF ( value == CGIsepChoice.default ) %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/borrowers_stats.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/borrowers_stats.tt >index 9e20add..200ce24 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/borrowers_stats.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/borrowers_stats.tt >@@ -261,7 +261,11 @@ > <label for="outputfile">To a file:</label> <input type="radio" name="output" value="file" id="outputfile" /> > <label class="inline" for="basename">Named: </label><input type="text" name="basename" id="basename" value="Export" /> > <label class="inline" for="MIME">Into an application</label> >- [% CGIextChoice %] >+ <select name="MIME" id="MIME" size="1"> >+ [% FOREACH value IN CGIextChoice %] >+ <option value="[% value %]">[% value %]</option> >+ [% END %] >+ </select> > <select name="sep" id="sep" size="1"> > [% FOREACH value IN CGIsepChoice.values.sort() %] > [% IF ( value == CGIsepChoice.default ) %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/cat_issues_top.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/cat_issues_top.tt >index cced46a..c7e45bd 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/cat_issues_top.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/cat_issues_top.tt >@@ -172,7 +172,11 @@ > <label for="outputfile">To a file:</label> <input type="radio" name="output" value="file" id="outputfile" /> > <label class="inline" for="basename">Named: </label><input type="text" name="basename" id="basename" value="Export" /> > <label class="inline" for="MIME">Into an application </label> >- [% CGIextChoice %] >+ <select name="MIME" id="MIME" size="1"> >+ [% FOREACH value IN CGIextChoice %] >+ <option value="[% value %]">[% value %]</option> >+ [% END %] >+ </select> > <select name="sep" id="sep" size="1"> > [% FOREACH value IN CGIsepChoice.values.sort() %] > [% IF ( value == CGIsepChoice.default ) %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/issues_stats.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/issues_stats.tt >index 8650b4c..52f1cfa 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/issues_stats.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/issues_stats.tt >@@ -262,7 +262,11 @@ > <label for="outputfile">To a file:</label> <input type="radio" name="output" value="file" id="outputfile" /> > <label class="inline" for="basename">Named: </label><input type="text" name="basename" id="basename" value="Export" /> > <label class="inline" for="MIME">Into an application</label> >- [% CGIextChoice %] >+ <select name="MIME" id="MIME" size="1"> >+ [% FOREACH value IN CGIextChoice %] >+ <option value="[% value %]">[% value %]</option> >+ [% END %] >+ </select> > <select name="sep" id="sep" size="1"> > [% FOREACH value IN CGIsepChoice.values.sort() %] > [% IF ( value == CGIsepChoice.default ) %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/reserves_stats.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/reserves_stats.tt >index 8e7f8b5..641cbc6 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/reserves_stats.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/reserves_stats.tt >@@ -340,7 +340,11 @@ > <label for="outputfile">To a file:</label> <input type="radio" name="output" value="file" id="outputfile" /> > <label class="inline" for="basename">Named: </label><input type="text" name="basename" id="basename" value="Export" /> > <label class="inline" for="MIME">Into an application</label> >- [% CGIextChoice %] >+ <select name="MIME" id="MIME" size="1"> >+ [% FOREACH value IN CGIextChoice %] >+ <option value="[% value %]">[% value %]</option> >+ [% END %] >+ </select> > <select name="sep" id="sep" size="1"> > [% FOREACH value IN CGIsepChoice.values.sort() %] > [% IF ( value == CGIsepChoice.default ) %] >diff --git a/reports/borrowers_out.pl b/reports/borrowers_out.pl >index 74f80bf..9687234 100755 >--- a/reports/borrowers_out.pl >+++ b/reports/borrowers_out.pl >@@ -112,13 +112,7 @@ if ($do_it) { > my %select; > my $req; > >- my $CGIextChoice=CGI::scrolling_list( >- -name => 'MIME', >- -id => 'MIME', >- -values => ['CSV'], # FIXME translation >- -size => 1, >- -multiple => 0 ); >- >+ my $CGIextChoice = ( 'CSV' ); # FIXME translation > my $CGIsepChoice = GetDelimiterChoices; > > my ($codes,$labels) = GetborCatFromCatType(undef,undef); >diff --git a/reports/borrowers_stats.pl b/reports/borrowers_stats.pl >index 53c30f5..e71fef9 100755 >--- a/reports/borrowers_stats.pl >+++ b/reports/borrowers_stats.pl >@@ -136,12 +136,7 @@ if ($do_it) { > $req->execute; > $template->param( SORT2_LOOP => $req->fetchall_arrayref({})); > >- my $CGIextChoice=CGI::scrolling_list( >- -name => 'MIME', >- -id => 'MIME', >- -values => ['CSV'], # FIXME translation >- -size => 1, >- -multiple => 0 ); >+ my $CGIextChoice = ( 'CSV' ); # FIXME translation > my $CGIsepChoice=GetDelimiterChoices; > $template->param( > CGIextChoice => $CGIextChoice, >diff --git a/reports/cat_issues_top.pl b/reports/cat_issues_top.pl >index 9dcb39c..893fd21 100755 >--- a/reports/cat_issues_top.pl >+++ b/reports/cat_issues_top.pl >@@ -117,13 +117,7 @@ if ($do_it) { > my %select; > my $req; > >- my $CGIextChoice=CGI::scrolling_list( >- -name => 'MIME', >- -id => 'MIME', >- -values => ['CSV'], # FIXME translation >- -size => 1, >- -multiple => 0 ); >- >+ my $CGIextChoice = ( 'CSV' ); # FIXME translation > my $CGIsepChoice=GetDelimiterChoices; > > #doctype >diff --git a/reports/catalogue_stats.pl b/reports/catalogue_stats.pl >index 11f1ca1..a19334a 100755 >--- a/reports/catalogue_stats.pl >+++ b/reports/catalogue_stats.pl >@@ -130,11 +130,9 @@ if ($do_it) { > # $count++ if (($value) and (! $haslccn)); > # push @select, $value; > # } >-# my $CGIlccn=CGI::scrolling_list( -name => 'Filter', >-# -id => 'Filter', >-# -values => \@select, >-# -size => 1, >-# -multiple => 0 ); >+# my $CGIlccn = { >+# values => \@select, >+# }; > > # No need to test for data here. If you don't have itemcallnumbers, you probably know it. > # FIXME: Hardcoding to 5 chars on itemcallnum. >diff --git a/reports/issues_stats.pl b/reports/issues_stats.pl >index b0fc72c..0ab0143 100755 >--- a/reports/issues_stats.pl >+++ b/reports/issues_stats.pl >@@ -146,13 +146,7 @@ foreach (sort {$ccodes->{$a} cmp $ccodes->{$b}} keys %$ccodes) { > push @ccodes, { code => $_, description => $ccodes->{$_} }; > } > >-my $CGIextChoice=CGI::scrolling_list( >- -name => 'MIME', >- -id => 'MIME', >- -values => ['CSV'], # FIXME translation >- -size => 1, >- -multiple => 0 ); >- >+my $CGIextChoice = ( 'CSV' ); # FIXME translation > my $CGIsepChoice=GetDelimiterChoices; > > $template->param( >diff --git a/reports/reserves_stats.pl b/reports/reserves_stats.pl >index 7c33a63..11fcb8e 100755 >--- a/reports/reserves_stats.pl >+++ b/reports/reserves_stats.pl >@@ -155,15 +155,7 @@ foreach (sort {$ccodes->{$a} cmp $ccodes->{$b}} keys %$ccodes) { > } > > # various >-my @mime = (C4::Context->preference("MIME")); >- >-my $CGIextChoice=CGI::scrolling_list( >- -name => 'MIME', >- -id => 'MIME', >- -values => \@mime, >- -size => 1, >- -multiple => 0 ); >- >+my $CGIextChoice = ( 'CSV' ); # FIXME translation > my $CGIsepChoice=GetDelimiterChoices; > > $template->param( >-- >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 12707
:
30522
|
30542
|
30852