BugFixing : 1299 /displaying lists for document types and borrower categories
authorHenri-Damien LAURENT <henridamien@koha-fr.org>
Wed, 16 Jan 2008 18:32:21 +0000 (12:32 -0600)
committerJoshua Ferraro <jmf@liblime.com>
Fri, 18 Jan 2008 03:00:59 +0000 (21:00 -0600)
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
koha-tmpl/intranet-tmpl/prog/en/modules/reports/bor_issues_top.tmpl
koha-tmpl/intranet-tmpl/prog/en/modules/reports/borrowers_out.tmpl
koha-tmpl/intranet-tmpl/prog/en/modules/reports/cat_issues_top.tmpl
koha-tmpl/intranet-tmpl/prog/en/modules/reports/catalogue_out.tmpl
koha-tmpl/intranet-tmpl/prog/en/modules/reports/issues_by_borrower_category.tmpl
reports/bor_issues_top.pl
reports/borrowers_out.pl
reports/issues_by_borrower_category.plugin

index 15f1bd8..90dd038 100644 (file)
@@ -186,15 +186,24 @@ function Dopop(link) {
                                                        </script></li>
                        <li> 
                                <label for="branch">Branch: </label>
-                               <input type="text" name="Filter" id="branch" value="" />
-                       </li>
+<select name="Filter" id="branch"><option value="" > Any Branch</option>
+    <!--TMPL_LOOP Name="branchloop"-->
+        <option value="<!--TMPL_VAR Name="value"-->" ><!--TMPL_VAR Name="branchname"--> </option>  
+     <!--/TMPL_LOOP --> 
+    </select>                  </li>
                        <li> 
-                               <label for="documenttype">Document Type: </label>
-                               <input type="text" name="Filter" id="documenttype" value="" />
+                               <label for="documenttype">Document Type: </label><select name="Filter" id="documenttype"><option value="" > Any Document type</option>
+    <!--TMPL_LOOP Name="itemtypeloop"-->
+        <option value="<!--TMPL_VAR Name="value"-->" ><!--TMPL_VAR Name="description"--> </option>  
+     <!--/TMPL_LOOP --> 
+    </select>
                        </li>
                        <li> 
-                               <label for="patroncategory">Patron Category: </label>
-                               <input type="text" name="Filter" id="patroncategory" value="" />
+                               <label for="patroncategory">Patron Category: </label><select name="Filter" id="patroncategory"><option value="" > Any Category code</option>
+    <!--TMPL_LOOP Name="borcatloop"-->
+        <option value="<!--TMPL_VAR Name="value"-->" ><!--TMPL_VAR Name="description"--> </option>  
+     <!--/TMPL_LOOP --> 
+    </select>
                        </li>
                        <li> 
                                <label for="day">Day: </label>
index 7a2d569..c80d9b2 100644 (file)
     <form method="post" action="/cgi-bin/koha/reports/borrowers_out.pl">
     <fieldset class="rows">
                <ol>
-                       <li><label for="patroncategory">Patron category: </label> <input type="text" name="Filter" id="patroncategory" value="" />
+                       <li><label for="patroncategory">Patron category: </label> <select name="Filter" id="patroncategory"><option value="" > Any Category code</option>
+    <!--TMPL_LOOP Name="borcatloop"-->
+        <option value="<!--TMPL_VAR Name="value"-->" ><!--TMPL_VAR Name="description"--> </option>  
+     <!--/TMPL_LOOP --> 
+    </select>
 </li>
        <li><label for="to">Without issues since: </label> <input size="10" id="to" name="Filter" value="" type="text" />
                         <img src="<!-- TMPL_VAR Name="themelang" -->/lib/calendar/cal.gif" alt="Show Calendar" id="openCalendarTo" style="cursor: pointer;" border="0" />
index cb85f20..29b9aaf 100644 (file)
@@ -184,9 +184,26 @@ function Dopop(link) {
                                                                        }
                                                                );
                                                        </script></li>
-                               <li><label for="branch">Branch: </label> <input type="text" name="Filter" id="branch" value="" /></li>
-                               <li><label for="documenttype">Document Type: </label> <input type="text" name="Filter" id="documenttype" value="" /></li>
-                               <li><label for="patroncategory">Patron Category: </label> <input type="text" name="Filter" id="patroncategory" value="" /></li>
+                               <li><label for="branch">Branch: </label>
+<select name="Filter" id="branch"><option value="" > Any Branch</option>
+    <!--TMPL_LOOP Name="branchloop"-->
+        <option value="<!--TMPL_VAR Name="value"-->" ><!--TMPL_VAR Name="branchname"--> </option>  
+     <!--/TMPL_LOOP --> 
+    </select>     </li>
+      <li> 
+        <label for="documenttype">Document Type: </label><select name="Filter" id="documenttype"><option value="" > Any Document type</option>
+    <!--TMPL_LOOP Name="itemtypeloop"-->
+        <option value="<!--TMPL_VAR Name="value"-->" ><!--TMPL_VAR Name="description"--> </option>  
+     <!--/TMPL_LOOP --> 
+    </select>
+      </li>
+      <li> 
+        <label for="patroncategory">Patron Category: </label><select name="Filter" id="patroncategory"><option value="" > Any Category code</option>
+    <!--TMPL_LOOP Name="borcatloop"-->
+        <option value="<!--TMPL_VAR Name="value"-->" ><!--TMPL_VAR Name="description"--> </option>  
+     <!--/TMPL_LOOP --> 
+    </select>
+        </li>
                                <li><label for="day">Day: </label> <input type="text" name="Filter" id="day" value="" /></li>
                                <li><label for="month">Month: </label> <input type="text" name="Filter" id="month" value="" /></li>
                                <li><label for="year">Year: </label> <input type="text" name="Filter" id="year" value="" /></li>
