From 0c13ad54c8caf2dfe46e3f629665cbc23cae4a34 Mon Sep 17 00:00:00 2001 From: Terran McCanna Date: Thu, 30 Jul 2020 15:05:42 -0400 Subject: [PATCH] LP 1884657 Improve Access to Library Info in OPAC Currently, the patron's account preferences page only shows the library name. This adds the library's address, email, phone, and web site link as well. Signed-off-by: Terran McCanna Signed-off-by: Jason Boyer --- .../perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm | 6 +++--- Open-ILS/src/templates/opac/myopac/prefs.tt2 | 19 ++++++++++++++++++- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm index 6579300132..4065e24b77 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm @@ -32,10 +32,10 @@ sub prepare_extended_user_info { $self->ctx->{user} = $self->editor->retrieve_actor_user([ $self->ctx->{user}->id, { - flesh => 1, + flesh => 2, flesh_fields => { - au => [qw/card home_ou addresses ident_type billing_address waiver_entries/, @extra_flesh] - # ... + au => [qw/card home_ou addresses ident_type billing_address waiver_entries/, @extra_flesh], + "aou" => ["billing_address"] } } ]); diff --git a/Open-ILS/src/templates/opac/myopac/prefs.tt2 b/Open-ILS/src/templates/opac/myopac/prefs.tt2 index 4608f1eff3..b30f3748cf 100644 --- a/Open-ILS/src/templates/opac/myopac/prefs.tt2 +++ b/Open-ILS/src/templates/opac/myopac/prefs.tt2 @@ -117,7 +117,24 @@ [% l("Home Library") %] - [% ctx.user.home_ou.name | html %] + + [% ctx.get_aou(ctx.user.home_ou.parent_ou).name %]
+ [% ctx.user.home_ou.name | html %]
+ [% ctx.user.home_ou.billing_address.street1 %]
+ [% IF ctx.user.home_ou.billing_address.street2; ctx.user.home_ou.billing_address.street2 _ "
"; END %] + [% ctx.user.home_ou.billing_address.city %], [% ctx.user.home_ou.billing_address.state %] + [% ctx.user.home_ou.billing_address.post_code %]
+
+ + [% IF ctx.user.home_ou.phone; ctx.user.home_ou.phone _ "
"; END %] + + [% IF ctx.user.home_ou.email; ctx.user.home_ou.email _ "
"; END %] + [% lib_url = ctx.get_org_setting(ctx.user.home_ou.id, 'lib.info_url'); + IF lib_url; + ''; lib_url; ''; + END; + %] + -- 2.11.0