[open-ils-commits] [GIT] Evergreen ILS branch rel_2_12 updated. d8cd4e8f8d8d9efd5145d30a431cadae64f225f0

Evergreen Git git at git.evergreen-ils.org
Wed May 17 15:08:40 EDT 2017


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, rel_2_12 has been updated
       via  d8cd4e8f8d8d9efd5145d30a431cadae64f225f0 (commit)
      from  f8198ba45237a93fd930058a9a2c080ee32a04a7 (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 d8cd4e8f8d8d9efd5145d30a431cadae64f225f0
Author: Bill Erickson <berickxx at gmail.com>
Date:   Fri May 12 16:22:14 2017 -0400

    LP#1670242 Webstaff checkin transit holds addr fix
    
    Gracefully handle cases where a checkin results in a transit to a branch
    with no holds address.  Route dialog and print templates now display "We
    do not have a holds address for this library. "
    
    Signed-off-by: Bill Erickson <berickxx at gmail.com>
    Signed-off-by: Kathy Lussier <klussier at masslnc.org>

diff --git a/Open-ILS/src/templates/staff/circ/share/t_transit_dialog.tt2 b/Open-ILS/src/templates/staff/circ/share/t_transit_dialog.tt2
index 69d9271..2562e6a 100644
--- a/Open-ILS/src/templates/staff/circ/share/t_transit_dialog.tt2
+++ b/Open-ILS/src/templates/staff/circ/share/t_transit_dialog.tt2
@@ -14,8 +14,14 @@
       <div>
         <address>
           <strong>{{dest_location.name}}</strong><br>
-          {{dest_address.street1}} {{dest_address.street2}}<br/>
-          {{dest_address.city}}, {{dest_address.state}} {{dest_address.post_code}}<br/>
+          <span ng-if="dest_address">
+            {{dest_address.street1}} {{dest_address.street2}}<br/>
+            {{dest_address.city}}, {{dest_address.state}} {{dest_address.post_code}}
+          </span>
+          <span ng-if="!dest_address">
+            [% l('We do not have a holds address for this library.') %]
+          </span>
+          <br/>
           <abbr title="[% l('Phone') %]">P:</abbr> {{dest_location.phone}}
         </address>
       </div>
diff --git a/Open-ILS/src/templates/staff/share/print_templates/t_hold_transit_slip.tt2 b/Open-ILS/src/templates/staff/share/print_templates/t_hold_transit_slip.tt2
index eb002b8..a0aa6ef 100644
--- a/Open-ILS/src/templates/staff/share/print_templates/t_hold_transit_slip.tt2
+++ b/Open-ILS/src/templates/staff/share/print_templates/t_hold_transit_slip.tt2
@@ -24,11 +24,16 @@ Template for printing hold transit slips. Fields include:
 <div>
   <div>[% l('This item needs to be routed to [_1]', '<b>{{dest_location.shortname}}</b>') %]</div>
   <div>{{dest_location.name}}</div>
-  <div>{{dest_address.street1}}
-  <div>{{dest_address.street2}}</div>
-  <div>{{dest_address.city}},
-       {{dest_address.state}}
-       {{dest_address.post_code}}</div>
+  <div ng-if="dest_address">
+    <div>{{dest_address.street1}}</div>
+    <div>{{dest_address.street2}}</div>
+    <div>{{dest_address.city}},
+        {{dest_address.state}}
+        {{dest_address.post_code}}</div>
+  </div>
+  <div ng-if="!dest_address">
+    [% l('We do not have a holds address for this library.') %]
+  </div>
   <br/>
 
   [% l('Barcode: [_1]', '{{copy.barcode}}') %]</div>
diff --git a/Open-ILS/src/templates/staff/share/print_templates/t_transit_slip.tt2 b/Open-ILS/src/templates/staff/share/print_templates/t_transit_slip.tt2
index afd5aab..ccf9e8c 100644
--- a/Open-ILS/src/templates/staff/share/print_templates/t_transit_slip.tt2
+++ b/Open-ILS/src/templates/staff/share/print_templates/t_transit_slip.tt2
@@ -15,11 +15,16 @@ Template for printing a transit slip. Fields include:
 <div>
   <div>[% l('This item needs to be routed to [_1]', '<b>{{dest_location.shortname}}</b>') %]</div>
   <div>{{dest_location.name}}</div>
-  <div>{{dest_address.street1}}
-  <div>{{dest_address.street2}}</div>
-  <div>{{dest_address.city}},
-       {{dest_address.state}}
-       {{dest_address.post_code}}</div>
+  <div ng-if="dest_address">
+    <div>{{dest_address.street1}}</div>
+    <div>{{dest_address.street2}}</div>
+    <div>{{dest_address.city}},
+        {{dest_address.state}}
+        {{dest_address.post_code}}</div>
+  </div>
+  <div ng-if="!dest_address">
+    [% l('We do not have a holds address for this library.') %]
+  </div>
   <br/>
 
   [% l('Barcode: [_1]', '{{copy.barcode}}') %]</div>
diff --git a/Open-ILS/web/js/ui/default/staff/circ/services/circ.js b/Open-ILS/web/js/ui/default/staff/circ/services/circ.js
index 4c48ae6..d669400 100644
--- a/Open-ILS/web/js/ui/default/staff/circ/services/circ.js
+++ b/Open-ILS/web/js/ui/default/staff/circ/services/circ.js
@@ -624,6 +624,8 @@ function($uibModal , $q , egCore , egAlertDialog , egConfirmDialog,
         var org = egCore.org.get(org_id);
         var addr_id = org[addr_type]();
 
+        if (!addr_id) return $q.when(null);
+
         if (egCore.env.aoa && egCore.env.aoa.map[addr_id]) 
             return $q.when(egCore.env.aoa.map[addr_id]); 
 
@@ -1404,7 +1406,9 @@ function($uibModal , $q , egCore , egAlertDialog , egConfirmDialog,
                 // route_dialog includes the "route to holds shelf" 
                 // dialog, which has no transit
                 print_context.transit = egCore.idl.toHash(data.transit);
-                print_context.dest_address = egCore.idl.toHash(data.address);
+                if (data.address) {
+                    print_context.dest_address = egCore.idl.toHash(data.address);
+                }
                 print_context.dest_location =
                     egCore.idl.toHash(egCore.org.get(data.transit.dest()));
             }

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

Summary of changes:
 .../staff/circ/share/t_transit_dialog.tt2          |   10 ++++++++--
 .../share/print_templates/t_hold_transit_slip.tt2  |   15 ++++++++++-----
 .../staff/share/print_templates/t_transit_slip.tt2 |   15 ++++++++++-----
 .../web/js/ui/default/staff/circ/services/circ.js  |    6 +++++-
 4 files changed, 33 insertions(+), 13 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list