JBAS-1150 Record bucket 'deleted' column
authorBill Erickson <berickxx@gmail.com>
Fri, 20 May 2016 21:34:59 +0000 (17:34 -0400)
committerBill Erickson <berickxx@gmail.com>
Thu, 21 Mar 2019 19:46:23 +0000 (15:46 -0400)
Includes new 'deleted' column on 'mvr' class.

Signed-off-by: Bill Erickson <berickxx@gmail.com>
Open-ILS/examples/fm_IDL.xml
Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Biblio.pm
Open-ILS/xul/staff_client/server/cat/record_buckets.js

index f77f721..f7be967 100644 (file)
@@ -136,6 +136,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
                        <field name="series" oils_persist:virtual="true" />
                        <field name="serials" oils_persist:virtual="true" />
                        <field name="foreign_copy_maps" oils_persist:virtual="true" />
+                       <field name="deleted" oils_persist:virtual="true" />
                </fields>
        </class>
 
index 15f2f9c..95c5ee5 100644 (file)
@@ -79,6 +79,7 @@ sub _records_to_mods {
         my $mods = $u->finish_mods_batch();
         $mods->doc_id($content->id());
         $mods->tcn($content->tcn_value);
+        $mods->deleted($content->deleted);
         push @results, $mods;
     }
 
index 77b7408..0d1b8d6 100644 (file)
@@ -119,6 +119,20 @@ cat.record_buckets.prototype = {
             } 
         );
 
+        var col = columns.filter(function(c) {return c.id == 'deleted'})[0];
+        if (col) {
+            // JBAS-1150 Turn the deleted column into a reference to the bib
+            // record's deleted column instead of the copy's deleted column.
+            col.fm_class = 'mvr';
+            col.label = 'Record Deleted?'; 
+            col.render = function(my) {
+                if (!my.mvr) return;
+                var key = get_bool(my.mvr.deleted()) ? 
+                    'staff.circ.utils.yes' : 'staff.circ.utils.no';
+                return document.getElementById('circStrings').getString(key);
+            }
+        }
+
         JSAN.use('util.list'); 
 
         function retrieve_row(params) {