Make copy status visibility match default config.copy_status settings
authorDan Scott <dan@coffeecode.net>
Mon, 6 Jun 2011 17:38:17 +0000 (13:38 -0400)
committerDan Scott <dan@coffeecode.net>
Mon, 13 Jun 2011 14:04:30 +0000 (10:04 -0400)
Previous version of this patch had hardcoded copy status settings to
0, 7, 12 to match the "Available" settings, rather than the OPAC
visibility settings available from config.copy_status for each status.

Until config.copy_status.opac_visible translates into an opac_visible
attribute on the status element in the holdings XML, this is probably
the best we can do.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Open-ILS/web/opac/skin/default/xml/result/result_table.xml

index 517ce19..8838a80 100644 (file)
                                                 return;
                                             }
 
-                                            /* Hardcoded check for copy status 0, 7, or 12 */
+                                            /* 
+                                               Hardcoded check for copy statuses per default opac_visible
+                                               setting in config.copy_status; replace with a copy attribute
+                                               check for visible status if holdings_xml ever gets that
+                                            */
                                             var ident;
                                             dojo.query('status', cp).forEach(function (status) {
                                                 ident = status.getAttribute('ident');
                                             });
-                                            if (parseInt(ident) !== 0 && 
-                                                parseInt(ident) != 7 &&
-                                                parseInt(ident) != 12) {
+                                            if (parseInt(ident) !== 0 && /* Available */
+                                                parseInt(ident) != 1 &&  /* Checked out */
+                                                parseInt(ident) != 5 &&  /* In process */
+                                                parseInt(ident) != 6 &&  /* In transit */
+                                                parseInt(ident) != 7 &&  /* Reshelving */
+                                                parseInt(ident) != 8 &&  /* On holds shelf */
+                                                parseInt(ident) != 9 &&  /* On order */
+                                                parseInt(ident) != 12
+                                            ) {
                                                 return;
                                             }