my $site;
my $org = $cgi->param('loc');
if (defined($org) and $org ne '' and ($org ne $ctx->{aou_tree}->()->id) and not $query =~ /site\(\S+\)/) {
- $site = $ctx->{find_aou}->($org)->shortname;
+ $site = $ctx->{get_aou}->($org)->shortname;
$query .= " site($site)";
}
my $depth;
if (defined($cgi->param('depth')) and not $query =~ /depth\(\d+\)/) {
$depth = defined $cgi->param('depth') ?
- $cgi->param('depth') : $ctx->{find_aou}->($site)->ou_type->depth;
+ $cgi->param('depth') : $ctx->{get_aou}->($site)->ou_type->depth;
$query .= " depth($depth)";
}
$eclass =~ s/::/_/g;
my $list_key = "${hint}_list";
- my $find_key = "find_$hint";
+ my $get_key = "get_$hint";
$ro_object_subs->{$list_key} = sub {
my $method = "retrieve_all_$eclass";
$cache{map}{$hint} = {} unless $cache{map}{$hint};
- $ro_object_subs->{$find_key} = sub {
+ $ro_object_subs->{$get_key} = sub {
my $id = shift;
return $cache{map}{$hint}{$id} if $cache{map}{$hint}{$id};
($cache{map}{$hint}{$id}) = grep { $_->$ident_field eq $id } @{$ro_object_subs->{$list_key}->()};
sub flesh_aout {
my $node = shift;
my $ro_object_subs = shift;
- $node->ou_type( $ro_object_subs->{find_aout}->($node->ou_type) );
+ $node->ou_type( $ro_object_subs->{get_aout}->($node->ou_type) );
$cache{map}{aou}{$node->id} = $node;
flesh_aout($_, $ro_object_subs) foreach @{$node->children};
};
};
# Add a special handler for the tree-shaped org unit cache
- $ro_object_subs->{find_aou} = sub {
+ $ro_object_subs->{get_aou} = sub {
my $org_id = shift;
$ro_object_subs->{aou_tree}->(); # force the org tree to load
return $cache{map}{aou}{$org_id};
if ($facet_key) {
$facets = $facet_req->gather(1);
$facets->{$_} = {
- cmf => $self->ctx->{find_cmf}->($_),
+ cmf => $self->ctx->{get_cmf}->($_),
data => $facets->{$_}
} for keys %$facets; # quick-n-dirty
} else {
</div>
</td>
<td width="136">
- [% ctx.find_aou(ahr.pickup_lib).name %]
+ [% ctx.get_aou(ahr.pickup_lib).name %]
</td>
<td width="104">
[% IF ahr.frozen == 't' AND ahr.thaw_date;
</div>
</td>
<td width="136">
- [% ctx.find_aou(ahr.pickup_lib).name %]
+ [% ctx.get_aou(ahr.pickup_lib).name %]
</td>
<td width="104">
<!-- <input
value="[% ctx.referer | replace('^http:', 'https:') | html %]" />
<h1>Place Hold</h1>
<p>
- [% | l(attrs.title, ctx.find_aou(ctx.default_pickup_lib).name) %]
+ [% | l(attrs.title, ctx.get_aou(ctx.default_pickup_lib).name) %]
You would like to place a hold on <strong><q>[_1]</q></strong> to be picked up at [_2].
If this is correct, press <strong>SUBMIT</strong>.
[% END %]
<tr>
<td>[%
# XXX KCLS-specific kludging
- org_name = ctx.find_aou(copy_info.circ_lib).name;
+ org_name = ctx.get_aou(copy_info.circ_lib).name;
dir = org_name | lower | replace('[^\w]', '') |
replace('.+320th', '320th'); %]
<a href="http://www.kcls.org/[% dir %]/"
[% IF ctx.is_staff %]
<td>
[% copy_info.age_protect ?
- ctx.find_crahp(copy_info.age_protect).name : l('None') %]
+ ctx.get_crahp(copy_info.age_protect).name : l('None') %]
</td>
<td>[% date.format(
ctx.parse_datetime(copy_info.create_date),