LP#1749475 Remove extra whitespace from email trigger template
authorMichele Morgan <mmorgan@noblenet.org>
Tue, 25 Aug 2020 13:33:09 +0000 (09:33 -0400)
committerGalen Charlton <gmc@equinoxinitiative.org>
Mon, 14 Sep 2020 13:43:02 +0000 (09:43 -0400)
Removes extra line breaks from email template output.

Signed-off-by: Michele Morgan <mmorgan@noblenet.org>
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>

Open-ILS/src/sql/Pg/950.data.seed-values.sql
Open-ILS/src/sql/Pg/upgrade/XXXX.schema.AT-def-groups.sql

index 3eab0bd..28be205 100644 (file)
@@ -12029,7 +12029,7 @@ Date: [%- date.format(date.now, '%a, %d %b %Y %T -0000', gmt => 1) %]
 Subject: [%- user_data.0.subject || 'Bibliographic Records' %]
 Auto-Submitted: auto-generated
 
-[% FOR cbreb IN target;
+[%- FOR cbreb IN target;
 
     flesh_list = '{mra';
     IF user_data.0.type == 'full';
@@ -12042,7 +12042,7 @@ Auto-Submitted: auto-generated
 
     item_list = helpers.sort_bucket_unapi_bre(cbreb.items,{flesh => flesh_list, site => user_data.0.context_org, flesh_limit => flimit}, user_data.0.sort_by, user_data.0.sort_dir);
 
-FOR item IN item_list %]
+FOR item IN item_list -%]
 
 [% loop.count %]/[% loop.size %].  Bib ID# [% item.id %]
 [% IF item.isbn %]ISBN: [% item.isbn _ "\n" %][% END -%]
@@ -12054,7 +12054,7 @@ Publication Info: [% item.publisher %] [% item.pubdate %]
 Item Type: [% item.item_type %]
 [% IF user_data.0.type == 'full' && item.holdings.size == 0 %]
  * No items for this record at the selected location
-[% END %]
+[%- END %]
 [% FOR cp IN item.holdings -%]
  * Library: [% cp.circ_lib %]
    Location: [% cp.location %]
@@ -12063,10 +12063,9 @@ Item Type: [% item.item_type %]
    Status: [% cp.status_label %]
    Barcode: [% cp.barcode %]
 
-[% END %]
-
-[% END %]
-[% END %]
+[% END -%]
+[%- END -%]
+[%- END -%]
 $$
     )
     ,(
index 573aabb..de6d125 100644 (file)
@@ -68,7 +68,7 @@ Date: [%- date.format(date.now, '%a, %d %b %Y %T -0000', gmt => 1) %]
 Subject: [%- user_data.0.subject || 'Bibliographic Records' %]
 Auto-Submitted: auto-generated
 
-[% FOR cbreb IN target;
+[%- FOR cbreb IN target;
 
     flesh_list = '{mra';
     IF user_data.0.type == 'full';
@@ -81,7 +81,7 @@ Auto-Submitted: auto-generated
 
     item_list = helpers.sort_bucket_unapi_bre(cbreb.items,{flesh => flesh_list, site => user_data.0.context_org, flesh_limit => flimit}, user_data.0.sort_by, user_data.0.sort_dir);
 
-FOR item IN item_list %]
+FOR item IN item_list -%]
 
 [% loop.count %]/[% loop.size %].  Bib ID# [% item.id %]
 [% IF item.isbn %]ISBN: [% item.isbn _ "\n" %][% END -%]
@@ -93,7 +93,7 @@ Publication Info: [% item.publisher %] [% item.pubdate %]
 Item Type: [% item.item_type %]
 [% IF user_data.0.type == 'full' && item.holdings.size == 0 %]
  * No items for this record at the selected location
-[% END %]
+[%- END %]
 [% FOR cp IN item.holdings -%]
  * Library: [% cp.circ_lib %]
    Location: [% cp.location %]
@@ -102,10 +102,9 @@ Item Type: [% item.item_type %]
    Status: [% cp.status_label %]
    Barcode: [% cp.barcode %]
  
-[% END %]
-
-[% END %]
-[% END %]
+[% END -%]
+[%- END -%]
+[%- END -%]
 $$ WHERE hook = 'biblio.format.record_entry.email';
 
 UPDATE action_trigger.event_definition SET template = $$