LP1821969 Patron Prefix and Suffix Display in Summary user/gcollum/lp1821969_patron_prefix_suffix_in_summary
authorGarry Collum <gcollum@gmail.com>
Wed, 8 May 2019 00:57:50 +0000 (20:57 -0400)
committerGarry Collum <gcollum@gmail.com>
Wed, 8 May 2019 00:57:50 +0000 (20:57 -0400)
Adds support for displaying the patron prefix, suffix, preferred prefix, and preferred suffix in the patron summary sidebar.

To test:
  1. Add a combination of prefixes, suffixes, preferred prefixes, and preferred suffixes to several patrons.
  2. Also add some other preferred information to some of these patrons.
  3. In the sidebar notice the lack of prefix information in both the patron's main heading and in the preferred name information.
  4. Apply the patch.
  5. In the sidebar the prefixes and suffixes are now displayed.

Signed-off-by: Garry Collum <gcollum@gmail.com>
Open-ILS/src/templates/staff/circ/patron/index.tt2
Open-ILS/src/templates/staff/circ/patron/t_summary.tt2

index 5ebbe0e..93fbab7 100644 (file)
@@ -97,10 +97,12 @@ angular.module('egCoreMod').run(['egStrings', function(s) {
         <div class="flex-row">
           <div class="flex-cell"
           ng-class="{'patron-summary-alert' : hasAlerts()}">
-            [% l('[_1], [_2] [_3]', 
+            [% l('[_1] [_2], [_3] [_4] [_5]', 
+                '{{patron().prefix()}}',
                 '{{patron().family_name()}}',
                 '{{patron().first_given_name()}}',
-                '{{patron().second_given_name()}}') %]
+                '{{patron().second_given_name()}}',
+                '{{patron().suffix()}}') %]
                <span ng-if="patron().name_keywords()"> <a title="[% l('Name keywords: ') %]{{patron().name_keywords()}}" class="glyphicon glyphicon-tags"></a>
           </div>
 
index 7963ca0..1a10b39 100644 (file)
@@ -2,12 +2,14 @@
 <div ng-cloak class="patron-summary-grid-wrapper">
   <div ng-show="patron()" id="patron-summary-grid">
     <div class="row patron-summary-pref-name"
-      ng-if="patron().pref_family_name() || patron().pref_first_given_name() || patron().pref_second_given_name()">
+      ng-if="patron().pref_prefix() || patron().pref_family_name() || patron().pref_first_given_name() || patron().pref_second_given_name() || patron().pref_suffix()">
       <div class="col-md-12">
-        [% l('[_1], [_2] [_3] (Preferred)', 
+        [% l('[_1] [_2], [_3] [_4] [_5] (Preferred)', 
+          '{{patron().pref_prefix() || patron().prefix()}}',
           '{{patron().pref_family_name() || patron().family_name()}}',
           '{{patron().pref_first_given_name() || patron().first_given_name()}}',
-          '{{patron().pref_second_given_name()}}') 
+          '{{patron().pref_second_given_name()}}',
+          '{{patron().pref_suffix() || patron().suffix()}}')
         %]
       </div>
     </div>