[open-ils-commits] r9864 - in trunk/Open-ILS: examples src/perlmods/OpenILS/Application/Storage/CDBI src/perlmods/OpenILS/Application/Storage/Publisher src/sql/Pg web/conify/global/config

svn at svn.open-ils.org svn at svn.open-ils.org
Wed Jun 18 23:07:35 EDT 2008


Author: miker
Date: 2008-06-18 23:07:33 -0400 (Wed, 18 Jun 2008)
New Revision: 9864

Modified:
   trunk/Open-ILS/examples/fm_IDL.xml
   trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/CDBI/config.pm
   trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/biblio.pm
   trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/metabib.pm
   trunk/Open-ILS/src/sql/Pg/002.schema.config.sql
   trunk/Open-ILS/src/sql/Pg/300.schema.staged_search.sql
   trunk/Open-ILS/src/sql/Pg/950.data.seed-values.sql
   trunk/Open-ILS/web/conify/global/config/copy_status.html
Log:
add opac_visible flag to config.copy_status; make Reserves status "available" in counts

Modified: trunk/Open-ILS/examples/fm_IDL.xml
===================================================================
--- trunk/Open-ILS/examples/fm_IDL.xml	2008-06-19 03:03:52 UTC (rev 9863)
+++ trunk/Open-ILS/examples/fm_IDL.xml	2008-06-19 03:07:33 UTC (rev 9864)
@@ -1532,6 +1532,7 @@
 			<field name="holdable" oils_obj:array_position="3" oils_persist:virtual="false" reporter:datatype="bool"/>
 			<field name="id" oils_obj:array_position="4" oils_persist:virtual="false" reporter:selector="name" reporter:datatype="id"/>
 			<field name="name" oils_obj:array_position="5" oils_persist:virtual="false"  reporter:datatype="text" oils_persist:i18n="true"/>
+			<field name="opac_visible" oils_obj:array_position="6" oils_persist:virtual="false" reporter:datatype="bool"/>
 		</fields>
 		<links/>
         <permacrud xmlns="http://open-ils.org/spec/opensrf/IDL/permacrud/v1">

Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/CDBI/config.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/CDBI/config.pm	2008-06-19 03:03:52 UTC (rev 9863)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/CDBI/config.pm	2008-06-19 03:07:33 UTC (rev 9864)
@@ -73,7 +73,7 @@
 use base qw/config/;
 __PACKAGE__->table('config_copy_status');
 __PACKAGE__->columns(Primary => 'id');
-__PACKAGE__->columns(Essential => qw/name holdable/);
+__PACKAGE__->columns(Essential => qw/name holdable opac_visible/);
 #-------------------------------------------------------------------------------
 
 package config::net_access_level;

Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/biblio.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/biblio.pm	2008-06-19 03:03:52 UTC (rev 9863)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/biblio.pm	2008-06-19 03:07:33 UTC (rev 9864)
@@ -61,7 +61,7 @@
 					$visible
 				  	AND cn.deleted IS FALSE
 					AND cp.deleted IS FALSE
