From db89d906d7d1ec10f95f5a933617958e1187a3d8 Mon Sep 17 00:00:00 2001 From: Terran McCanna Date: Wed, 8 Feb 2023 13:29:15 -0500 Subject: [PATCH] PINES customization - display library logo on library info page Must be on top of rel_3_10_0_library_logo_field Signed-off-by: Terran McCanna --- Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Library.pm | 8 ++++++++ Open-ILS/src/templates-bootstrap/opac/myopac/prefs.tt2 | 9 +++++++++ .../src/templates-bootstrap/opac/parts/library/core_info.tt2 | 3 ++- 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Library.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Library.pm index 4e82fa77d2..9d60344a96 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Library.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Library.pm @@ -33,6 +33,14 @@ sub load_library { $ctx->{parent} = $ctx->{get_aou}->($aou->parent_ou); } + # PINES - Get library logo + $ctx->{library_logo} = ''; + if ($aou->library_logo) { + $ctx->{library_logo} = $aou->library_logo; + } elsif ($aou->parent_ou && $ctx->{parent}->library_logo) { + $ctx->{library_logo} = $ctx->{parent}->library_logo; + } + $self->timelog("got basic lib info"); # Get mailing address from the cache diff --git a/Open-ILS/src/templates-bootstrap/opac/myopac/prefs.tt2 b/Open-ILS/src/templates-bootstrap/opac/myopac/prefs.tt2 index f0dd2805aa..696c6eb298 100755 --- a/Open-ILS/src/templates-bootstrap/opac/myopac/prefs.tt2 +++ b/Open-ILS/src/templates-bootstrap/opac/myopac/prefs.tt2 @@ -143,6 +143,13 @@ [% l("Home Library") %] + [% IF ctx.user.home_ou.library_logo; %] + Library Logo
+ [% ELSIF ctx.get_aou(ctx.user.home_ou.parent_ou).library_logo; %] + Library Logo
+ [% END; %] [% ctx.get_aou(ctx.user.home_ou.parent_ou).name %]
[% ctx.user.home_ou.name | html %]
[% ctx.user.home_ou.billing_address.street1 %]
@@ -159,6 +166,8 @@ ''; lib_url; ''; END; %] +

+ More Information diff --git a/Open-ILS/src/templates-bootstrap/opac/parts/library/core_info.tt2 b/Open-ILS/src/templates-bootstrap/opac/parts/library/core_info.tt2 index c7c98769a3..5445bece96 100755 --- a/Open-ILS/src/templates-bootstrap/opac/parts/library/core_info.tt2 +++ b/Open-ILS/src/templates-bootstrap/opac/parts/library/core_info.tt2 @@ -6,7 +6,8 @@ -%]
- + [% IF ctx.library_logo; %]Library Logo[% END; %] [%- IF ctx.library.parent_ou; %]
[% ctx.parent.name | html %]: -- 2.11.0