<option value="<!-- TMPL_VAR NAME="value" -->"><!-- TMPL_VAR NAME="description" --></option>
<!-- /TMPL_IF -->
<!-- /TMPL_LOOP -->
- </select></li></ol></fieldset>
+ </select></li>
+
+ <li><label for="loststatusfilter">Lost Status: </label><select name="loststatusfilter" id="loststatusfilter">
+ <option value="">All</option>
+ <!-- TMPL_LOOP name="loststatusloop" -->
+ <!-- TMPL_IF NAME="selected" --><option value="<!-- TMPL_VAR NAME="authorised_value" -->" selected="selected"><!-- TMPL_VAR NAME="lib" --></option>
+ <!-- TMPL_ELSE -->
+ <option value="<!-- TMPL_VAR NAME="authorised_value" -->"><!-- TMPL_VAR NAME="lib" --></option>
+ <!-- /TMPL_IF -->
+ <!-- /TMPL_LOOP -->
+ </select></li>
+</ol></fieldset>
<fieldset class="action"> <input type="submit" value="Submit" />
<input type="hidden" name="get_items" value="1" /></fieldset>
</form>
my $get_items = $params->{'get_items'};
if ( $get_items ) {
- my $orderbyfilter = $params->{'orderbyfilter'} || undef;
- my $branchfilter = $params->{'branchfilter'} || undef;
- my $barcodefilter = $params->{'barcodefilter'} || undef;
- my $itemtypesfilter = $params->{'itemtypesfilter'} || undef;
+ my $orderbyfilter = $params->{'orderbyfilter'} || undef;
+ my $branchfilter = $params->{'branchfilter'} || undef;
+ my $barcodefilter = $params->{'barcodefilter'} || undef;
+ my $itemtypesfilter = $params->{'itemtypesfilter'} || undef;
+ my $loststatusfilter = $params->{'loststatusfilter'} || undef;
my %where;
- $where{homebranch} = $branchfilter if defined $branchfilter;
- $where{barcode} = $barcodefilter if defined $barcodefilter;
- $where{itemtype} = $itemtypesfilter if defined $itemtypesfilter;
+ $where{'homebranch'} = $branchfilter if defined $branchfilter;
+ $where{'barcode'} = $barcodefilter if defined $barcodefilter;
+ $where{'itemtype'} = $itemtypesfilter if defined $itemtypesfilter;
+ $where{'authorised_value'} = $loststatusfilter if defined $loststatusfilter;
my $items = GetLostItems( \%where, $orderbyfilter );
$template->param(
push @itemtypesloop, \%row;
}
-$template->param(
- branchloop => \@branchloop,
- itemtypeloop => \@itemtypesloop,
+# get lost statuses
+my $lost_status_loop = C4::Koha::GetAuthorisedValues( 'LOST' );
+
+$template->param( branchloop => \@branchloop,
+ itemtypeloop => \@itemtypesloop,
+ loststatusloop => $lost_status_loop,
);
# writing the template