LP 1884657 Improve Access to Library Info in OPAC
authorTerran McCanna <tmccanna@georgialibraries.org>
Thu, 30 Jul 2020 19:05:42 +0000 (15:05 -0400)
committerJason Boyer <JBoyer@equinoxinitiative.org>
Fri, 11 Sep 2020 18:16:14 +0000 (14:16 -0400)
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 <tmccanna@georgialibraries.org>
Signed-off-by: Jason Boyer <JBoyer@equinoxinitiative.org>
Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm
Open-ILS/src/templates/opac/myopac/prefs.tt2

index 6579300..4065e24 100644 (file)
@@ -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"]
             }
         }
     ]);
index 4608f1e..dc90c7e 100644 (file)
 
             <tr>
                 <td class='color_4 light_border'>[% l("Home Library") %]</td>
-                <td class='light_border'>[% ctx.user.home_ou.name | html %]</td>
+                <td class='light_border'>
+                    [% ctx.get_aou(ctx.user.home_ou.parent_ou).name | html %]<br/>
+                    [% ctx.user.home_ou.name | html %]<br/>
+                    [% ctx.user.home_ou.billing_address.street1 | html %]<br/>
+                    [% IF ctx.user.home_ou.billing_address.street2; ctx.user.home_ou.billing_address.street2 | html; "<br/>"; 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 %]<br/>
+                    <br/>
+
+                    [% IF ctx.user.home_ou.phone; ctx.user.home_ou.phone | html; "<br/>"; END %]
+
+                    [% IF ctx.user.home_ou.email; '<a href="mailto:'; ctx.user.home_ou.email | html; '">'; ctx.user.home_ou.email | html; "</a><br/>"; END %]
+                    [% lib_url = ctx.get_org_setting(ctx.user.home_ou.id, 'lib.info_url');
+                        IF lib_url;
+                            '<a href="'; lib_url | html; '" property="url">'; lib_url | html;  '</a>';
+                        END;
+                    %]
+                </td>
                 <td></td>
             </tr>
             <tr>