Bugfixing : sorting by patron now taken into account.
All selection boxes, apart from flags selection box, was changed in order to be more "multi lingual" compliant and to keep filter parameters.
This commit is contained in:
parent
f7646dc9b8
commit
4dcca807c0
|
|
@ -4,19 +4,37 @@
|
|||
<form method="post" action="/cgi-bin/koha/overdue.pl">
|
||||
<p>Filter on :<br />
|
||||
<div class="label100">Name or cardnumber :</div> <input type="text" name="borname" value="<!--TMPL_VAR Name="borname"-->"><br />
|
||||
<div class="label100">Borrower categorycode :</div><!--TMPL_VAR Name="CGIcatcodes" --><br />
|
||||
<div class="label100">Borrower categorycode :</div><select name="borcat" id="borcat"><option value="">Any</option>
|
||||
<!-- TMPL_LOOP name="borcatloop" -->
|
||||
<option value="<!-- TMPL_VAR name="value" -->" <!-- TMPL_IF name="selected" -->selected<!-- /TMPL_IF -->><!-- TMPL_VAR name="catname" --></option>
|
||||
<!-- /TMPL_LOOP -->
|
||||
</select><br />
|
||||
<div class="label100">Borrower Flags :</div><!--TMPL_VAR Name="CGIflags" --><br />
|
||||
<div class="label100">Itemtype :</div><!--TMPL_VAR Name="CGIitemtypes" --><br />
|
||||
<div class="label100">branch :</div><!--TMPL_VAR Name="CGIbranches" --><br />
|
||||
<div class="label100">Show any items currently issued:</div><input type="checkbox" name="showall" value="show" <!--TMPL_IF Name="showall"-->checked="checked"<!--/TMPL_IF-->><br />
|
||||
<div class="label100">Itemtype :</div><select name="itemtype" id="itemtype"><option value="">Any</option>
|
||||
<!-- TMPL_LOOP name="itemtypeloop" -->
|
||||
<option value="<!-- TMPL_VAR name="value" -->" <!-- TMPL_IF name="selected" -->selected<!-- /TMPL_IF -->><!-- TMPL_VAR name="itemtypename" --></option>
|
||||
<!-- /TMPL_LOOP -->
|
||||
</select><br />
|
||||
<div class="label100">branch :</div><select name="branch" id="branch">
|
||||
<option value="">Any</option>
|
||||
<!-- TMPL_LOOP name="branchloop" -->
|
||||
<option value="<!-- TMPL_VAR name="value" -->" <!-- TMPL_IF name="selected" -->selected<!-- /TMPL_IF -->><!-- TMPL_VAR name="branchname" --></option>
|
||||
<!-- /TMPL_LOOP -->
|
||||
</select>
|
||||
<br />
|
||||
<div class="label100">Show any items currently issued:</div><input type="checkbox" name="showall" value="show" <!--TMPL_IF Name="showall"-->checked="checked"<!--/TMPL_IF-->><br /><br />
|
||||
<div class="label100">Sort By</div><select name="order" tabindex="0" size="1" id="order">
|
||||
<option <!--TMPL_UNLESS name="order"-->selected<!-- /TMPL_UNLESS--> value="">Due Date</option>
|
||||
<option <!--TMPL_IF name="order"-->selected<!-- /TMPL_IF--> value="borrower">Borrower</option>
|
||||
</select><br />
|
||||
<input TYPE="submit" value="Apply Filter" class="button reports">
|
||||
</form>
|
||||
</p>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th class="reports">Due Date <a href="/cgi-bin/koha/overdue.pl?order=date&type=intranet">Sort</a> </th>
|
||||
<th class="reports">Patron <a href="/cgi-bin/koha/overdue.pl?order=borrower&type=intranet">Sort</a></th>
|
||||
<th class="reports">Due Date </th>
|
||||
<th class="reports">Patron </th>
|
||||
<th class="reports">Phone</th>
|
||||
<th class="reports">Title</th>
|
||||
<th class="reports">Author</th>
|
||||
|
|
|
|||
72
overdue.pl
72
overdue.pl
|
|
@ -51,51 +51,39 @@ my $dbh = C4::Context->dbh;
|
|||
my $req;
|
||||
$req = $dbh->prepare( "select categorycode, description from categories order by description");
|
||||
$req->execute;
|
||||
my %select_catcode;
|
||||
my @select_catcode;
|
||||
push @select_catcode,"";
|
||||
$select_catcode{""} = "";
|
||||
my @borcatloop;
|
||||
while (my ($catcode, $description) =$req->fetchrow) {
|
||||
push @select_catcode, $catcode;
|
||||
$select_catcode{$catcode} = $description
|
||||
my $selected = 1 if $catcode eq $borcatfilter;
|
||||
my %row =(value => $catcode,
|
||||
selected => $selected,
|
||||
catname => $description,
|
||||
);
|
||||
push @borcatloop, \%row;
|
||||
}
|
||||
my $CGIcatcode=CGI::scrolling_list( -name => 'borcat',
|
||||
-id => 'borcat',
|
||||
-values => \@select_catcode,
|
||||
-labels => \%select_catcode,
|
||||
-size => 1,
|
||||
-multiple => 0 );
|
||||
|
||||
$req = $dbh->prepare( "select itemtype, description from itemtypes order by description");
|
||||
$req->execute;
|
||||
my %select_itemtype;
|
||||
my @select_itemtype;
|
||||
push @select_itemtype,"";
|
||||
$select_itemtype{""} = "";
|
||||
my @itemtypeloop;
|
||||
while (my ($itemtype, $description) =$req->fetchrow) {
|
||||
push @select_itemtype, $itemtype;
|
||||
$select_itemtype{$itemtype} = $description
|
||||
my $selected = 1 if $itemtype eq $itemtypefilter;
|
||||
my %row =(value => $itemtype,
|
||||
selected => $selected,
|
||||
itemtypename => $description,
|
||||
);
|
||||
push @itemtypeloop, \%row;
|
||||
}
|
||||
my $CGIitemtype=CGI::scrolling_list( -name => 'itemtype',
|
||||
-id => 'itemtype',
|
||||
-values => \@select_itemtype,
|
||||
-labels => \%select_itemtype,
|
||||
-size => 1,
|
||||
-multiple => 0 );
|
||||
my @branches;
|
||||
my @select_branch;
|
||||
my %select_branches;
|
||||
my ($count2,@branches)=branches();
|
||||
push @select_branch,"";
|
||||
$select_branches{''}='';
|
||||
for (my $i=0;$i<$count2;$i++){
|
||||
push @select_branch, $branches[$i]->{'branchcode'};#
|
||||
$select_branches{$branches[$i]->{'branchcode'}} = $branches[$i]->{'branchname'};
|
||||
|
||||
my $branches=getbranches();
|
||||
my @branchloop;
|
||||
foreach my $thisbranch (keys %$branches) {
|
||||
my $selected = 1 if $thisbranch eq $branchfilter;
|
||||
my %row =(value => $thisbranch,
|
||||
selected => $selected,
|
||||
branchname => $branches->{$thisbranch}->{'branchname'},
|
||||
);
|
||||
push @branchloop, \%row;
|
||||
}
|
||||
my $CGIbranch=CGI::scrolling_list( -name => 'branch',
|
||||
-values => \@select_branch,
|
||||
-labels => \%select_branches,
|
||||
-size => 1,
|
||||
-multiple => 0 );
|
||||
|
||||
my @selectflags;
|
||||
push @selectflags, " ";#
|
||||
push @selectflags,"gonenoaddress";#
|
||||
|
|
@ -104,14 +92,14 @@ push @selectflags,"lost";#
|
|||
my $CGIflags=CGI::scrolling_list( -name => 'borflags',
|
||||
-id =>'borflags',
|
||||
-values => \@selectflags,
|
||||
# -labels => \%selectflags,
|
||||
-size => 1,
|
||||
-multiple => 0 );
|
||||
$template->param(CGIcatcodes => $CGIcatcode,
|
||||
CGIitemtypes => $CGIitemtype,
|
||||
CGIbranches => $CGIbranch,
|
||||
$template->param(borcatloop=> \@borcatloop,
|
||||
itemtypeloop => \@itemtypeloop,
|
||||
branchloop=> \@branchloop,
|
||||
CGIflags => $CGIflags,
|
||||
borname => $bornamefilter,
|
||||
order => $order,
|
||||
showall => $showall);
|
||||
|
||||
my $duedate;
|
||||
|
|
|
|||
Loading…
Reference in New Issue