[open-ils-commits] r16832 - in trunk/Open-ILS: src/sql/Pg src/sql/Pg/upgrade web/css/skin/default web/opac/locale/en-US web/opac/skin/default/js web/opac/skin/default/xml/rdetail (senator)

svn at svn.open-ils.org svn at svn.open-ils.org
Tue Jun 29 17:51:41 EDT 2010


Author: senator
Date: 2010-06-29 17:51:34 -0400 (Tue, 29 Jun 2010)
New Revision: 16832

Added:
   trunk/Open-ILS/src/sql/Pg/upgrade/0323.data.booking.elbow_room.sql
Modified:
   trunk/Open-ILS/src/sql/Pg/002.schema.config.sql
   trunk/Open-ILS/src/sql/Pg/950.data.seed-values.sql
   trunk/Open-ILS/web/css/skin/default/booking.css
   trunk/Open-ILS/web/opac/locale/en-US/lang.dtd
   trunk/Open-ILS/web/opac/locale/en-US/opac.dtd
   trunk/Open-ILS/web/opac/skin/default/js/copy_details.js
   trunk/Open-ILS/web/opac/skin/default/xml/rdetail/rdetail_cn_details.xml
Log:
Booking: bit-by-bit forward-port; see commit msg for r16827


Modified: trunk/Open-ILS/src/sql/Pg/002.schema.config.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/002.schema.config.sql	2010-06-29 20:29:26 UTC (rev 16831)
+++ trunk/Open-ILS/src/sql/Pg/002.schema.config.sql	2010-06-29 21:51:34 UTC (rev 16832)
@@ -68,7 +68,7 @@
     install_date    TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW()
 );
 
-INSERT INTO config.upgrade_log (version) VALUES ('0322'); -- Scott McKellar
+INSERT INTO config.upgrade_log (version) VALUES ('0323'); -- senator
 
 CREATE TABLE config.bib_source (
 	id		SERIAL	PRIMARY KEY,

Modified: trunk/Open-ILS/src/sql/Pg/950.data.seed-values.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/950.data.seed-values.sql	2010-06-29 20:29:26 UTC (rev 16831)
+++ trunk/Open-ILS/src/sql/Pg/950.data.seed-values.sql	2010-06-29 21:51:34 UTC (rev 16832)
@@ -952,6 +952,17 @@
 
 UPDATE actor.org_unit SET holds_address = 1, ill_address = 1, billing_address = 1, mailing_address = 1;
 
+-- In booking, elbow room defines:
+--  a) how far in the future you must make a reservation on a given item if
+--      that item will have to transit somewhere to fulfill the reservation.
+--  b) how soon a reservation must be starting for the reserved item to
+--      be op-captured by the checkin interface.
+INSERT INTO actor.org_unit_setting (org_unit, name, value) VALUES (
+    (SELECT id FROM actor.org_unit WHERE parent_ou IS NULL),
+    'circ.booking_reservation.default_elbow_room',
+    '"1 day"'
+);
+
 INSERT INTO config.billing_type (id, name, owner) VALUES
 	( 1, oils_i18n_gettext(1, 'Overdue Materials', 'cbt', 'name'), 1);
 INSERT INTO config.billing_type (id, name, owner) VALUES
@@ -2118,6 +2129,26 @@
         'bool'
 );
 
+-- 0323.data.booking.elbow_room.sql
+INSERT INTO config.org_unit_setting_type
+    (name, label, description, datatype) VALUES (
+        'circ.booking_reservation.default_elbow_room',
+        oils_i18n_gettext(
+            'circ.booking_reservation.default_elbow_room',
+            'Booking: Elbow room',
+            'coust',
+            'label'
+        ),
+        oils_i18n_gettext(
+            'circ.booking_reservation.default_elbow_room',
+            'Elbow room specifies how far in the future you must make a reservation on an item if that item will have to transit to reach its pickup location.  It secondarily defines how soon a reservation on a given item must start before the check-in process will opportunistically capture it for the reservation shelf.',
+            'coust',
+            'label'
+        ),
+        'interval'
+    );
+
+
 -- Org_unit_setting_type(s) that need an fm_class:
 INSERT into config.org_unit_setting_type
 ( name, label, description, datatype, fm_class ) VALUES

Added: trunk/Open-ILS/src/sql/Pg/upgrade/0323.data.booking.elbow_room.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/upgrade/0323.data.booking.elbow_room.sql	                        (rev 0)
+++ trunk/Open-ILS/src/sql/Pg/upgrade/0323.data.booking.elbow_room.sql	2010-06-29 21:51:34 UTC (rev 16832)
@@ -0,0 +1,35 @@
+BEGIN;
+
+INSERT INTO config.upgrade_log (version) VALUES ('0323'); -- senator
+
+-- In booking, elbow room defines:
+--  a) how far in the future you must make a reservation on a given item if
+--      that item will have to transit somewhere to fulfill the reservation.
+--  b) how soon a reservation must be starting for the reserved item to
+--      be op-captured by the checkin interface.
+
+INSERT INTO config.org_unit_setting_type
+    (name, label, description, datatype) VALUES (
+        'circ.booking_reservation.default_elbow_room',
+        oils_i18n_gettext(
+            'circ.booking_reservation.default_elbow_room',
+            'Booking: Elbow room',
+            'coust',
+            'label'
+        ),
+        oils_i18n_gettext(
+            'circ.booking_reservation.default_elbow_room',
+            'Elbow room specifies how far in the future you must make a reservation on an item if that item will have to transit to reach its pickup location.  It secondarily defines how soon a reservation on a given item must start before the check-in process will opportunistically capture it for the reservation shelf.',
+            'coust',
+            'label'
+        ),
+        'interval'
+    );
+
+INSERT INTO actor.org_unit_setting (org_unit, name, value) VALUES (
+    (SELECT id FROM actor.org_unit WHERE parent_ou IS NULL),
+    'circ.booking_reservation.default_elbow_room',
+    '"1 day"'
+);
+
+COMMIT;

