From e4c84dbe4676aa0f7887d27f3a4a2c38021ab46d 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..dc90c7e442 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 | html %]
+ [% ctx.user.home_ou.name | html %]
+ [% ctx.user.home_ou.billing_address.street1 | html %]
+ [% IF ctx.user.home_ou.billing_address.street2; ctx.user.home_ou.billing_address.street2 | html; "
"; END %] + [% ctx.user.home_ou.billing_address.city | html %], [% ctx.user.home_ou.billing_address.state | html %] + [% ctx.user.home_ou.billing_address.post_code | html %]
+
+ + [% IF ctx.user.home_ou.phone; ctx.user.home_ou.phone | html; "
"; END %] + + [% IF ctx.user.home_ou.email; ''; ctx.user.home_ou.email | html; "
"; END %] + [% lib_url = ctx.get_org_setting(ctx.user.home_ou.id, 'lib.info_url'); + IF lib_url; + ''; lib_url | html; ''; + END; + %] + -- 2.11.0