From 396275f7b3eb899e3f6d74879c21ed73bf3b437b Mon Sep 17 00:00:00 2001 From: miker Date: Tue, 8 Jul 2008 19:34:10 +0000 Subject: [PATCH] add status as a public note in exporter git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_1_2@9996 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/perlmods/OpenILS/WWW/Exporter.pm | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/Open-ILS/src/perlmods/OpenILS/WWW/Exporter.pm b/Open-ILS/src/perlmods/OpenILS/WWW/Exporter.pm index d02d4ff623..fba5fe6d85 100644 --- a/Open-ILS/src/perlmods/OpenILS/WWW/Exporter.pm +++ b/Open-ILS/src/perlmods/OpenILS/WWW/Exporter.pm @@ -88,11 +88,14 @@ sub handler { # still no records ... my $container = $cgi->param('containerid'); if ($container) { - my $authid = $cgi->cookie('ses') || $cgi->param('ses'); - my $auth = verify_login($authid); - if (!$auth) { - return 403; - } + my $bucket = $ses->request( 'open-ils.cstore.direct.container.biblio_record_entry_bucket.retrieve', $container )->gather(1); + if ($bucket->pub !~ /t|1/oi) { + my $authid = $cgi->cookie('ses') || $cgi->param('ses'); + my $auth = verify_login($authid); + if (!$auth) { + return 403; + } + } my $recs = $ses->request( 'open-ils.cstore.direct.container.biblio_record_entry_bucket_item.search.atomic', { bucket => $container } )->gather(1); @records = map { ($_->target_biblio_record_entry) } @$recs; } @@ -151,6 +154,7 @@ sub handler { my %orgs; my %shelves; + my %statuses; my $flesh = {}; if ($holdings) { @@ -175,6 +179,16 @@ sub handler { } $req->finish; + $req = $ses->request( 'open-ils.cstore.direct.config.copy_status.search', { id => { '!=' => undef } } ); + + while (my $s = $req->recv) { + next if ($req->failed); + $s = $s->content; + last unless ($s); + $statuses{$s->id} = $s; + } + $req->finish; + $flesh = { flesh => 2, flesh_fields => { bre => [ 'call_numbers' ], acn => [ 'copies' ] } }; } @@ -243,6 +257,7 @@ sub handler { ($cp->holdable eq 'f' ? ( x => 'unholdable' ) : ()), ($cp->circulate eq 'f' ? ( x => 'noncirculating' ) : ()), ($cp->opac_visible eq 'f' ? ( x => 'hidden' ) : ()), + z => $statuses{$cp->status}->name, ) ); @@ -315,7 +330,7 @@ sub show_template { -
Record Fromat: +
Record Format: