PINES customization - display library logo on library info page
authorTerran McCanna <tmccanna@georgialibraries.org>
Wed, 8 Feb 2023 18:29:15 +0000 (13:29 -0500)
committerChris Sharp <csharp@georgialibraries.org>
Wed, 19 Apr 2023 17:10:41 +0000 (13:10 -0400)
Must be on top of rel_3_10_0_library_logo_field

Signed-off-by: Terran McCanna <tmccanna@georgialibraries.org>
Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Library.pm
Open-ILS/src/templates-bootstrap/opac/myopac/prefs.tt2
Open-ILS/src/templates-bootstrap/opac/parts/library/core_info.tt2

index 4e82fa7..9d60344 100644 (file)
@@ -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
index f0dd280..696c6eb 100755 (executable)
             <tr>
                 <td class='color_4 light_border'>[% l("Home Library") %]</td>
  <td class='light_border'>
+                    [% IF ctx.user.home_ou.library_logo; %]
+                        <img src="/images/logos/[% ctx.user.home_ou.library_logo %]" alt="Library Logo"
+                            style="height:80px;"><br/>
+                    [% ELSIF ctx.get_aou(ctx.user.home_ou.parent_ou).library_logo; %]
+                        <img src="/images/logos/[% ctx.get_aou(ctx.user.home_ou.parent_ou).library_logo %]" alt="Library Logo"
+                            style="height:80px;"><br/>
+                    [% END; %]
                     [% ctx.get_aou(ctx.user.home_ou.parent_ou).name %]<br/>
                     [% ctx.user.home_ou.name | html %]<br/>
                     [% ctx.user.home_ou.billing_address.street1 %]<br/>
                             '<a href="'; lib_url | html; '" property="url">'; lib_url; '</a>';
                         END;
                     %]
+                    <br><br/>
+                    <a href="/eg/opac/library/[% ctx.user.home_ou.shortname %]">More Information</a>
                 </td>                <td></td>
             </tr>
             <tr>
index c7c9876..5445bec 100755 (executable)
@@ -6,7 +6,8 @@
 -%]
 <div class="container">
     <div>
-
+    [% IF ctx.library_logo; %]<img src="/images/logos/[% ctx.library_logo %]" alt="Library Logo"
+        style="height:100px;">[% END; %]
     [%- IF ctx.library.parent_ou; %]
     <div id="branch-info" style="font-weight:bold;font-size:1.3em;">
         [% ctx.parent.name | html %]:</a>