added ability to only fetch/dislplay non-imported recs in queue retrieval. hiding...
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 26 Sep 2008 20:19:19 +0000 (20:19 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Fri, 26 Sep 2008 20:19:19 +0000 (20:19 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@10713 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/Application/Vandelay.pm
Open-ILS/web/vandelay/vandelay.js
Open-ILS/web/vandelay/vandelay.xml

index 7d150ea..6842f81 100644 (file)
@@ -342,14 +342,16 @@ sub retrieve_queue {
     my $retrieve = ($type eq 'bib') ? 
         'retrieve_vandelay_queued_bib_record' : 'retrieve_vandelay_queued_authority_record';
 
+    my $filter = ($$options{non_imported}) ? {import_time => undef} : {};
+
     my $record_ids;
     if($self->api_name =~ /matches/) {
         # fetch only matched records
-        $record_ids = queued_records_with_matches($e, $type, $queue_id, $limit, $offset);
+        $record_ids = queued_records_with_matches($e, $type, $queue_id, $limit, $offset, $filter);
     } else {
         # fetch all queue records
         $record_ids = $e->$search([
-                {queue => $queue_id}, 
+                {queue => $queue_id, %$filter}, 
                 {order_by => {$class => 'id'}, limit => $limit, offset => $offset}
             ],
             {idlist => 1}
index 2e05118..9878c00 100644 (file)
@@ -266,6 +266,11 @@ function retrieveQueuedRecords(type, queueId, onload) {
     var method = 'open-ils.vandelay.'+type+'_queue.records.retrieve.atomic';
     if(vlQueueGridShowMatches.checked)
         method = method.replace('records', 'records.matches');
+    var params = [authtoken, queueId, {clear_marc: 1, offset: offset, limit: limit}];
+
+    if(vlQueueGridShowNonImport.checked)
+        params[2].non_imported = 1;
+        
 
     var limit = parseInt(vlQueueDisplayLimit.getValue());
     var offset = limit * parseInt(vlQueueDisplayPage.getValue()-1);
@@ -273,12 +278,8 @@ function retrieveQueuedRecords(type, queueId, onload) {
     fieldmapper.standardRequest(
         ['open-ils.vandelay', method],
         {   async: true,
-            params: [authtoken, queueId, 
-                {   clear_marc: 1, 
-                    offset: offset,
-                    limit: limit
-                }
-            ],
+            params: params,
+
             /* intermittent bug in streaming, multipart requests prevents use of onreponse for now...
             onresponse: function(r) {
                 var rec = r.recv().content();
index fc1fd38..e591eaf 100644 (file)
                                         <input dojoType='dijit.form.CheckBox' jsId='vlQueueGridShowMatches' checked='checked'/>
                                     </td>
                                     <td class='filter_td' style='padding-left:5px;'>
+                                        Limit to Non-Imported Records 
+                                        <input dojoType='dijit.form.CheckBox' jsId='vlQueueGridShowNonImport' checked='checked'/>
+                                    </td>
+                                    <td class='filter_td' style='padding-left:5px;'>
                                         Results Per Page 
                                         <select style='width:68px;' jsId='vlQueueDisplayLimit' dojoType='dijit.form.FilteringSelect' value='10'>
                                             <option value='10'>10</option>
 
        </div>
 
+        <!--
         <div style='text-align:center;width:100%;' dojoType="dijit.layout.ContentPane" layoutAlign='bottom'>
             Powered by Evergreen!
         </div>
+        -->
       </div>
     </body>
 </html>