BugFixing : 1299 /displaying lists for document types and borrower categories

Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
This commit is contained in:
Henri-Damien LAURENT 2008-01-16 12:32:21 -06:00 committed by Joshua Ferraro
parent 7a3933c835
commit e45912470f
8 changed files with 70 additions and 18 deletions

View File

@ -186,15 +186,24 @@ function Dopop(link) {
</script></li>
<li>
<label for="branch">Branch: </label>
<input type="text" name="Filter" id="branch" value="" />
<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="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="" />
<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>

View File

@ -50,7 +50,11 @@
<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" />

View 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>

View File

@ -50,8 +50,19 @@
<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>

View File

@ -55,7 +55,11 @@
<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" -->" />

View File

@ -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;

View File

@ -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;

View 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 {