LP#1370694: don't update already-customized format.selfcheck.holds
authorGalen Charlton <gmc@esilibrary.com>
Mon, 14 Mar 2016 21:33:49 +0000 (17:33 -0400)
committerGalen Charlton <gmc@esilibrary.com>
Mon, 14 Mar 2016 21:33:59 +0000 (17:33 -0400)
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Open-ILS/src/sql/Pg/upgrade/XXXX.data.selfcheck_holds_printing.sql

index 9481302..e254c24 100644 (file)
@@ -1,6 +1,6 @@
 BEGIN;
 
-SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
+-- SELECT evergreen.upgrade_deps_block_check('XXXX', :eg_version);
 
 UPDATE action_trigger.event_definition SET template = 
 $$
@@ -36,6 +36,39 @@ $$
     </ol>
 </div>
 
-$$ WHERE id=12;
+$$ WHERE id=12
+AND template = 
+$$
+[%- USE date -%]
+[%- SET user = target.0.usr -%]
+<div>
+    <style> li { padding: 8px; margin 5px; }</style>
+    <div>[% date.format %]</div>
+    <br/>
+
+    [% user.family_name %], [% user.first_given_name %]
+    <ol>
+    [% FOR hold IN target %]
+        [%-
+            SET idx = loop.count - 1;
+            SET udata =  user_data.$idx
+        -%]
+        <li>
+            <div>Title: [% hold.bib_rec.bib_record.simple_record.title %]</div>
+            <div>Author: [% hold.bib_rec.bib_record.simple_record.author %]</div>
+            <div>Pickup Location: [% hold.pickup_lib.name %]</div>
+            <div>Status: 
+                [%- IF udata.ready -%]
+                    Ready for pickup
+                [% ELSE %]
+                    #[% udata.queue_position %] of [% udata.potential_copies %] copies.
+                [% END %]
+            </div>
+        </li>
+    [% END %]
+    </ol>
+</div>
+$$
+;
 
-COMMIT;
\ No newline at end of file
+COMMIT;