From: Terran McCanna Date: Thu, 6 May 2021 20:05:54 +0000 (-0400) Subject: OPAC Tweaks in Response to Patron & Library Feedback X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=1d12e75c0b98801cd0c5c17bf45b611965037b97;p=evergreen%2Fpines.git OPAC Tweaks in Response to Patron & Library Feedback 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 --- 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 d0b17a6898..4e82fa77d2 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Library.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Library.pm @@ -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)); diff --git a/Open-ILS/src/templates-bootstrap/opac/css/mediaQuery.css.tt2 b/Open-ILS/src/templates-bootstrap/opac/css/mediaQuery.css.tt2 index 45f39e3ae5..a79ca959ff 100644 --- a/Open-ILS/src/templates-bootstrap/opac/css/mediaQuery.css.tt2 +++ b/Open-ILS/src/templates-bootstrap/opac/css/mediaQuery.css.tt2 @@ -84,19 +84,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; } diff --git a/Open-ILS/src/templates-bootstrap/opac/css/style.css.tt2 b/Open-ILS/src/templates-bootstrap/opac/css/style.css.tt2 index 62fe07641c..759959e7ad 100755 --- a/Open-ILS/src/templates-bootstrap/opac/css/style.css.tt2 +++ b/Open-ILS/src/templates-bootstrap/opac/css/style.css.tt2 @@ -3892,6 +3892,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; diff --git a/Open-ILS/src/templates-bootstrap/opac/myopac/charges.tt2 b/Open-ILS/src/templates-bootstrap/opac/myopac/charges.tt2 index 727ecf04d0..cafe0e6b28 100755 --- a/Open-ILS/src/templates-bootstrap/opac/myopac/charges.tt2 +++ b/Open-ILS/src/templates-bootstrap/opac/myopac/charges.tt2 @@ -13,6 +13,11 @@
[% END %] +

+ [% l("Charges On Your Account") %] +

+
[% l("PINES Account Tips") %]
+ [% IF ctx.fines.circulation.size > 0 %]
@@ -24,30 +29,26 @@ [% l("Circulation Charges") %] [% END %] -
- - +
- - [% IF myopac_cc_allowed %] - - [% END %] - @@ -59,15 +60,16 @@ attrs.title = f.xact.reservation.target_resource_type.name; END %] - [% IF myopac_cc_allowed %] + - [% END %] - - [% END %] @@ -127,10 +128,16 @@ [% IF ctx.fines.grocery.size > 0 %]
-

- [% l("Charges On Your Account") %] -

-
[% l("PINES Account Tips") %]
+
+ + + [% IF myopac_cc_allowed %] + [% l("Pay Other Selected Charges") %] + [% ELSE %] + [% l("Other Charges") %] + [% END %] + +
[% IF myopac_cc_allowed %]
@@ -144,14 +151,13 @@
- + [% IF myopac_cc_allowed %] + + [% END %] [% l("Owed") %] [% l("Billing Type") %] [% l("Title") %] [% l("Checkout") %] [% l("Due ") %] [% l("Returned/Renewed") %]
- + [% END %] + [% money(f.xact.balance_owed) %] @@ -114,7 +116,6 @@ [% l('(fines accruing)') %] [% END %]
- - [% IF myopac_cc_allowed %] - [% END %] @@ -165,12 +171,12 @@ [% FOR f IN ctx.fines.grocery %] [% c = c + 1; %] - [% IF myopac_cc_allowed %] - [% END %] [%- setting = 'opac.default_search_location'; -%] - + + + + + [%- END; %] + [%- END; %] +[%- END %] + +[%- content_html = PROCESS render_all_contents; + IF content_html.length > 0; +%] + +

Summary

+

[%- content_html %]

