From: erickson Date: Mon, 31 Jul 2006 21:59:46 +0000 (+0000) Subject: added additional copy flesher which grabs more info for opac X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=7280faaf4b0ca35ddf44808c3bbc18ce3afe17b9;p=Evergreen.git added additional copy flesher which grabs more info for opac git-svn-id: svn://svn.open-ils.org/ILS/trunk@5202 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm b/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm index c3c2e57de1..fafb114b0c 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm @@ -253,6 +253,45 @@ sub fleshed_copy_retrieve { return $c; } +__PACKAGE__->register_method( + method => "fleshed_copy_retrieve2", + api_name => "open-ils.search.asset.copy.fleshed2.retrieve",); + +sub fleshed_copy_retrieve2 { + my( $self, $client, $id ) = @_; + my $e = new_editor(); + my $copy = $e->retrieve_asset_copy( + [ + $id, + { + flesh => 2, + flesh_fields => { + acp => [ qw/ location status stat_cat_entry_copy_maps notes age_protect / ], + ascecm => [ qw/ stat_cat stat_cat_entry / ], + } + } + ] + ) or return $e->event; + + # For backwards compatibility + $copy->stat_cat_entries($copy->stat_cat_entry_copy_maps); + + return $copy; + +# return $copy unless $copy->stat_cat_entries; +# +# for my $map (@{$copy->stat_cat_entries}) { +# $map->stat_cat( +# $e->retrieve_asset_stat_cat($map->stat_cat)); +# $map->stat_cat_entry( +# $e->retrieve_asset_stat_cat_entry($map->stat_cat_entry)); +# } +# return $copy; + +} + + + __PACKAGE__->register_method( @@ -1176,6 +1215,17 @@ sub copies_created_on { } +__PACKAGE__->register_method( + method => 'fetch_age_protect', + api_name => 'open-ils.search.copy.age_protect.retrieve.all', +); + +sub fetch_age_protect { + return new_editor()->retrieve_all_config_rule_age_hold_protect(); +} + + + 1; diff --git a/Open-ILS/web/opac/common/js/config.js b/Open-ILS/web/opac/common/js/config.js index 9a1b8c604d..2f16281bba 100644 --- a/Open-ILS/web/opac/common/js/config.js +++ b/Open-ILS/web/opac/common/js/config.js @@ -306,6 +306,7 @@ var FLESH_CONTAINER = 'open-ils.actor:open-ils.actor.container.flesh'; var FLESH_PUBLIC_CONTAINER = 'open-ils.actor:open-ils.actor.container.public.flesh'; var UPDATE_CONTAINER = 'open-ils.actor:open-ils.actor.container.update'; var FETCH_COPY = 'open-ils.search:open-ils.search.asset.copy.retrieve'; +var FETCH_FLESHED_COPY = 'open-ils.search:open-ils.search.asset.copy.fleshed2.retrieve'; var CHECK_HOLD_POSSIBLE = 'open-ils.circ:open-ils.circ.title_hold.is_possible'; var UPDATE_HOLD = 'open-ils.circ:open-ils.circ.hold.update'; var FETCH_COPIES_FROM_VOLUME = 'open-ils.search:open-ils.search.copies_by_call_number.retrieve';