OPAC Tweaks in Response to Patron & Library Feedback
authorTerran McCanna <tmccanna@georgialibraries.org>
Thu, 6 May 2021 20:05:54 +0000 (16:05 -0400)
committerChris Sharp <csharp@georgialibraries.org>
Sat, 19 Nov 2022 19:59:26 +0000 (14:59 -0500)
1. OPAC Filter Display Issue (the OPAC search results bar was losing
some of the search filters at some window widths)

2. Missing Cover Art Issue (if there is added content, but the added
content has no cover, the cover art box showed alt text)

3. Group Formats and Editions Wording (change wording to 'Combine Same
Title' and add contextual help pop-up)

4. Add contextual help popups to search bar fields.

5. Add contextual help popups to hold placement page.

6. Add contextual help to search preferences page.

7. Add contextual help to Items Checked Out page.

8. Charges Table Issue (fixed problem where table rows and headers
weren't matching up on mobile devices if online payment was not enabled)

9. Record Summary Display (broke out of "More Details" so that it is
more visible)

10. Account Summary Display (bold links if there are items out or holds
ready)

11. Patron Messages Display (preserve line breaks)

12. Search Results Display (add "More info" button")

13. Address on Library Info page (was only showing mailing address -
now shows physical/billing address and shows mailing address only if
different from billing address)

Signed-off-by: Terran McCanna <tmccanna@georgialibraries.org>
Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Library.pm
Open-ILS/src/templates-bootstrap/opac/css/mediaQuery.css.tt2
Open-ILS/src/templates-bootstrap/opac/css/style.css.tt2
Open-ILS/src/templates-bootstrap/opac/myopac/charges.tt2
Open-ILS/src/templates-bootstrap/opac/myopac/circs.tt2
Open-ILS/src/templates-bootstrap/opac/myopac/prefs_settings.tt2
Open-ILS/src/templates-bootstrap/opac/parts/library/core_info.tt2
Open-ILS/src/templates-bootstrap/opac/parts/place_hold.tt2
Open-ILS/src/templates-bootstrap/opac/parts/result/table.tt2
Open-ILS/src/templates-bootstrap/opac/parts/searchbar.tt2
Open-ILS/src/templates-bootstrap/opac/results.tt2

index d0b17a6..4e82fa7 100644 (file)
@@ -43,7 +43,7 @@ sub load_library {
     if ($address) {
         $ctx->{mailing_address} = $address;
     } elsif (!$address && $aou->mailing_address) {
-        # We didn't get cached hours, so hit the database
+        # We didn't get cached address, so hit the database
         my $session = OpenSRF::AppSession->create("open-ils.actor");
         $ctx->{mailing_address} =
             $session->request('open-ils.actor.org_unit.address.retrieve',
@@ -51,6 +51,14 @@ sub load_library {
         $library_cache->put_cache($address_cache_key, OpenSRF::Utils::JSON->perl2JSON($ctx->{mailing_address}), 360);
     }
 
+    # PINES: Get physical address too
+    if ($aou->billing_address) {
+        my $session = OpenSRF::AppSession->create("open-ils.actor");
+        $ctx->{billing_address} =
+            $session->request('open-ils.actor.org_unit.address.retrieve',
+            $aou->billing_address)->gather(1);
+    }
+
     # Get current hours of operation
     my $hours_cache_key = "TPAC_aouhoo_cache_$lib_id";
     my $hours = OpenSRF::Utils::JSON->JSON2perl($library_cache->get_cache($hours_cache_key));
index d98c372..c447680 100644 (file)
@@ -85,19 +85,19 @@ only screen and (max-width: 650px)  {
     .holdingsTable td:nth-of-type(3):before { content: "Call number"; display: flex;}
     .holdingsTable td:nth-of-type(4):before { content: "Status"; display: flex;}
 
-    .chargesTable td:nth-of-type(1):before { content: "Select"; display: flex; }
+    .chargesTable td:nth-of-type(1):before { content: ""; display: flex; }
     .chargesTable td:nth-of-type(2):before { content: "Owed"; display: flex; }
     .chargesTable td:nth-of-type(3):before { content: "Billing Type"; display: flex;}
     .chargesTable td:nth-of-type(4):before { content: "Note"; display: flex;}
     .chargesTable td:nth-of-type(5):before { content: "Date"; display: flex;}
 
-    .chargesMainTable td:nth-of-type(1):before { content: "Select"; display: flex; }
+    .chargesMainTable td:nth-of-type(1):before { content: ""; display: flex; }
     .chargesMainTable td:nth-of-type(2):before { content: "Owed"; display: flex; }
     .chargesMainTable td:nth-of-type(3):before { content: "Billing Type"; display: flex;}
     .chargesMainTable td:nth-of-type(4):before { content: "Title"; display: flex;}
     .chargesMainTable td:nth-of-type(5):before { content: "Checkout"; display: flex;}
     .chargesMainTable td:nth-of-type(6):before { content: "Due"; display: flex;}
-    .chargesMainTable td:nth-of-type(7):before { content: "Returned/Renewed"; display: flex;}
+    .chargesMainTable td:nth-of-type(7):before { content: "Status"; display: flex;}
 
     .activeHoldstable td:nth-of-type(1):before { content: "Select"; display: flex; }
     .activeHoldstable td:nth-of-type(2):before { content: "Cover"; display: flex; }
index b93824a..88a4a93 100755 (executable)
@@ -3942,6 +3942,15 @@ select option:disabled {
     background-color: #ddd;
 }
 
+pre {
+    overflow-x: auto;
+    white-space: pre-wrap;
+    white-space: -moz-pre-wrap;
+    white-space: -pre-wrap;
+    white-space: -o-pre-wrap;
+    word-wrap: break-word;
+}
+
 @media only screen and (max-width: 1200px) {
     .carousel {
         margin-left: 430px;
index 80bdef5..89a9ba2 100755 (executable)
 <form action="[% ctx.opac_root %]/myopac/main_payment_form#payment" method="get" id="selected_fines">
 [% END %]
 
+        <h3>
+                [% l("Charges On Your Account") %]
+        </h3>
+        <div style="padding-bottom:10px;">[% l("PINES Account Tips") %]</div>
+
     [% IF ctx.fines.circulation.size > 0 %]
     <div id='myopac_circ_trans_div'>
         <div class="header_middle">
                 [% l("Circulation Charges") %]
              [% END %]
            </span>
-           
         </div>
-
      
-        <div class="table-responsive">
         <table id="acct_fines_main_header" class="table table-hover table-bordered miniTable chargesMainTable" title="[% l('Items Checked Out') %]">
             <thead>
                
                 <tr>
-
-                   [% IF myopac_cc_allowed %]
-                    <th style="white-space:nowrap;">
-                        <input id="pay_fines_box1" checked="checked"
+                    <th style="white-space:nowrap;text-align:">
+                        [% IF myopac_cc_allowed %]
+                            <input id="pay_fines_box1" checked="checked"
                             type="checkbox" onclick="select_all_checkboxes('xact', this.checked)"
                             title="[% l('Click to (un)select all charges') %]" />
+                        [% END %]
                     </th> 
-                    [% END %]
                     <th>[% l("Owed") %]</th>
                     <th>[% l("Billing Type") %]</th>
                     <th>[% l("Title") %]</th>
                     <th>[% l("Checkout") %]</th> 
                     <th>[% l("Due ") %]</th> 
                     <th>[% l("Returned/Renewed") %]</th>
-                    
                 </tr>
             </thead>
             <tbody id='myopac_circ_trans_tbody'>
                         attrs.title = f.xact.reservation.target_resource_type.name;
                     END %]
                 <tr id='myopac_circ_trans_row'>
-                    [% IF myopac_cc_allowed %]
+
                     <td class="checkCell">
-                        <input type="checkbox" checked="checked" 
+                        [% IF myopac_cc_allowed %]                    
+                            <input type="checkbox" checked="checked" 
                             title="[% l('Pay this fine') %]" name="xact"
                             value="[% f.xact.id %]" class="fineCheck"/>
+                        [% END %]
                     </td>
-                    [% END %]
                     
-                    <td>
+                    <td class="danger">
                         <strong>
                             [% money(f.xact.balance_owed) %]
                         </strong>
                             <span class="danger">[% l('(fines accruing)') %]</span>
                         [%  END %]
                     </td>
-                   
                 </tr>
                 [% END %]
             </tbody>
 
     [% IF ctx.fines.grocery.size > 0 %]
     <!-- Table for all non-circulation transactions -->
-    <div id='myopac_trans_div' class="mt-3">
-        <h3>
-                [% l("Charges On Your Account") %]
-        </h3>
-        <div style="padding-bottom:10px;">[% l("PINES Account Tips") %]</div>
+    <div id='myopac_trans_div'>
+        <div class="header_middle">
+           <span class="acct_fines_header">
+           <!-- Different heading when not able to pay -->
+             [% IF myopac_cc_allowed %]
+                [% l("Pay Other Selected Charges") %]
+            [% ELSE %] 
+                [% l("Other Charges") %]
+             [% END %]
+           </span>
+        </div>
 
         [% IF myopac_cc_allowed %]
         <div class="d-block d-md-none">
          <table id="acct_fees_main_header" class="table table-hover table-bordered mini-table" title="[% l('Other Fines and Fees') %]">
             <thead>
                 <tr>
-                
-                     [% IF myopac_cc_allowed %]
                     <th style="white-space:nowrap;">
+                        [% IF myopac_cc_allowed %]
                         <input id="pay_fines_box2" checked="checked"
                             type="checkbox" onclick="select_all_checkboxes('xact_misc', this.checked)"
                             aria-label="[% l('Check/Uncheck All') %]" />
+                        [% END %]
                     </th>
-                    [% END %]
                     <th >[% l("Owed") %]</th>
                     <th >[% l("Billing Type") %]</th>
                     <th >[% l("Note") %]</th>
                 [% FOR f IN ctx.fines.grocery %]
                 <tr class ='myopac_trans_row'>
                 [% c = c + 1; %]
-                    [% IF myopac_cc_allowed %]
                     <td class="checkCell">
+                        [% IF myopac_cc_allowed %]
                         <label class="sr-only">Billing Number [% c %]</label>
                         <input aria-label="Pay This Bill" class="fineCheck" type="checkbox" name="xact_misc" value="[% f.xact.id %]" checked="checked" />
+                        [% END %]
                     </td>
-                    [% END %]
                     
                     <td class="danger">
                         <span class="sr-only">Amount Owed</span>
index 77cae52..3b9c1f7 100755 (executable)
@@ -6,6 +6,7 @@
     parent="circs";
 %]
 <h3>[% l('Current Items Checked Out') %]</h3>
+<p style="font-style:italic;">[% l("Do you want to save a list of items you check out? Enable that feature by going to Preferences > Search & History.") %]</p>
 <div style="padding-bottom:10px;">[% l("PINES Account Tips") %]</div>
 <div id='myopac_checked_div'>
 
index b3efce2..da968af 100755 (executable)
@@ -54,7 +54,8 @@
                 </tr>
                 [%- setting = 'opac.default_search_location'; -%]
                 <tr >
-                    <td><label for='[% setting %]'>[% l("Preferred search location") %]</label></td>
+                    <td><label for='[% setting %]'>[% l("Preferred search location") %]</label><br/>
+                    <p style="font-style:italic;max-width:400px;">Hint: The list of libraries is organized by regional library system, then the names of the branches within that system. If you are not sure which library is closest to you, use the <a href="http://pines.georgialibraries.org/pinesLocator/locator.html" target="_blank">Library Locations Map</a> to find the name of your local library system and branch.</p></td>
                     <td>
                         [%- thang = ctx.user.home_ou.id;
                             IF ctx.user_setting_map.$setting;
index 220118b..c7c9876 100755 (executable)
 
     <h2>[% ctx.library.name | html %]</h2>
 
-    [%- IF ctx.library.mailing_address; %]
+    [%- IF ctx.billing_address; %]
+    <div class="my-3" id="addresses">
+        <div id="billing" property="location address" typeof="PostalAddress">
+            <h3 property="contactType">[% l('Address') %]</h3>
+            [% IF ctx.mailing_address.street1 != ctx.billing_address.street1; %]
+                <h4 style="font-weight:bold;font-size:1em;" property="contactType">[% l('Building Location') %]</h4>
+            [% END %]
+
+            <span property="streetAddress">[% ctx.billing_address.street1 | html %]
+            [%- IF ctx.billing_address.street2; "<br />"; ctx.billing_address.street2 | html; END; %]
+            </span><br />
+            <span property="addressLocality">[% ctx.billing_address.city | html %]</span>, 
+            <span property="addressRegion">[% ctx.billing_address.state | html %]</span> 
+            <span property="postalCode">[% ctx.billing_address.post_code | html %]</span><br/>
+            <a href="http://www.google.com/maps/place/[% ctx.billing_address.street1 | html %]+[% ctx.billing_address.street2 | html %]+[% ctx.billing_address.city | html %]+[% ctx.billing_address.state | html %]+[% ctx.billing_address.post_code | html %]"><i class="fas fa-map-marker-alt" style="color:#28A745;" aria-hidden="true"></i> Map / Directions</a>
+        </div>
+    </div>
+    [%- END; %]
+
+
+    [%- IF ctx.mailing_address AND (ctx.mailing_address.street1 != ctx.billing_address.street1); %]
     <div class="my-3" id="addresses">
         <div id="mailing" property="location address" typeof="PostalAddress">
-            <h3 property="contactType">[% l('Location') %]</h3>
+            <h4 style="font-weight:bold;font-size:1em;" property="contactType">[% l('Mailing Address') %]</h4>
             <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>, 
             <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 %]"><i class="fas fa-map-marker-alt" style="color:#28A745;" aria-hidden="true"></i> Map / Directions</a>    
         </div>
     </div>
     [%- END; %]
index d9894ff..c0179b6 100755 (executable)
@@ -173,9 +173,9 @@ function maybeToggleNumCopies(obj) {
                         [% IF hdata.parts.size > 0 %]
                         <div class='hold-div'>
                             [% IF enable.radio.parts == 'true' %]
-                                <span class='hold-span'><label for='select_hold_part'>[%
+                               <span class='hold-span'><b><label for='select_hold_part'>[%
                                l('Select a Part:')
-                               %]</label></span>
+                               %]</b></label></span>
                              <div class='radio-parts-selection'>
                              [% IF !hdata.part_required %]
                                 <span class='parts-radio-option'>
@@ -229,6 +229,7 @@ function maybeToggleNumCopies(obj) {
         <p class="w-50">
             [%- org_select_id = 'pickup_lib'; -%]
             <label for="[% org_select_id %]" class="font-weight-bold">[%l('Pickup location:') %]</label>
+            <a title="" data-toggle="tooltip" data-original-title="You can set and save your preferred hold pickup location at My Account &gt; Preferences &gt; Search & History."><i class="fas fa-question-circle" aria-hidden="true"></i></a>
             [% PROCESS "opac/parts/org_selector.tt2";
                 INCLUDE build_org_selector name='pickup_lib'
                     value=ctx.default_pickup_lib id=org_select_id
@@ -236,6 +237,7 @@ function maybeToggleNumCopies(obj) {
         </p>
 
             <span class="font-weight-bold">[% l('Notify when hold is ready for pickup?') %]</span>
+            <a title="" data-toggle="tooltip" data-original-title="You can set and save your preferred hold notification settings at My Account &gt; Preferences &gt; Notification Preferences."><i class="fas fa-question-circle" aria-hidden="true"></i></a>
             <p>
              <div class="form-check m-2">
                 <input class="form-check-input" type="checkbox" value="t" id="email_notify" name="email_notify" [% IF !ctx.user.email %]disabled="true"[% ELSIF ctx.default_email_notify %]checked="checked"[% END %]>
index faff6b4..95563c0 100755 (executable)
                             </div>
                         </div>
                         <!--Cover Image-->
-                        <div class='col-sm-2 text-center' id="result[% rec.bre_id %]">
-                            <a href="[% mkurl(record_url_path, add_parms, del_parms); %]"><img alt="[% attrs.title | html;%]"
-                            id='item_jacket[% rec.bre_id %]' class='my-2 img-fluid'
-                            src='[% ctx.media_prefix %]/opac/extras/ac/jacket/large/r/[% rec.bre_id | uri %]' style="max-height:150px;" /></a><br />
+                        <div class='col-sm-auto text-center' id="result[% rec.bre_id %]">
+                            <a href="[% mkurl(record_url_path, add_parms, del_parms); %]"><img alt="" id='item_jacket[% rec.bre_id %]' class='my-2'
+src='[% ctx.media_prefix %]/opac/extras/ac/jacket/large/r/[% rec.bre_id | uri %]' style="width:120px;" /></a><br />
                         </div>
                             <!--Info-->
                         <div class='result_table_title_cell col'>
                                         [%- END; END; -%]
                                     </div>
 
-                                    [%- IF !show_detail_view AND args.holdings.size > 0 %]
-                                        <div class="result_call_number">
-                                            [% l('Call number:') %] [% args.holdings.0.label | html %]
-                                        </div>
-                                    [% END %]
+
 
                                         [% IF rec.popularity > 0.0 AND ctx.hide_badge_scores != 'true' %]
                                         <div><span><strong>[% l('Popularity:') %]</strong> [% rec.popularity %] / 5.0</span></div>
 
 
                                         <!--Place Hold Button -->
-                                       
+
                                         <a role="button" href="[% mkurl(ctx.opac_root _ '/place_hold', add_parms, del_parms) %]"
                                             [% html_text_attr('title', l('Place Hold on [_1]', attrs.title)) %]
                                             class="btn btn-action" rel="nofollow" vocab="">
                                        
                                         [%- END -%]
 
+
+
                                         <!-- eBook Buttons -->
                                         [%- IF ebook_api.enabled == 'true' && args.ebook %]
                                       
                                                 ['query','tag','subfield','term','_special','sort','page']) %]"
                                                 [% html_text_attr('title', l('Check Out [_1]', attrs.title)) %]
                                                     class="btn btn-action" role="button" rel="nofollow" vocab=""><i class="fas fa-atlas" aria-hidden="true"></i> <span class="result_place_hold">[% l('Check Out E-Item') %]</span></a>
-                                       
-                                       
+
                                             <a href="[% mkurl(ctx.opac_root _ '/myopac/ebook_place_hold',
                                                 {title => args.ebook.ebook_id, vendor => args.ebook.vendor, action => 'place_hold'},
                                                 ['query','tag','subfield','term','_special','sort','page']) %]"
                                                 %]
                                                 [% END %]
                                         [% END %]
+                                        
+                                        <!-- More info button -->
+                                            <a href="[% mkurl(record_url_path, add_parms, del_parms); %]" role="button" class="btn btn-action" title="[% l("More Info") %]" rel="nofollow" vocab="">
+                                                    <i class="fas fa-angle-double-right" aria-hidden="true"></i>
+                                                    [% l("More Info") %]
+                                             </a>
 
                                         <!--Added Content - Content Cafe -->
                                         [% IF ENV.OILS_CONTENT_CAFE_USER %]
index 2ef8a3b..fff99d5 100755 (executable)
@@ -67,7 +67,7 @@ END;
         <div class="col-sm-12 col-md">
         <label id="search_qtype_label" for="qtype" class="w-100">
         [%-
-            l('Search by:');
+            l('Search by:');"<a title=\"\" data-toggle=\"tooltip\" data-original-title=\"Keyword will search the title, author, description, and other catalog fields.\"><i class=\"fas fa-question-circle\" aria-hidden=\"true\"></i></a>";
             INCLUDE "opac/parts/qtype_selector.tt2" id="qtype";
         -%]
         </label>
@@ -102,11 +102,12 @@ END;
         <div class="col-sm-12 col-md">
         <label id="search_locg_label" for="search_org_selector" class="w-100">
         [%-
-            l('Search within:');
+            l('Search within:');"<a title=\"\" data-toggle=\"tooltip\" data-original-title=\"Select &quot;PINES&quot; to search all libraries. Set and save your search preferences at My Account &gt; Preferences &gt; Search & History.\"><i class=\"fas fa-question-circle\" aria-hidden=\"true\"></i></a>";
             select_lib_label = l("Search within:");
             INCLUDE build_org_selector arialabel=select_lib_label
               id='search_org_selector' show_loc_groups=1 show_lassos=1
         -%]
+
         </label>
         </div>
 
@@ -171,16 +172,11 @@ END;
         [% END %]
         </form>
     [% END %]
-    [% IF fcount > 0 %]
-      <div class="refine_search result_block_visible">
-        <span id="filter_hits">[ <a href="#" onclick="getAdvLimits();return false;">[% l('[quant,_1,filter,filters] applied', fcount) %]</a> ]</span>
-      </div>
-    [% END %]
-    [% IF ctx.query_struct.filters.size > 0 %]
+    [% IF fcount > 2 %]
         [% stuff = INCLUDE 'opac/parts/result/adv_filter.tt2' %]
         [% IF stuff %]
             <h3 class="sr-only">[% l('Search Results filters') %]</h3>
-            <div id="adv_filter_results_block" class="adv_filter_results_hide">
+            <div id="adv_filter_results_block">
                 <div class="adv_filter_results_block_label" style="text-align:left;">[% l('Filtered by:') %]</div>
                 [% stuff %]
             </div>
index 7b10786..02b06d3 100755 (executable)
                                 name="modifier" value="metabib"
                                 onchange="search_modifier_onchange('metabib', this, true)"
                                 [% CGI.param('modifier').grep('metabib').size ? ' checked="checked"' : '' %] />
-                            [% l('Group By Formats and Editions') %]
+                            [% l('Combine Same Title') %]
+                            <a title="" data-toggle="tooltip" data-original-title="When there are multiple editions or formats of a title, each one will appear as a separate result. Check this box to group them together.">
+                                <i class="fas fa-question-circle" aria-hidden="true"></i>
+                            </a>
                         </label>
                         </div>
                     [% END %]