[OPEN-ILS-GENERAL] Preferred Name on Notices

John Amundson jamundson at cwmars.org
Thu Aug 29 13:50:14 EDT 2019


Hi,

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.pref_first_given_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
<http://www.cwmars.org>

John Amundson | Library Applications Supervisor | CW MARS

jamundson at cwmars.org | 508-755-3323 x322 <%28508%29%20755-3323>

https://www.cwmars.org


On Thu, Aug 29, 2019 at 1:10 PM Kean XL <keanxl at ivpl.org> wrote:

> nevermind...that Template was broken
>
> On Thu, Aug 29, 2019 at 12:56 PM Kean XL <keanxl at 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">
>> <b>
>> <font size="7">
>> {{hold.shelf_expire_time | date:'M/d'}}
>> <div>
>> <div ng-if="patron.pref_family_name == 'f'">{{patron.family_name}} </div>
>> <div>{{patron.pref_family_name}}
>> </font>
>> </div>
>> <font size="5">
>> <div ng-if="patron.pref_first_given_name ==
>> 'f'">{{patron.first_given_name}} </div>
>> <div>{{patron.pref_first_given_name}}</div>
>> </p>
>> <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>
>> </font>
>> </b>
>> </p>
>>
>>
>>
>>
>> <div>
>>   <div ng-switch on="hold.behind_desk">
>>     <div ng-switch-when="t">
>>       Route to the <strong>Private Hold Shelf</strong>.
>>     </div>
>>     <div ng-switch-when="f">
>>       Route to the <strong>Hold Shelf</strong>.
>>     </div>
>>   </div>
>>   <br/>
>> 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}}
>> {{call_number.suffix}}</div>
>>
>>
>>
>>
>>   <br/>
>>
>>
>>
>>
>> <div>
>>   <div>Hold for patron: {{patron.family_name}},
>> {{patron.first_given_name}}</div>
>>   <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">
>>       <ul>Notes:
>>         <li ng-repeat="note in hold_notes | filter: {slip :
>> 't'}"><strong>{{note.title}}</strong> - {{note.body}}</li>
>>       </ul>
>>     </div>
>>   <br/>
>>
>>
>>
>>
>>   <div>Request Date: {{hold.request_time |
>> date:$root.egDateAndTimeFormat}}</div>
>>
>>
>>
>>
>>   <div>Printed: {{today | date:$root.egDateAndTimeFormat}} at
>> {{current_location.shortname}}</div>
>> <p style="padding-bottom:160px">
>> </p>
>> <
>> </div>
>>
>> On Thu, Aug 29, 2019 at 12:22 PM Elizabeth Davis <edavis at albright.org>
>> wrote:
>>
>>> Hello
>>>
>>>
>>>
>>> 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?
>>>
>>>
>>>
>>> Elizabeth
>>>
>>>
>>>
>>> *From:* Open-ils-general [mailto:
>>> open-ils-general-bounces at list.georgialibraries.org] *On Behalf Of *Kean
>>> XL
>>> *Sent:* Thursday, August 29, 2019 12:18 PM
>>> *To:* Evergreen Discussion Group <
>>> open-ils-general at list.georgialibraries.org>
>>> *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 <edavis at 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
>>>
>>> edavis at albright.org
>>>
>>> pronouns: she/her/hers
>>>
>>>
>>>
>>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://libmail.georgialibraries.org/pipermail/open-ils-general/attachments/20190829/fee9557b/attachment-0001.html>


More information about the Open-ils-general mailing list