+ +[%- END %] diff --git a/Open-ILS/src/templates-bootstrap/opac/parts/record/contents.tt2 b/Open-ILS/src/templates-bootstrap/opac/parts/record/contents.tt2 index 0c19f46dd9..34192d4c3b 100755 --- a/Open-ILS/src/templates-bootstrap/opac/parts/record/contents.tt2 +++ b/Open-ILS/src/templates-bootstrap/opac/parts/record/contents.tt2 @@ -52,10 +52,6 @@ contents = [ label => l('Date/Time and Place of an Event Note: '), xpath => '//*[@tag="518"]' }, { - display_field => 'abstract', - label => l('Summary, etc.: '), - xpath => '//*[@tag="520"]' - }, { label => l('Target Audience Note: '), xpath => '//*[@tag="521"]' }, { diff --git a/Open-ILS/src/templates-bootstrap/opac/parts/record/summary.tt2 b/Open-ILS/src/templates-bootstrap/opac/parts/record/summary.tt2 index 5bc1e4bd9a..e4ebac6810 100755 --- a/Open-ILS/src/templates-bootstrap/opac/parts/record/summary.tt2 +++ b/Open-ILS/src/templates-bootstrap/opac/parts/record/summary.tt2 @@ -69,6 +69,7 @@ ctx.metalinks.push(' END; -%] [%- INCLUDE "opac/parts/record/authors.tt2" %] + [%- INCLUDE "opac/parts/record/contents-summaryonly.tt2" %]
diff --git a/Open-ILS/src/templates-bootstrap/opac/parts/result/table.tt2 b/Open-ILS/src/templates-bootstrap/opac/parts/result/table.tt2 index b93ba76f09..b339db8242 100755 --- a/Open-ILS/src/templates-bootstrap/opac/parts/result/table.tt2 +++ b/Open-ILS/src/templates-bootstrap/opac/parts/result/table.tt2 @@ -97,9 +97,8 @@
- [% attrs.title | html;%]
+
@@ -174,11 +173,7 @@ [%- END; END; -%]
- [%- IF !show_detail_view AND args.holdings.size > 0 %] -
- [% l('Call number:') %] [% args.holdings.0.label | html %] -
- [% END %] + [% IF rec.popularity > 0.0 AND ctx.hide_badge_scores != 'true' %]
[% l('Popularity:') %] [% rec.popularity %] / 5.0
@@ -374,7 +369,7 @@ - + @@ -384,6 +379,8 @@ [%- END -%] + + [%- IF ebook_api.enabled == 'true' && args.ebook %] @@ -392,8 +389,7 @@ ['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=""> [% l('Check Out E-Item') %] - - + + + + [% l("More Info") %] + [% IF ENV.OILS_CONTENT_CAFE_USER %] diff --git a/Open-ILS/src/templates-bootstrap/opac/parts/searchbar.tt2 b/Open-ILS/src/templates-bootstrap/opac/parts/searchbar.tt2 index 3796187182..b442295f05 100755 --- a/Open-ILS/src/templates-bootstrap/opac/parts/searchbar.tt2 +++ b/Open-ILS/src/templates-bootstrap/opac/parts/searchbar.tt2 @@ -67,7 +67,7 @@ END;
@@ -102,11 +102,12 @@ END;
@@ -171,16 +172,11 @@ END; [% END %] [% END %] - [% IF fcount > 0 %] - - [% END %] - [% IF ctx.query_struct.filters.size > 0 %] + [% IF fcount > 2 %] [% stuff = INCLUDE 'opac/parts/result/adv_filter.tt2' %] [% IF stuff %]

[% l('Search Results filters') %]

-
+
[% l('Filtered by:') %]
[% stuff %]
diff --git a/Open-ILS/src/templates-bootstrap/opac/results.tt2 b/Open-ILS/src/templates-bootstrap/opac/results.tt2 index 6a057cef15..4798f32560 100755 --- a/Open-ILS/src/templates-bootstrap/opac/results.tt2 +++ b/Open-ILS/src/templates-bootstrap/opac/results.tt2 @@ -116,7 +116,10 @@ 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') %] + + +
[% END %]
+ [% IF myopac_cc_allowed %] + [% END %] [% l("Owed") %] [% l("Billing Type") %] [% l("Note") %]
+ [% IF myopac_cc_allowed %] + [% END %] Amount Owed diff --git a/Open-ILS/src/templates-bootstrap/opac/myopac/circs.tt2 b/Open-ILS/src/templates-bootstrap/opac/myopac/circs.tt2 index 2b08e77ebf..7e49ee5a66 100755 --- a/Open-ILS/src/templates-bootstrap/opac/myopac/circs.tt2 +++ b/Open-ILS/src/templates-bootstrap/opac/myopac/circs.tt2 @@ -6,6 +6,7 @@ parent="circs"; %]

[% l('Current Items Checked Out') %]

+

[% l("Do you want to save a list of items you check out? Enable that feature by going to Preferences > Search & History.") %]

[% l("PINES Account Tips") %]
diff --git a/Open-ILS/src/templates-bootstrap/opac/myopac/messages/single_message.tt2 b/Open-ILS/src/templates-bootstrap/opac/myopac/messages/single_message.tt2 index 38c19eeaf4..a5de1ad2fd 100755 --- a/Open-ILS/src/templates-bootstrap/opac/myopac/messages/single_message.tt2 +++ b/Open-ILS/src/templates-bootstrap/opac/myopac/messages/single_message.tt2 @@ -39,7 +39,7 @@
[% l("Message") %] - [% ctx.patron_messages.0.message | html %] +
[% ctx.patron_messages.0.message | html %]
diff --git a/Open-ILS/src/templates-bootstrap/opac/myopac/prefs_settings.tt2 b/Open-ILS/src/templates-bootstrap/opac/myopac/prefs_settings.tt2 index b3efce2379..da968afe49 100755 --- a/Open-ILS/src/templates-bootstrap/opac/myopac/prefs_settings.tt2 +++ b/Open-ILS/src/templates-bootstrap/opac/myopac/prefs_settings.tt2 @@ -54,7 +54,8 @@

+

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 Library Locations Map to find the name of your local library system and branch.

[%- thang = ctx.user.home_ou.id; IF ctx.user_setting_map.$setting; 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 220118badc..c7c98769a3 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 @@ -15,18 +15,36 @@

[% ctx.library.name | html %]

- [%- IF ctx.library.mailing_address; %] + [%- IF ctx.billing_address; %] +
+
+

[% l('Address') %]

+ [% IF ctx.mailing_address.street1 != ctx.billing_address.street1; %] +

[% l('Building Location') %]

+ [% END %] + + [% ctx.billing_address.street1 | html %] + [%- IF ctx.billing_address.street2; "
"; ctx.billing_address.street2 | html; END; %] +

+ [% ctx.billing_address.city | html %], + [% ctx.billing_address.state | html %] + [% ctx.billing_address.post_code | html %]
+ Map / Directions +
+
+ [%- END; %] + + + [%- IF ctx.mailing_address AND (ctx.mailing_address.street1 != ctx.billing_address.street1); %]
-

[% l('Location') %]

+

[% l('Mailing Address') %]

[% ctx.mailing_address.street1 | html %] [%- IF ctx.mailing_address.street2; "
"; ctx.mailing_address.street2 | html; END; %]

[% ctx.mailing_address.city | html %], [% ctx.mailing_address.state | html %] [% ctx.mailing_address.post_code | html %]
-
- Map / Directions
[%- END; %] diff --git a/Open-ILS/src/templates-bootstrap/opac/parts/place_hold.tt2 b/Open-ILS/src/templates-bootstrap/opac/parts/place_hold.tt2 index 5f4dc5df01..d6b30ca9c3 100755 --- a/Open-ILS/src/templates-bootstrap/opac/parts/place_hold.tt2 +++ b/Open-ILS/src/templates-bootstrap/opac/parts/place_hold.tt2 @@ -151,9 +151,9 @@ function maybeToggleNumCopies(obj) { [% IF hdata.parts.size > 0 %]
[% IF enable.radio.parts == 'true' %] -
[% IF !hdata.part_required %] @@ -207,6 +207,7 @@ function maybeToggleNumCopies(obj) {

[%- org_select_id = 'pickup_lib'; -%] + [% PROCESS "opac/parts/org_selector.tt2"; INCLUDE build_org_selector name='pickup_lib' value=ctx.default_pickup_lib id=org_select_id @@ -214,6 +215,7 @@ function maybeToggleNumCopies(obj) {

[% l('Notify when hold is ready for pickup?') %] +

diff --git a/Open-ILS/src/templates-bootstrap/opac/parts/record/contents-summaryonly.tt2 b/Open-ILS/src/templates-bootstrap/opac/parts/record/contents-summaryonly.tt2 new file mode 100644 index 0000000000..ec55b67fc7 --- /dev/null +++ b/Open-ILS/src/templates-bootstrap/opac/parts/record/contents-summaryonly.tt2 @@ -0,0 +1,62 @@ +[%- +contents = [ + { + display_field => 'abstract', + label => l('Summary: '), + xpath => '//*[@tag="520"]' + } +]; + +BLOCK render_contents; + xpath = xpath || '//*[starts-with(@tag,"520")]'; + FOR node IN ctx.marc_xml.findnodes(xpath); + all_content = []; + graphics = []; + FOR subfield IN node.childNodes; + NEXT UNLESS subfield.nodeName == "subfield"; + code = subfield.getAttribute('code'); + IF code == '6'; + linked_fields = [subfield.textContent()]; + target_field = node.getAttribute('tag'); + get_linked_880s; + END; + NEXT UNLESS code.match('[a-z]'); + all_content.push(subfield.textContent); + END; + total_contents = all_content.join(" ").replace('\s+$', ''); + %] [% "
"; total_contents | html ; "
"; + FOREACH link880 IN graphics; + '
'; + link880.value | html; + '
'; + END; + END; +END; + +BLOCK render_all_contents; + FOREACH cont IN contents; + content = ''; + df = cont.display_field; + IF df AND attrs.hl.$df.size; + content = '' _ attrs.hl.$df.join('
'); + ELSE; + content = PROCESS render_contents(xpath=cont.xpath); + END; + IF content.match('\S'); +-%] +
[% cont.label %][% content %]