Modified: trunk/Open-ILS/web/css/skin/default/booking.css
===================================================================
--- trunk/Open-ILS/web/css/skin/default/booking.css	2010-06-29 20:29:26 UTC (rev 16831)
+++ trunk/Open-ILS/web/css/skin/default/booking.css	2010-06-29 21:51:34 UTC (rev 16832)
@@ -87,3 +87,21 @@
 div#no_ready_bresv, div#no_out_bresv, div#no_in_bresv {
     font-style: italic;
 }
+.tundra .dojoxGridRowSelected {
+    background-color: #006699 !important;
+    color: #ffffff;
+}
+.pull_list_resv_detail {
+    border-bottom: 1px dashed #999999;
+    margin-bottom: 4px;
+}
+.pull_list_will_transit { font-weight: bold; color: #ff6666; }
+iframe#printing_iframe {
+    border-top: 1px dashed #333333;
+    border-left: 0;
+    border-right: 0;
+    border-bottom: 0;
+}
+button.print_slip {
+    margin-left: 24px;
+}

Modified: trunk/Open-ILS/web/opac/locale/en-US/lang.dtd
===================================================================
--- trunk/Open-ILS/web/opac/locale/en-US/lang.dtd	2010-06-29 20:29:26 UTC (rev 16831)
+++ trunk/Open-ILS/web/opac/locale/en-US/lang.dtd	2010-06-29 21:51:34 UTC (rev 16832)
@@ -846,7 +846,8 @@
 
 <!ENTITY staff.main.menu.booking.label "Booking">
 <!ENTITY staff.main.menu.booking.accesskey "B">
-<!ENTITY staff.main.menu.booking.reservation.label "Create or Edit Reservations">
+<!ENTITY staff.main.menu.booking.reservation.label_alt "Create or Cancel Reservations">
+<!ENTITY staff.main.menu.booking.reservation.label "Create Reservations">
 <!ENTITY staff.main.menu.booking.reservation.accesskey "C">
 <!ENTITY staff.main.menu.booking.pull_list.label "Pull List">
 <!ENTITY staff.main.menu.booking.pull_list.accesskey "L">

Modified: trunk/Open-ILS/web/opac/locale/en-US/opac.dtd
===================================================================
--- trunk/Open-ILS/web/opac/locale/en-US/opac.dtd	2010-06-29 20:29:26 UTC (rev 16831)
+++ trunk/Open-ILS/web/opac/locale/en-US/opac.dtd	2010-06-29 21:51:34 UTC (rev 16832)
@@ -496,6 +496,7 @@
 <!ENTITY rdetail.cn.more "more info...">
 <!ENTITY rdetail.cn.less "less info">
 <!ENTITY rdetail.cn.hold "place hold">
+<!ENTITY rdetail.cn.reserve "book now">
 <!ENTITY rdetail.cn.disabled "- Disabled -">
 <!ENTITY rdetail.cn.note "Copy Note">
 <!ENTITY rdetail.cn.category "Copy Category">

Modified: trunk/Open-ILS/web/opac/skin/default/js/copy_details.js
===================================================================
--- trunk/Open-ILS/web/opac/skin/default/js/copy_details.js	2010-06-29 20:29:26 UTC (rev 16831)
+++ trunk/Open-ILS/web/opac/skin/default/js/copy_details.js	2010-06-29 21:51:34 UTC (rev 16832)
@@ -232,6 +232,29 @@
 			);
 		}
 
+		/* show the book now link */
+		l = $n(row, 'copy_reserve_link');
+		unHideMe(l);
+		l.onclick = function() {
+			// XXX FIXME this duplicates things in cat/util.js
+			// Also needs i18n
+			dojo.require("fieldmapper.Fieldmapper");
+			var r = fieldmapper.standardRequest(
+				["open-ils.booking",
+					"open-ils.booking.resources.create_from_copies"],
+				[G.user.session, [copy.id()]]
+			);
+			if (!r) {
+				alert("No response from server!");
+			} else if (r.ilsevent != undefined) {
+				alert("Error from server:\n" + js2JSON(r));
+			} else {
+				xulG.auth = {"session": {"key": G.user.session}};
+				xulG.bresv_interface_opts = {"booking_results": r};
+				location.href = "/eg/booking/reservation";
+			}
+		}
+
 		if( copy.age_protect() ) 
 			appendClear($n(row, 'age_protect_value'), text(copy.age_protect().name()));
 

Modified: trunk/Open-ILS/web/opac/skin/default/xml/rdetail/rdetail_cn_details.xml
===================================================================
--- trunk/Open-ILS/web/opac/skin/default/xml/rdetail/rdetail_cn_details.xml	2010-06-29 20:29:26 UTC (rev 16831)
+++ trunk/Open-ILS/web/opac/skin/default/xml/rdetail/rdetail_cn_details.xml	2010-06-29 21:51:34 UTC (rev 16832)
@@ -29,6 +29,8 @@
 									<a class='hide_me classic_link copy_more_info' name='less_details_link'>&rdetail.cn.less;</a>
 									<a class='hide_me classic_link copy_more_info' name='copy_hold_link' 
 										href='javascript:void(0);'>&rdetail.cn.hold;</a>
+									<a class='hide_me classic_link copy_more_info' name='copy_reserve_link' 
+										href='javascript:void(0);'>&rdetail.cn.reserve;</a>
 								</td>
 
 								<td name='status'> </td>



More information about the open-ils-commits mailing list