From 8039a45de49f58046d8ae36e3e55b122b3025127 Mon Sep 17 00:00:00 2001 From: Jeff Davis <jdavis@sitka.bclibraries.ca> Date: Tue, 27 Apr 2021 10:35:18 -0700 Subject: [PATCH] LP#1924185: use preferred name in patron summary When available, the preferred name is used as the main name in the patron summary (rather than as a less-prominent field beneath the main name). The legal name is displayed further down in the summary, just after the ID fields. Signed-off-by: Jeff Davis <jdavis@sitka.bclibraries.ca> Signed-off-by: Michele Morgan <mmorgan@noblenet.org> Signed-off-by: Jane Sandberg <sandbej@linnbenton.edu> --- Open-ILS/src/templates/staff/circ/patron/index.tt2 | 10 ++++---- .../src/templates/staff/circ/patron/t_summary.tt2 | 29 +++++++++++----------- 2 files changed, 19 insertions(+), 20 deletions(-) diff --git a/Open-ILS/src/templates/staff/circ/patron/index.tt2 b/Open-ILS/src/templates/staff/circ/patron/index.tt2 index 9afa796166..d82b70e2b7 100644 --- a/Open-ILS/src/templates/staff/circ/patron/index.tt2 +++ b/Open-ILS/src/templates/staff/circ/patron/index.tt2 @@ -102,11 +102,11 @@ angular.module('egCoreMod').run(['egStrings', function(s) { <div class="flex-cell" ng-class="{'patron-summary-alert' : hasAlerts()}"> [% l('[_1] [_2], [_3] [_4] [_5]', - '{{patron().prefix()}}', - '{{patron().family_name()}}', - '{{patron().first_given_name()}}', - '{{patron().second_given_name()}}', - '{{patron().suffix()}}') %] + '{{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().second_given_name()}}', + '{{patron().pref_suffix() || patron().suffix()}}') %] <span ng-if="patron().name_keywords()"> <a title="[% l('Name keywords: ') %]{{patron().name_keywords()}}" class="glyphicon glyphicon-tags"></a> </div> diff --git a/Open-ILS/src/templates/staff/circ/patron/t_summary.tt2 b/Open-ILS/src/templates/staff/circ/patron/t_summary.tt2 index a9ad375bd0..60145f2ca1 100644 --- a/Open-ILS/src/templates/staff/circ/patron/t_summary.tt2 +++ b/Open-ILS/src/templates/staff/circ/patron/t_summary.tt2 @@ -1,18 +1,6 @@ <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_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] [_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().second_given_name()}}', - '{{patron().pref_suffix() || patron().suffix()}}') - %] - </div> - </div> <div class="row" ng-class="{'patron-summary-divider' : !$index}" ng-repeat="penalty in alert_penalties()"> @@ -52,9 +40,9 @@ <div class="col-md-5">[% l('Name') %]</div> <div class="col-md-7"> [% l('[_1], [_2] [_3]', - '{{patron().family_name()}}', - '{{patron().first_given_name()}}', - '{{patron().second_given_name()}}') %] + '{{patron().pref_family_name() || patron().family_name()}}', + '{{patron().pref_first_given_name() || patron().first_given_name()}}', + '{{patron().pref_second_given_name() || patron().second_given_name()}}') %] </div> </div> <div class="row"> @@ -170,6 +158,17 @@ <div class="col-md-7">{{patron().ident_value2()}}</div> </div> <div class="row"> + <div class="col-md-5">[% l('Legal Name') %]</div> + <div class="col-md-7"> + [% l('[_1] [_2], [_3] [_4] [_5]', + '{{patron().prefix()}}', + '{{patron().family_name()}}', + '{{patron().first_given_name()}}', + '{{patron().second_given_name()}}', + '{{patron().suffix()}}') %] + </div> + </div> + <div class="row"> <div class="col-md-5">[% l('Email') %]</div> <!-- Bound href="mailto: patron().email()" to an anchor tag to allow the patron's email address to be clicked directly from the summary. --> <div class="col-md-7"><a ng-href="mailto:{{patron().email()}}">{{patron().email()}}</a></div> -- 2.11.0