my $ou = shift;
my $page_size = shift || 10;
my $page = shift || 1;
+ my $statuses = shift || [];
+ my $copy_locations = shift || [];
my $offset = $page_size * ($page - 1);
},
from => { 'acn' => { 'acp' => { field => call_number => fkey => 'id' } } },
where =>
- { '+acp' => { deleted => 'f', (@ou_ids) ? ( circ_lib => \@ou_ids) : () },
+ { '+acp' =>
+ { deleted => 'f',
+ ((@ou_ids) ? ( circ_lib => \@ou_ids) : ()),
+ ((@$statuses) ? ( status => $statuses) : ()),
+ ((@$copy_locations) ? ( location => $copy_locations) : ())
+ },
'+acn' => { record => { '>' => 0 } },
},
order_by => { acp => { create_date => { transform => 'max', direction => 'desc' } } },
my $ou = shift;
my $page_size = shift || 9;
my $page = shift || 0;
+ my $statuses = shift || [];
+ my $copy_locations = shift || [];
my ($before_limit,$after_limit) = (0,0);
my ($before_offset,$after_offset) = (0,0);
from => { acn => { acp => { field => 'call_number', fkey => 'id' } } },
where =>
{ '+acn' => { record => { '=' => { '+mfr' => 'record' } } },
- '+acp' => { deleted => 'f', (@ou_ids) ? ( circ_lib => \@ou_ids) : () }
+ '+acp' =>
+ { deleted => 'f',
+ ((@ou_ids) ? ( circ_lib => \@ou_ids) : ()),
+ ((@$statuses) ? ( status => $statuses) : ()),
+ ((@$copy_locations) ? ( location => $copy_locations) : ())
+ }
},
limit => 1
}
from => { acn => { acp => { field => 'call_number', fkey => 'id' } } },
where =>
{ '+acn' => { record => { '=' => { '+mfr' => 'record' } } },
- '+acp' => { deleted => 'f', (@ou_ids) ? ( circ_lib => \@ou_ids) : () }
+ '+acp' =>
+ { deleted => 'f',
+ ((@ou_ids) ? ( circ_lib => \@ou_ids) : ()),
+ ((@$statuses) ? ( status => $statuses) : ()),
+ ((@$copy_locations) ? ( location => $copy_locations) : ())
+ }
},
limit => 1
}
return item_age_browse($apache) if ($axis eq 'item-age'); # short-circut to the item-age sub
+ my $status = [$cgi->param('status')];
+ my $cpLoc = [$cgi->param('copyLocation')];
$site ||= $cgi->param('searchOrg');
$page ||= $cgi->param('startPage') || 0;
$page_size ||= $cgi->param('count') || 9;
$string,
$site,
$page_size,
- $page
+ $page,
+ $status,
+ $cpLoc
)->gather(1);
(my $norm_format = $format) =~ s/(-full|-uris)$//o;
return undef;
}
+ my $status = [$cgi->param('status')];
+ my $cpLoc = [$cgi->param('copyLocation')];
$site ||= $cgi->param('searchOrg') || '-';
$page ||= $cgi->param('startPage') || 1;
$page_size ||= $cgi->param('count') || 10;
"open-ils.supercat.new_book_list",
$site,
$page_size,
- $page
+ $page,
+ $status,
+ $cpLoc
)->gather(1);
(my $norm_format = $format) =~ s/(-full|-uris)$//o;