PINES Fix to custom holdings list rel_3_4_1_pines_holdings_fix
authorTerran McCanna <tmccanna@georgialibraries.org>
Thu, 26 Dec 2019 18:12:09 +0000 (13:12 -0500)
committerTerran McCanna <tmccanna@georgialibraries.org>
Thu, 26 Dec 2019 18:12:09 +0000 (13:12 -0500)
Corrects system name not showing up on record detail screen in
holdings copy table. Also adds system name to the linked up library
info page.

Signed-off-by: Terran McCanna <tmccanna@georgialibraries.org>
Open-ILS/src/templates/opac/parts/library/core_info.tt2
Open-ILS/src/templates/opac/parts/library_name_link.tt2

index cdaf047..52a3116 100644 (file)
@@ -6,6 +6,11 @@
 -%]
 <div id="content-wrapper">
     <div id="main-content" class="content-wrapper-library-page" vocab="http://schema.org/" typeof="Library">
+    
+    [%- IF ctx.library.parent_ou; %]
+        <b>[% ctx.parent.name | html %]:</b>
+    [%  END; -%]
+    
     <h1 property="name">[% ctx.library.name | html %]</h1>
 
     [%-
         <div>[% l('Email address: ') %]<a href="mailto:[% ctx.library.email | html %]" property="email">[% ctx.library.email | html %]</a></div>
     [%- END; %]
     [%- IF ctx.library.phone; %]
-        <div>[% l('Telephone: ') %]<a href="tel:[% ctx.library.phone | html %]" property="telephone">[% ctx.library.phone | html %]</a></div>
+        <div>[% l('Telephone: ') %]<a href="tel:[% ctx.library.phone | html %]" property="telephone">[% ctx.library.phone | html %]</a></div><br />
     [% END; %]
     [% END; %]
 
     [%- IF ctx.library.mailing_address; %]
     <div id="addresses">
         <div id="mailing" property="location address" typeof="PostalAddress">
-            <h3 property="contactType">[% l('Mailing address') %]</h3>
+            <span>[% ctx.library.name | html %]</span> <br/>
             <span property="streetAddress">[% ctx.mailing_address.street1 | html %]
             [%- IF ctx.mailing_address.street2; "<br />"; ctx.mailing_address.street2 | html; END; %]
             </span><br />
-            <span property="addressLocality">[% ctx.mailing_address.city | html %]</span><br />
-            <span property="addressRegion">[% ctx.mailing_address.state | html %]</span><br />
-            <span property="addressCountry">[% ctx.mailing_address.country | html %]</span><br />
+            <span property="addressLocality">[% ctx.mailing_address.city | html %], </span>
+            <span property="addressRegion">[% ctx.mailing_address.state | html %]</span>
             <span property="postalCode">[% ctx.mailing_address.post_code | html %]</span><br />
+            <br />
+            <a href="http://www.google.com/maps/place/[% ctx.mailing_address.street1 | html %]+[% ctx.mailing_address.street2 | html %]+[% ctx.mailing_address.city | html %]+[% ctx.mailing_address.state | html %]+[% ctx.mailing_address.post_code | html %]"> Generate Map & Directions</a>        
         </div>
     </div>
     [%- END; %]
 
+<!-- PINES Customization: Remove branch relationship linkage because it causes confusion 
+         with patrons who come across things like system hours that don't correspond to branch hours
+
     [%- IF ctx.library.parent_ou; %]
     <h2>[% l('Branch relationship') %]</h2>
     <div id="branch-info">[% l('Parent library: ') %]
@@ -51,6 +60,8 @@
     </div>
     [%  END; -%]
 
+-->
+    
     <div class="common-full-pad"></div>
     </div>
 </div>
index 8b8275e..faf99fa 100644 (file)
@@ -4,7 +4,6 @@
         opac_root = ctx.kpac_root;
     END;
 
-    # Allow fleshed circ_libs
     IF copy_info.circ_lib.name; 
        org_id = copy_info.circ_lib.id;
        org_name = copy_info.circ_lib.name; 
        org_sname = ctx.get_aou(org_id).shortname;
     END;
 
+    org_obj = ctx.get_aou(copy_info.circ_lib);
+    parent_org_name = ctx.get_aou(org_obj.parent_ou).name;
+    
     lib_url = ctx.get_org_setting(org_id, 'lib.info_url');
     prefer_external_url = ctx.get_org_setting(org_id, 'lib.prefer_external_url');
     UNLESS lib_url && prefer_external_url;
         lib_url = mkurl(opac_root _ '/library/' _ org_sname, {}, 1);
     END; 
-    IF lib_url; '<a property="offeredBy" typeof="Library" href="'; lib_url | html; '">'; END;
-    '<span property="name">'; org_name | html; '</span>';
-    IF lib_url; '</a>'; END;
+    '<span property="name">'; parent_org_name _ ':' | html;'</span>';
+    '<br/> &nbsp; &nbsp; &nbsp; ';
+    IF lib_url; 
+        '<a property="offeredBy" class="opac_links" typeof="Library" href="'; lib_url | url; '">'; 
+    END;
+    '<b>'; org_name; '</b>';
+    IF lib_url; 
+        '</a>';
+    END;
 -%]
 
+