index 58ed8fc..4e56580 100644 (file)
        
        <fieldset class="rows">
                <ol>
-                       <li><label for="branchFilter">Branch: </label> <input type="text" id="branchFilter" name="Filter" value="" /></li>
-                       <li><label for="docFilter">Document type: </label> <input type="text" id="docFilter" name="Filter" value="" /></li>
+                       <li>        <label for="branch">Branch: </label>
+<select name="Filter" id="branch"><option value="" > Any Branch</option>
+    <!--TMPL_LOOP Name="branchloop"-->
+        <option value="<!--TMPL_VAR Name="value"-->" ><!--TMPL_VAR Name="branchname"--> </option>  
+     <!--/TMPL_LOOP --> 
+    </select>     </li>
+      <li> 
+        <label for="documenttype">Document Type: </label><select name="Filter" id="documenttype"><option value="" > Any Document type</option>
+    <!--TMPL_LOOP Name="itemtypeloop"-->
+        <option value="<!--TMPL_VAR Name="value"-->" ><!--TMPL_VAR Name="description"--> </option>  
+     <!--/TMPL_LOOP --> 
+    </select>
+    </li>
                </ol>   
        </fieldset>
        
index b635fcc..2121551 100644 (file)
        <form method="post" action="/cgi-bin/koha/reports/manager.pl">
                <fieldset class="rows">
                <legend>Checkouts by patron category</legend>
-               <ol><li><label for="borrowercategory">Select a borrower category</label> <input type="text" name="value" id="borrowercategory" /> <span class="tip">Leave empty for all categories</span></li>
+               <ol><li><label for="borrowercategory">Select a borrower category</label><select name="value" id="borrowercategory"><option value="" > Any Category code</option>
+    <!--TMPL_LOOP Name="loopcategories"-->
+        <option value="<!--TMPL_VAR Name="value"-->" ><!--TMPL_VAR Name="description"--> </option>  
+     <!--/TMPL_LOOP --> 
+    </select></li>
                <li><label for="branch">Select a branch:</label> <!-- TMPL_VAR NAME="CGIbranch" --></li></ol></fieldset>
                <fieldset class="action"><input type="submit" value="Submit" />
                <input type="hidden" name="report_name" value="<!--TMPL_VAR NAME="report_name" -->" />
index ce98071..f27a0db 100755 (executable)
@@ -160,9 +160,7 @@ if ($do_it) {
     my ($codes,$labels) = GetborCatFromCatType(undef,undef);
     my @borcatloop;
     foreach my $thisborcat (sort keys %$labels) {
-#                      my $selected = 1 if $thisbranch eq $branch;
             my %row =(value => $thisborcat,
-#                                                                      selected => $selected,
                                     description => $labels->{$thisborcat},
                             );
             push @borcatloop, \%row;
index 504f64a..c969cc8 100755 (executable)
@@ -133,9 +133,7 @@ if ($do_it) {
     my ($codes,$labels) = GetborCatFromCatType(undef,undef);
     my @borcatloop;
     foreach my $thisborcat (sort keys %$labels) {
-#                      my $selected = 1 if $thisbranch eq $branch;
             my %row =(value => $thisborcat,
-#                                                                      selected => $selected,
                                     description => $labels->{$thisborcat},
                             );
             push @borcatloop, \%row;
index 3ed57e6..8fea89c 100644 (file)
@@ -26,6 +26,8 @@ use HTML::Template::Pro;
 use C4::Search;
 use C4::Output;
 use C4::Koha;
+use C4::Members;
+
 use C4::Branch; # GetBranches
 
 =head1 NAME
@@ -80,6 +82,15 @@ sub set_parameters {
                                -size     => 1,
                                -multiple => 0 );
        $template->param(CGIbranch => $CGIbranch);
+  
+  my ($codes,$labels)=GetborCatFromCatType(undef,undef);
+  my @borcatloop;
+  foreach my $thisborcat (sort keys %$labels) {
+            push @borcatloop, {value => $thisborcat,
+                               description => $labels->{$thisborcat},
+                            };
+  }
+  $template->param(loopcategories => \@borcatloop);
        return $template;
 }
 sub calculate {