Bug 12707: Remove CGI::scrolling_list from some Reports
authorBernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Sun, 3 Aug 2014 19:55:44 +0000 (16:55 -0300)
committerTomas Cohen Arazi <tomascohen@gmail.com>
Fri, 15 Aug 2014 17:47:23 +0000 (14:47 -0300)
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>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, passes tests and QA script.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
koha-tmpl/intranet-tmpl/prog/en/modules/reports/borrowers_out.tt
koha-tmpl/intranet-tmpl/prog/en/modules/reports/borrowers_stats.tt
koha-tmpl/intranet-tmpl/prog/en/modules/reports/cat_issues_top.tt
koha-tmpl/intranet-tmpl/prog/en/modules/reports/issues_stats.tt
koha-tmpl/intranet-tmpl/prog/en/modules/reports/reserves_stats.tt
reports/borrowers_out.pl
reports/borrowers_stats.pl
reports/cat_issues_top.pl
reports/catalogue_stats.pl
reports/issues_stats.pl
reports/reserves_stats.pl

index 8d76853..bc6e6b2 100644 (file)
@@ -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 ) %]
index 9e20add..200ce24 100644 (file)
             <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 ) %]
index cced46a..c7e45bd 100644 (file)
             <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 ) %]
index 8650b4c..52f1cfa 100644 (file)
             <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 ) %]
index 8e7f8b5..641cbc6 100644 (file)
             <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 ) %]
index 74f80bf..9687234 100755 (executable)
@@ -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);
index 53c30f5..e71fef9 100755 (executable)
@@ -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,
index 9dcb39c..893fd21 100755 (executable)
@@ -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
index 11f1ca1..a19334a 100755 (executable)
@@ -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. 
index b0fc72c..0ab0143 100755 (executable)
@@ -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(
index 7c33a63..11fcb8e 100755 (executable)
@@ -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(