Thank you! I was on the right track.


From: Open-ils-general 
[mailto:open-ils-general-boun...@list.georgialibraries.org] On Behalf Of John 
Sent: Thursday, August 29, 2019 1:50 PM
To: Evergreen Discussion Group <open-ils-general@list.georgialibraries.org>
Subject: Re: [OPEN-ILS-GENERAL] Preferred Name on Notices


This is the code we use in our print templates. It prints preferred name if one 
exists, and primary name if it doesn't.

<span ng-if="patron.pref_family_name">{{patron.pref_family_name}},</span>
<span ng-if="!patron.pref_family_name">{{patron.family_name}},</span>
<span ng-if="!patron.pref_first_given_name">{{patron.first_given_name}}</span>

We are also investigating using something similar for our emailed notices. 
However, we are still in the testing phase for that. We have one test set up so 
far, and it is using this code:

[%- USE
    first_name = user.pref_first_given_name || user.first_given_name;
    family_name = user.pref_family_name || user.family_name;
Dear [% family_name %], [% first_name %]


John Amundson | Library Applications Supervisor | CW MARS

jamund...@cwmars.org<mailto:jamund...@cwmars.org> | 508-755-3323 


On Thu, Aug 29, 2019 at 1:10 PM Kean XL 
<kea...@ivpl.org<mailto:kea...@ivpl.org>> wrote:
nevermind...that Template was broken

On Thu, Aug 29, 2019 at 12:56 PM Kean XL 
<kea...@ivpl.org<mailto:kea...@ivpl.org>> wrote:
I think I finally got this. Please correct if I'm wrong...
Here's our full current hold slip template

<p style="padding-top:30px">
<font size="7">
{{hold.shelf_expire_time | date:'M/d'}}
<div ng-if="patron.pref_family_name == 'f'">{{patron.family_name}} </div>
<font size="5">
<div ng-if="patron.pref_first_given_name == 'f'">{{patron.first_given_name}} 
<div ng-if="hold.email_notify == 'f'" && "hold.sms_notify">Notify by Phone: 
{{hold.phone_notify}} </div>
<div ng-if="hold.email_notify == 'f'" && "hold.sms_notify" && 
"hold.phone_notify">Daytime Phone: {{patron.day_phone}} </div>
<p style=;padding-bottom:40px>

  <div ng-switch on="hold.behind_desk">
    <div ng-switch-when="t">
      Route to the <strong>Private Hold Shelf</strong>.
    <div ng-switch-when="f">
      Route to the <strong>Hold Shelf</strong>.
Hold Shelf Expire Date: {{hold.shelf_expire_time | date:'M/d/yyyy'}}<div>
  Item Barcode: {{copy.barcode}}</div>
  Title: {{title}}</div>

  Call Number: {{call_number.prefix}} {{call_number.label}} 


  <div>Hold for patron: {{patron.family_name}}, 
  <div ng-if="hold.phone_notify">Notify by phone: {{hold.phone_notify}}</div>
  <div ng-if="hold.sms_notify">Notify by text: {{hold.sms_notify}}</div>
  <div ng-if="hold.email_notify == 't'">Notify by email: {{patron.email}}</div>
  <div ng-if="hold.email_notify == 'f'" && "hold.sms_notify">Daytime Phone: 
{{patron.day_phone}} </div>
<div ng-if="hold_notes">
        <li ng-repeat="note in hold_notes | filter: {slip : 
't'}"><strong>{{note.title}}</strong> - {{note.body}}</li>

  <div>Request Date: {{hold.request_time | 

  <div>Printed: {{today | date:$root.egDateAndTimeFormat}} at 
<p style="padding-bottom:160px">

On Thu, Aug 29, 2019 at 12:22 PM Elizabeth Davis 
<eda...@albright.org<mailto:eda...@albright.org>> wrote:

I am using {{patron.pref_first_given_name}} in the print templates for 
receipts.  I am curious if user.pref_first_give_name work?  Can I have it print 
the preferred if it’s there and the first_given_name if there isn’t one?


From: Open-ils-general 
 On Behalf Of Kean XL
Sent: Thursday, August 29, 2019 12:18 PM
To: Evergreen Discussion Group 
Subject: Re: [OPEN-ILS-GENERAL] Preferred Name on Notices

What was the marker you were using for the preferred name? Is there a list of 
referable string names for the print templates?

On Thu, Aug 29, 2019 at 11:49 AM Elizabeth Davis 
<eda...@albright.org<mailto:eda...@albright.org>> wrote:
Hello Everyone,

We just upgraded to 3.3 and I added the angular code in the print templates for 
preferred name and was curious if anyone uses preferred name in their trigger 
notifications.  I would like to be consistent.

Thank you,

Elizabeth Davis
Head of Digital Services
Scranton Public Library
500 Vine Street
Scranton, PA 18509
570-348-3000 ext. 3050
pronouns: she/her/hers

Reply via email to