Booking: bit-by-bit forward-port; see commit msg for r16827
authorsenator <senator@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 29 Jun 2010 21:51:34 +0000 (21:51 +0000)
committersenator <senator@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 29 Jun 2010 21:51:34 +0000 (21:51 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@16832 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/sql/Pg/002.schema.config.sql
Open-ILS/src/sql/Pg/950.data.seed-values.sql
Open-ILS/src/sql/Pg/upgrade/0323.data.booking.elbow_room.sql [new file with mode: 0644]
Open-ILS/web/css/skin/default/booking.css
Open-ILS/web/opac/locale/en-US/lang.dtd
Open-ILS/web/opac/locale/en-US/opac.dtd
Open-ILS/web/opac/skin/default/js/copy_details.js
Open-ILS/web/opac/skin/default/xml/rdetail/rdetail_cn_details.xml

index ca3b0eb..5e6bdcf 100644 (file)
@@ -68,7 +68,7 @@ CREATE TABLE config.upgrade_log (
     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,
index b7fd545..78e1fe0 100644 (file)
@@ -952,6 +952,17 @@ INSERT INTO actor.org_address VALUES (DEFAULT,DEFAULT,DEFAULT,1,'123 Main St.',N
 
 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 @@ INSERT INTO config.org_unit_setting_type ( name, label, description, datatype )
         '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
diff --git a/Open-ILS/src/sql/Pg/upgrade/0323.data.booking.elbow_room.sql b/Open-ILS/src/sql/Pg/upgrade/0323.data.booking.elbow_room.sql
new file mode 100644 (file)
index 0000000..514c056
--- /dev/null
@@ -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;
index 2c42404..f020ded 100644 (file)
@@ -87,3 +87,21 @@ div#patron_info { font-size: 12pt; font-weight: bold; }
 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;
+}
index f8ec360..60bd730 100644 (file)
 
 <!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">
index 3ea8c4c..9c74dd3 100644 (file)
@@ -496,6 +496,7 @@ Please see a librarian to renew your account.">
 <!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">
index 94adfd1..e5c50c0 100644 (file)
@@ -232,6 +232,29 @@ function cpdDrawCopy(r) {
                        );
                }
 
+               /* 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()));
 
index 0da7af9..09765fd 100644 (file)
@@ -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>