[open-ils-commits] [GIT] Evergreen ILS branch master updated. 38b6cf81e44f8ab852222911a7d8b646f45b7311

Evergreen Git git at git.evergreen-ils.org
Fri Jan 20 15:08:27 EST 2012


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, master has been updated
       via  38b6cf81e44f8ab852222911a7d8b646f45b7311 (commit)
       via  7a2bae093fb6b590b11cdb034264636eb851e298 (commit)
      from  293df1f82290c99346028e03f2984e21811eee3a (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 38b6cf81e44f8ab852222911a7d8b646f45b7311
Author: Bill Erickson <berick at esilibrary.com>
Date:   Fri Jan 20 15:07:25 2012 -0500

    Stamping upgrade for copy_location_alert
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/src/sql/Pg/002.schema.config.sql b/Open-ILS/src/sql/Pg/002.schema.config.sql
index 5958ac7..06ef826 100644
--- a/Open-ILS/src/sql/Pg/002.schema.config.sql
+++ b/Open-ILS/src/sql/Pg/002.schema.config.sql
@@ -86,7 +86,7 @@ CREATE TRIGGER no_overlapping_deps
     BEFORE INSERT OR UPDATE ON config.db_patch_dependencies
     FOR EACH ROW EXECUTE PROCEDURE evergreen.array_overlap_check ('deprecates');
 
-INSERT INTO config.upgrade_log (version, applied_to) VALUES ('0670', :eg_version); -- berick/senator
+INSERT INTO config.upgrade_log (version, applied_to) VALUES ('0671', :eg_version); -- tsbere/berick
 
 CREATE TABLE config.bib_source (
 	id		SERIAL	PRIMARY KEY,
diff --git a/Open-ILS/src/sql/Pg/upgrade/0671.schema.copy_location_alert.sql b/Open-ILS/src/sql/Pg/upgrade/0671.schema.copy_location_alert.sql
new file mode 100644
index 0000000..39d84e2
--- /dev/null
+++ b/Open-ILS/src/sql/Pg/upgrade/0671.schema.copy_location_alert.sql
@@ -0,0 +1,8 @@
+BEGIN;
+
+SELECT evergreen.upgrade_deps_block_check('0671', :eg_version);
+
+ALTER TABLE asset.copy_location
+    ADD COLUMN checkin_alert BOOL NOT NULL DEFAULT FALSE;
+
+COMMIT;
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.copy_location_alert.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.copy_location_alert.sql
deleted file mode 100644
index 5c48390..0000000
--- a/Open-ILS/src/sql/Pg/upgrade/XXXX.copy_location_alert.sql
+++ /dev/null
@@ -1,2 +0,0 @@
-ALTER TABLE asset.copy_location
-    ADD COLUMN checkin_alert BOOL NOT NULL DEFAULT FALSE;

commit 7a2bae093fb6b590b11cdb034264636eb851e298
Author: Thomas Berezansky <tsbere at mvlc.org>
Date:   Wed Jan 18 11:28:13 2012 -0500

    Add Checkin Alert to Copy Locations
    
    If enabled bring up a ROUTE TO prompt for the location at reshelving time.
    
    Also, while at it, add Prefix/Suffix to the "new" section of the editor.
    
    Signed-off-by: Thomas Berezansky <tsbere at mvlc.org>
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/examples/fm_IDL.xml b/Open-ILS/examples/fm_IDL.xml
index 8c481ec..4b63e64 100644
--- a/Open-ILS/examples/fm_IDL.xml
+++ b/Open-ILS/examples/fm_IDL.xml
@@ -3772,6 +3772,7 @@ SELECT  usr,
 			<field reporter:label="Copies" name="copies" oils_persist:virtual="true" reporter:datatype="link"/>
 			<field reporter:label="Label Prefix" name="label_prefix"  reporter:datatype="text" oils_persist:i18n="true"/>
 			<field reporter:label="Label Suffix" name="label_suffix"  reporter:datatype="text" oils_persist:i18n="true"/>
+			<field reporter:label="Checkin Alert" name="checkin_alert" reporter:datatype="bool" />
 		</fields>
 		<links>
 			<link field="owning_lib" reltype="has_a" key="id" map="" class="aou"/>
diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/CDBI/asset.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/CDBI/asset.pm
index 2b541cc..2c84f62 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/CDBI/asset.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/CDBI/asset.pm
@@ -10,7 +10,7 @@ use base qw/asset/;
 
 __PACKAGE__->table( 'asset_copy_location' );
 __PACKAGE__->columns( Primary => qw/id/ );
-__PACKAGE__->columns( Essential => qw/name owning_lib holdable hold_verify opac_visible circulate label_prefix label_suffix/ );
+__PACKAGE__->columns( Essential => qw/name owning_lib holdable hold_verify opac_visible circulate label_prefix label_suffix checkin_alert/ );
 
 #-------------------------------------------------------------------------------
 package asset::copy_location_order;
diff --git a/Open-ILS/src/sql/Pg/040.schema.asset.sql b/Open-ILS/src/sql/Pg/040.schema.asset.sql
index 3beb24e..92fd81c 100644
--- a/Open-ILS/src/sql/Pg/040.schema.asset.sql
+++ b/Open-ILS/src/sql/Pg/040.schema.asset.sql
@@ -31,6 +31,7 @@ CREATE TABLE asset.copy_location (
 	circulate	BOOL	NOT NULL DEFAULT TRUE,
 	label_prefix	TEXT,
 	label_suffix	TEXT,
+	checkin_alert	BOOL	NOT NULL DEFAULT FALSE,
 	CONSTRAINT acl_name_once_per_lib UNIQUE (name, owning_lib)
 );
 
diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.copy_location_alert.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.copy_location_alert.sql
new file mode 100644
index 0000000..5c48390
--- /dev/null
+++ b/Open-ILS/src/sql/Pg/upgrade/XXXX.copy_location_alert.sql
@@ -0,0 +1,2 @@
+ALTER TABLE asset.copy_location
+    ADD COLUMN checkin_alert BOOL NOT NULL DEFAULT FALSE;
diff --git a/Open-ILS/web/opac/locale/en-US/lang.dtd b/Open-ILS/web/opac/locale/en-US/lang.dtd
index 1af018f..a3a9e7d 100644
--- a/Open-ILS/web/opac/locale/en-US/lang.dtd
+++ b/Open-ILS/web/opac/locale/en-US/lang.dtd
@@ -1976,7 +1976,11 @@
 <!ENTITY staff.server.admin.copy_locations.editor.delete.confirm "Are you sure you wish to delete the selected copy location?  Note: If copies are currently attached to this location, the delete operation will fail.">
 <!ENTITY staff.server.admin.copy_locations.editor.prefix "Label prefix">
 <!ENTITY staff.server.admin.copy_locations.editor.suffix "Label suffix">
+<!ENTITY staff.server.admin.copy_locations.editor.prefix.label "Label prefix: ">
+<!ENTITY staff.server.admin.copy_locations.editor.suffix.label "Label suffix: ">
 <!ENTITY staff.server.admin.copy_locations.editor.welcome "Welcome">
+<!ENTITY staff.server.admin.copy_locations.editor.checkin_alert.label "Checkin Alert: ">
+<!ENTITY staff.server.admin.copy_locations.editor.checkin_alert "Checkin Alert">
 <!ENTITY staff.server.admin.copy_locations.submit "Submit">
 <!ENTITY staff.server.admin.copy_locations.cancel "Cancel">
 <!ENTITY staff.server.admin.copy_locations.update_success "Update Succeeded">
diff --git a/Open-ILS/xul/staff_client/server/admin/copy_locations.js b/Open-ILS/xul/staff_client/server/admin/copy_locations.js
index cd673cc..542a33d 100644
--- a/Open-ILS/xul/staff_client/server/admin/copy_locations.js
+++ b/Open-ILS/xul/staff_client/server/admin/copy_locations.js
@@ -114,6 +114,9 @@ function clCreateNew() {
     cl.hold_verify( ($('cl_new_hold_verify_yes').checked) ? 1 : 0 );
     cl.opac_visible( ($('cl_new_vis_yes').checked) ? 1 : 0 );
     cl.circulate( ($('cl_new_circulate_yes').checked) ? 1 : 0 );
+    cl.checkin_alert( $('cl_new_checkin_alert_yes').checked ? 1 : 0 );
+    cl.label_prefix( $('cl_new_label_prefix').value );
+    cl.label_suffix( $('cl_new_label_suffix').value );
 
     var req = new Request(CREATE_CL, SESSION, cl);
     req.send(true);
@@ -160,6 +163,7 @@ function clBuildRow( tbody, row, cl ) {
     appendClear($n( row, 'cl_hold_verify'), (isTrue(cl.hold_verify())) ? _TRUE.cloneNode(true) : _FALSE.cloneNode(true) );
     appendClear($n( row, 'cl_visible'), (isTrue(cl.opac_visible())) ? _TRUE.cloneNode(true) : _FALSE.cloneNode(true) );
     appendClear($n( row, 'cl_circulate'), (isTrue(cl.circulate())) ? _TRUE.cloneNode(true) : _FALSE.cloneNode(true) );
+    appendClear($n( row, 'cl_checkin_alert'), (isTrue(cl.checkin_alert())) ? _TRUE.cloneNode(true) : _FALSE.cloneNode(true) );
     $n( row, 'cl_label_prefix').appendChild(text(cl.label_prefix() || ''));
     $n( row, 'cl_label_suffix').appendChild(text(cl.label_suffix() || ''));
 
@@ -202,6 +206,8 @@ function clEdit( cl, tbody, row ) {
     else arr[5].checked = true;
     if(isTrue(cl.hold_verify())) arr[6].checked = true;
     else arr[7].checked = true;
+    if(isTrue(cl.checkin_alert())) arr[8].checked = true;
+    else arr[9].checked = true;
 
     var label_prefix = $n(r, 'cl_edit_label_prefix');
     if (cl.label_prefix()) {
@@ -237,6 +243,8 @@ function _clOptions(r) {
     arr[5] = $n( $n(r,'cl_edit_circulate_no'), 'cl_edit_circulate');
     arr[6] = $n( $n(r,'cl_edit_hold_verify_yes'), 'cl_edit_hold_verify');
     arr[7] = $n( $n(r,'cl_edit_hold_verify_no'), 'cl_edit_hold_verify');
+    arr[8] = $n( $n(r,'cl_edit_checkin_alert_yes'), 'cl_edit_checkin_alert');
+    arr[9] = $n( $n(r,'cl_edit_checkin_alert_no'), 'cl_edit_checkin_alert');
     return arr;
 }
 
@@ -251,6 +259,8 @@ function clEditCommit( tbody, r, cl ) {
     else cl.circulate(0);
     if(arr[6].checked) cl.hold_verify(1);
     else cl.hold_verify(0);
+    if(arr[8].checked) cl.checkin_alert(1);
+    else cl.checkin_alert(0);
     cl.name($n(r, 'cl_edit_name').value);
     cl.label_prefix($n(r, 'cl_edit_label_prefix').value);
     cl.label_suffix($n(r, 'cl_edit_label_suffix').value);
diff --git a/Open-ILS/xul/staff_client/server/admin/copy_locations.xhtml b/Open-ILS/xul/staff_client/server/admin/copy_locations.xhtml
index d42234b..66c5601 100644
--- a/Open-ILS/xul/staff_client/server/admin/copy_locations.xhtml
+++ b/Open-ILS/xul/staff_client/server/admin/copy_locations.xhtml
@@ -95,6 +95,28 @@
                         </td>
                     </tr>
                     <tr>
+                        <td>&staff.server.admin.copy_locations.editor.checkin_alert.label;</td>
+                        <td>
+                            <span>&staff.server.admin.copy_locations.editor.yes;</span>
+                            <input type='radio' name='cl_new_checkin_alert' id='cl_new_checkin_alert_yes'/>
+                            <span>&staff.server.admin.copy_locations.editor.no;</span>
+                            <input type='radio' name='cl_new_checkin_alert'  
+                                id='cl_new_checkin_alert_no' checked='checked'> </input>
+                        </td>
+                        <td>&nbsp;</td>
+                        <td>&nbsp;</td>
+                    </tr>
+                    <tr>
+                        <td>&staff.server.admin.copy_locations.editor.prefix.label;</td>
+                        <td>
+                            <input id='cl_new_label_prefix' type='text' size='10'/>
+                        </td>
+                        <td>&staff.server.admin.copy_locations.editor.suffix.label;</td>
+                        <td>
+                            <input id='cl_new_label_suffix' type='text' size='10'/>
+                        </td>
+                    </tr>
+                    <tr>
                         <td colspan='4'><input id='sc_new_submit' type='submit' value='&staff.server.admin.copy_locations.editor.create;' disabled='disabled'/></td>
                     </tr>
                 </tbody>
@@ -115,6 +137,7 @@
                         <td width=''>&staff.server.admin.copy_locations.editor.hold_verify;</td>
                         <td width=''>&staff.server.admin.copy_locations.editor.opac_visible;</td>
                         <td width=''>&staff.server.admin.copy_locations.editor.circulate;</td>
+                        <td width=''>&staff.server.admin.copy_locations.editor.checkin_alert;</td>
                         <td width=''>&staff.server.admin.copy_locations.editor.prefix;</td>
                         <td width=''>&staff.server.admin.copy_locations.editor.suffix;</td>
                         <td width=''>&staff.server.admin.copy_locations.editor.edit;</td>
@@ -132,6 +155,7 @@
                         <td name='cl_hold_verify'> </td>
                         <td name='cl_visible'> </td>
                         <td name='cl_circulate'> </td>
+                        <td name='cl_checkin_alert'> </td>
                         <td name='cl_label_prefix'> </td>
                         <td name='cl_label_suffix'> </td>
                         <td><input type='submit' value='&staff.server.admin.copy_locations.editor.edit;' name='cl_edit' disabled='disabled'> </input></td>
@@ -197,6 +221,16 @@
                                 <input type='radio' name='cl_edit_circulate'/>
                             </span>
                         </td>
+                        <td>
+                            <span>&staff.server.admin.copy_locations.editor.yes;</span>
+                            <span name='cl_edit_checkin_alert_yes'>
+                                <input type='radio' name='cl_edit_checkin_alert'/>
+                            </span>
+                            <span>&staff.server.admin.copy_locations.editor.no;</span>
+                            <span name='cl_edit_checkin_alert_no'>
+                                <input type='radio' name='cl_edit_checkin_alert'/>
+                            </span>
+                        </td>
                         <td><input name='cl_edit_label_prefix' type='text'> </input></td>
                         <td><input name='cl_edit_label_suffix' type='text'> </input></td>
                         <td><input type='submit' name='cl_edit_commit' value='&staff.server.admin.copy_locations.submit;'/></td>
diff --git a/Open-ILS/xul/staff_client/server/circ/util.js b/Open-ILS/xul/staff_client/server/circ/util.js
index c692edd..76ab082 100644
--- a/Open-ILS/xul/staff_client/server/circ/util.js
+++ b/Open-ILS/xul/staff_client/server/circ/util.js
@@ -2791,10 +2791,15 @@ circ.util.checkin_via_barcode2 = function(session,params,backdate,auto_print,che
             msg += '\n\n';
         }
 
+        var suppress_popups = data.hash.aous['ui.circ.suppress_checkin_popups'];
+
         /* SUCCESS  /  NO_CHANGE  /  ITEM_NOT_CATALOGED */
         if (check.ilsevent == 0 || check.ilsevent == 3 || check.ilsevent == 1202) {
-            try { check.route_to = data.lookup('acpl', check.copy.location() ).name(); }
-            catch(E) {
+            try {
+                var acpl = data.lookup('acpl', check.copy.location()); 
+                check.route_to = acpl.name();
+                check.checkin_alert = isTrue(acpl.checkin_alert()) && !suppress_popups;
+            } catch(E) {
                 print_data.error_msg = document.getElementById('commonStrings').getString('common.error');
                 print_data.error_msg += '\nFIXME: ' + E + '\n';
                 msg += print_data.error_msg;
@@ -2832,7 +2837,7 @@ circ.util.checkin_via_barcode2 = function(session,params,backdate,auto_print,che
                 case 7: /* RESHELVING */
                     check.what_happened = 'success';
                     sound.special('checkin.success');
-                    if (msg) {
+                    if (msg || check.checkin_alert) {
                         print_data.route_to_msg = document.getElementById('circStrings').getFormattedString('staff.circ.utils.route_to.msg', [check.route_to]);
                         print_data.route_to = check.route_to;
                         msg += print_data.route_to_msg;
@@ -2994,7 +2999,6 @@ circ.util.checkin_via_barcode2 = function(session,params,backdate,auto_print,che
                         msg += '\n';
                     }
                     var rv = 0;
-                    var suppress_popups = data.hash.aous['ui.circ.suppress_checkin_popups'];
                     if (suppress_popups) {
                         rv = auto_print ? 0 : -1; auto_print = true; // skip dialog and PRINT or DO NOT PRINT based on Auto-Print checkbox
                     }
@@ -3088,7 +3092,6 @@ circ.util.checkin_via_barcode2 = function(session,params,backdate,auto_print,che
                     sound.special('checkin.cataloging');
                     check.route_to = 'CATALOGING';
                     print_data.route_to;
-                    var suppress_popups = data.hash.aous['ui.circ.suppress_checkin_popups'];
                     var x = document.getElementById('do_not_alert_on_precat');
                     var do_not_alert_on_precats = x ? ( x.getAttribute('checked') == 'true' ) : false;
                     if ( !suppress_popups && !do_not_alert_on_precats ) {
@@ -3401,7 +3404,6 @@ circ.util.checkin_via_barcode2 = function(session,params,backdate,auto_print,che
                 }
             }
             var rv = 0;
-            var suppress_popups = data.hash.aous['ui.circ.suppress_checkin_popups'];
             if (suppress_popups) {
                 rv = auto_print ? 0 : -1; auto_print = true; // skip dialog and PRINT or DO NOT PRINT based on Auto-Print checkbox
             }
@@ -3483,7 +3485,6 @@ circ.util.checkin_via_barcode2 = function(session,params,backdate,auto_print,che
             sound.special('checkin.not_found');
             check.route_to = 'CATALOGING';
             var mis_scan_msg = document.getElementById('circStrings').getFormattedString('staff.circ.copy_status.status.copy_not_found', [params.barcode]);
-            var suppress_popups = data.hash.aous['ui.circ.suppress_checkin_popups'];
             if (!suppress_popups) {
                 error.yns_alert(
                     mis_scan_msg,
@@ -3515,7 +3516,6 @@ circ.util.checkin_via_barcode2 = function(session,params,backdate,auto_print,che
             sound.special('checkin.hold_capture_delayed');
             var rv = 0;
             msg += document.getElementById('circStrings').getString('staff.circ.utils.hold_capture_delayed.description');
-            var suppress_popups = data.hash.aous['ui.circ.suppress_checkin_popupst'];
             if (!suppress_popups) {
                 rv = error.yns_alert_formatted(
                     msg,

-----------------------------------------------------------------------

Summary of changes:
 Open-ILS/examples/fm_IDL.xml                       |    1 +
 .../lib/OpenILS/Application/Storage/CDBI/asset.pm  |    2 +-
 Open-ILS/src/sql/Pg/002.schema.config.sql          |    2 +-
 Open-ILS/src/sql/Pg/040.schema.asset.sql           |    1 +
 .../Pg/upgrade/0671.schema.copy_location_alert.sql |    8 +++++
 Open-ILS/web/opac/locale/en-US/lang.dtd            |    4 ++
 .../staff_client/server/admin/copy_locations.js    |   10 ++++++
 .../staff_client/server/admin/copy_locations.xhtml |   34 ++++++++++++++++++++
 Open-ILS/xul/staff_client/server/circ/util.js      |   16 +++++-----
 9 files changed, 68 insertions(+), 10 deletions(-)
 create mode 100644 Open-ILS/src/sql/Pg/upgrade/0671.schema.copy_location_alert.sql


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list