-				  	AND cp.status IN (0,7))
+				  	AND cp.status IN (0,7,12))
 			) AS available,
 			sum(
 				(SELECT count(cp.id)
@@ -331,7 +331,7 @@
 					JOIN $cs_table cs ON (cs.id = cp.status)
 					JOIN $cl_table cl ON (cl.id = cp.location)
 				  WHERE	cn.record = ?
-				  	AND cp.status IN (0,7)
+				  	AND cp.status IN (0,7,12)
 				  	$copies_visible
 				  GROUP BY 1
                         			UNION

Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/metabib.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/metabib.pm	2008-06-19 03:03:52 UTC (rev 9863)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/metabib.pm	2008-06-19 03:07:33 UTC (rev 9864)
@@ -335,7 +335,7 @@
 			       		JOIN $cl_table cl ON (cp.location = cl.id)
 					JOIN $descendants a ON (cp.circ_lib = a.id)
 				  WHERE r.metarecord = ?
-				  	AND cp.status IN (0,7)
+				  	AND cp.status IN (0,7,12)
 				  	AND cn.deleted IS FALSE
 				  	AND cp.deleted IS FALSE
 					$copies_visible
@@ -1467,7 +1467,7 @@
 	my ($oa_filter, $ol_filter, $olf_filter) = ('','','');
 
 	if ($args{available}) {
-		$avail_filter = ' AND cp.status IN (0,7)';
+		$avail_filter = ' AND cp.status IN (0,7,12)';
 	}
 
 	if (my $a = $args{audience}) {
@@ -1957,7 +1957,7 @@
 	my ($oa_filter, $ol_filter, $olf_filter) = ('','','');
 
 	if ($args{available}) {
-		$avail_filter = ' AND cp.status IN (0,7)';
+		$avail_filter = ' AND cp.status IN (0,7,12)';
 	}
 
 	if (my $a = $args{audience}) {
@@ -2349,7 +2349,7 @@
 	my (@statuses, at locations, at types, at forms, at lang, at aud, at lit_form, at vformats, at bib_level);
 
 	if ($args{available}) {
-		@statuses = (0,7);
+		@statuses = (0,7,12);
 	}
 
 	if (my $s = $args{locations}) {

Modified: trunk/Open-ILS/src/sql/Pg/002.schema.config.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/002.schema.config.sql	2008-06-19 03:03:52 UTC (rev 9863)
+++ trunk/Open-ILS/src/sql/Pg/002.schema.config.sql	2008-06-19 03:07:33 UTC (rev 9864)
@@ -355,7 +355,8 @@
 CREATE TABLE config.copy_status (
 	id		SERIAL	PRIMARY KEY,
 	name		TEXT	NOT NULL UNIQUE,
-	holdable	BOOL	NOT NULL DEFAULT FALSE
+	holdable	BOOL	NOT NULL DEFAULT FALSE,
+	opac_visible	BOOL	NOT NULL DEFAULT FALSE
 );
 COMMENT ON TABLE config.copy_status IS $$
 /*

Modified: trunk/Open-ILS/src/sql/Pg/300.schema.staged_search.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/300.schema.staged_search.sql	2008-06-19 03:03:52 UTC (rev 9863)
+++ trunk/Open-ILS/src/sql/Pg/300.schema.staged_search.sql	2008-06-19 03:07:33 UTC (rev 9864)
@@ -460,7 +460,7 @@
                     JOIN config.copy_status cs ON (cp.status = cs.id)
               WHERE NOT cn.deleted
                     AND NOT cp.deleted
-                    AND cs.holdable
+                    AND cs.opac_visible
                     AND cl.opac_visible
                     AND cp.opac_visible
                     AND a.opac_visible
@@ -481,7 +481,6 @@
                     JOIN asset.copy cp ON (cp.call_number = cn.id)
                     JOIN actor.org_unit a ON (cp.circ_lib = a.id)
                     JOIN asset.copy_location cl ON (cp.location = cl.id)
-                    JOIN config.copy_status cs ON (cp.status = cs.id)
               WHERE NOT cn.deleted
                     AND NOT cp.deleted
                     AND cp.circ_lib IN ( SELECT * FROM search.explode_array( search_org_list ) )

Modified: trunk/Open-ILS/src/sql/Pg/950.data.seed-values.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/950.data.seed-values.sql	2008-06-19 03:03:52 UTC (rev 9863)
+++ trunk/Open-ILS/src/sql/Pg/950.data.seed-values.sql	2008-06-19 03:07:33 UTC (rev 9864)
@@ -97,23 +97,23 @@
 INSERT INTO config.rule_age_hold_protect VALUES (DEFAULT, oils_i18n_gettext('3month'), '3 months', 0);
 INSERT INTO config.rule_age_hold_protect VALUES (DEFAULT, oils_i18n_gettext('6month'), '6 months', 2);
 
-INSERT INTO config.copy_status (id,name,holdable)		VALUES (0,oils_i18n_gettext('Available'),'t');
+INSERT INTO config.copy_status (id,name,holdable,opac_visible)		VALUES (0,oils_i18n_gettext('Available'),'t','t');
 
-INSERT INTO config.copy_status (id,name,holdable)		VALUES (1,oils_i18n_gettext('Checked out'),'t');
+INSERT INTO config.copy_status (id,name,holdable,opac_visible)		VALUES (1,oils_i18n_gettext('Checked out'),'t','t');
 
 INSERT INTO config.copy_status (id,name)			VALUES (2,oils_i18n_gettext('Bindery'));
 INSERT INTO config.copy_status (id,name)			VALUES (3,oils_i18n_gettext('Lost'));
 INSERT INTO config.copy_status (id,name)			VALUES (4,oils_i18n_gettext('Missing'));
 
-INSERT INTO config.copy_status (id,name,holdable)		VALUES (5,oils_i18n_gettext('In process'),'t');
-INSERT INTO config.copy_status (id,name,holdable)		VALUES (6,oils_i18n_gettext('In transit'),'t');
-INSERT INTO config.copy_status (id,name,holdable)		VALUES (7,oils_i18n_gettext('Reshelving'),'t');
-INSERT INTO config.copy_status (id,name,holdable)		VALUES (8,oils_i18n_gettext('On holds shelf'),'t');
-INSERT INTO config.copy_status (id,name,holdable)		VALUES (9,oils_i18n_gettext('On order'),'t');
+INSERT INTO config.copy_status (id,name,holdable,opac_visible)		VALUES (5,oils_i18n_gettext('In process'),'t','t');
+INSERT INTO config.copy_status (id,name,holdable,opac_visible)		VALUES (6,oils_i18n_gettext('In transit'),'t','t');
+INSERT INTO config.copy_status (id,name,holdable,opac_visible)		VALUES (7,oils_i18n_gettext('Reshelving'),'t','t');
+INSERT INTO config.copy_status (id,name,holdable,opac_visible)		VALUES (8,oils_i18n_gettext('On holds shelf'),'t','t');
+INSERT INTO config.copy_status (id,name,holdable,opac_visible)		VALUES (9,oils_i18n_gettext('On order'),'t','t');
 
 INSERT INTO config.copy_status (id,name)			VALUES (10,oils_i18n_gettext('ILL'));
 INSERT INTO config.copy_status (id,name)			VALUES (11,oils_i18n_gettext('Cataloging'));
-INSERT INTO config.copy_status (id,name)			VALUES (12,oils_i18n_gettext('Reserves'));
+INSERT INTO config.copy_status (id,name,opac_visible)			VALUES (12,oils_i18n_gettext('Reserves'),'t');
 INSERT INTO config.copy_status (id,name)			VALUES (13,oils_i18n_gettext('Discard/Weed'));
 INSERT INTO config.copy_status (id,name)			VALUES (14,oils_i18n_gettext('Damaged'));
 

Modified: trunk/Open-ILS/web/conify/global/config/copy_status.html
===================================================================
--- trunk/Open-ILS/web/conify/global/config/copy_status.html	2008-06-19 03:03:52 UTC (rev 9863)
+++ trunk/Open-ILS/web/conify/global/config/copy_status.html	2008-06-19 03:07:33 UTC (rev 9864)
@@ -88,6 +88,9 @@
                             if (attr == 'holdable' && typeof n != 'string')
                                 this.setValue(item, 'holdable', n ? 't' : 'f');
 
+                            if (attr == 'opac_visible' && typeof n != 'string')
+                                this.setValue(item, 'opac_visible', n ? 't' : 'f');
+
                         };
 
                         dojo.addOnUnload( function (event) {
@@ -203,14 +206,26 @@
 										{ name : "Holdable",
 										  field : "holdable",
 										  editor : dojox.grid.editors.bool,
-                                          get : function (row) {
-	                                        var r = window.status_data_model.getRow(row);
+										  get : function (row) {
+											var r = window.status_data_model.getRow(row);
 											if (r) {
-		                                        var h = r.holdable;
-			                                    if (h == 't' || h === true) return true;
-				                                return false;
+												var h = r.holdable;
+												if (h == 't' || h === true) return true;
+												return false;
 											}
-                                          }
+										  }
+										},
+										{ name : "OPAC Visible",
+										  field : "opac_visible",
+										  editor : dojox.grid.editors.bool,
+										  get : function (row) {
+											var r = window.status_data_model.getRow(row);
+											if (r) {
+												var h = r.opac_visible;
+												if (h == 't' || h === true) return true;
+												return false;
+											}
+										  }
 										}
 									]
 								]



More information about the open-ils-commits mailing list