From: miker Date: Mon, 11 Oct 2010 20:42:46 +0000 (+0000) Subject: make the source selection less confusing, and improve some wording in the template... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=d422307324ff6d9a71cbf570d9b62a52d9fa6737;p=evergreen%2Fmasslnc.git make the source selection less confusing, and improve some wording in the template section (more to come) git-svn-id: svn://svn.open-ils.org/ILS/trunk@18272 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/src/perlmods/OpenILS/WWW/TemplateBatchBibUpdate.pm b/Open-ILS/src/perlmods/OpenILS/WWW/TemplateBatchBibUpdate.pm index b51d69ab32..ca527db38c 100644 --- a/Open-ILS/src/perlmods/OpenILS/WWW/TemplateBatchBibUpdate.pm +++ b/Open-ILS/src/perlmods/OpenILS/WWW/TemplateBatchBibUpdate.pm @@ -58,16 +58,19 @@ sub handler { my $usr = verify_login($authid); return show_template($r) unless ($usr); - my $template = $cgi->param('template'); return show_template($r) unless ($template); + + my $rsource = $cgi->param('recordSource'); # find some IDs ... my @records; - @records = map { $_ ? ($_) : () } $cgi->param('recid'); + if ($rsource eq 'r') { + @records = map { $_ ? ($_) : () } $cgi->param('recid'); + } - if (!@records) { # try for a file + if ($rsource eq 'c') { # try for a file my $file = $cgi->param('idfile'); if ($file) { my $col = $cgi->param('idcolumn') || 0; @@ -89,23 +92,25 @@ sub handler { # still no records ... my $container = $cgi->param('containerid'); - if ($container) { - my $bucket = $e->request( - 'open-ils.cstore.direct.container.biblio_record_entry_bucket.retrieve', - $container - )->gather(1); - unless($bucket) { - $e->request('open-ils.cstore.transaction.rollback')->gather(1); - $e->disconnect; - $r->log->error("No such bucket $container"); - $logger->error("No such bucket $container"); - return Apache2::Const::NOT_FOUND; + if ($rsource eq 'b') { + if ($container) { + my $bucket = $e->request( + 'open-ils.cstore.direct.container.biblio_record_entry_bucket.retrieve', + $container + )->gather(1); + unless($bucket) { + $e->request('open-ils.cstore.transaction.rollback')->gather(1); + $e->disconnect; + $r->log->error("No such bucket $container"); + $logger->error("No such bucket $container"); + return Apache2::Const::NOT_FOUND; + } + my $recs = $e->request( + 'open-ils.cstore.direct.container.biblio_record_entry_bucket_item.search.atomic', + { bucket => $container } + )->gather(1); + @records = map { ($_->target_biblio_record_entry) } @$recs; } - my $recs = $e->request( - 'open-ils.cstore.direct.container.biblio_record_entry_bucket_item.search.atomic', - { bucket => $container } - )->gather(1); - @records = map { ($_->target_biblio_record_entry) } @$recs; } unless (@records) { @@ -275,7 +280,7 @@ sub show_processing_template { - +
@@ -485,21 +490,22 @@ sub show_template { - +
+ + + + + + +
+ + +
Bucket named: