From ca4cf690804182ee702ee78d41efcd4ffbdaebd8 Mon Sep 17 00:00:00 2001 From: Terran McCanna Date: Thu, 17 Nov 2022 14:40:42 -0500 Subject: [PATCH] PINES Custom - Adds several TPAC customizations to BooPAC This pulls together several earlier TPAC customizations into the BooPAC, primarily to hide search and dropdown options. Signed-off-by: Terran McCanna --- Open-ILS/src/templates-bootstrap/opac/parts/config.tt2 | 1 - Open-ILS/src/templates-bootstrap/opac/parts/misc_util.tt2 | 2 +- Open-ILS/src/templates-bootstrap/opac/parts/place_hold_result.tt2 | 4 +++- Open-ILS/src/templates-bootstrap/opac/parts/qtype_selector.tt2 | 1 - Open-ILS/src/templates-bootstrap/opac/parts/record/subjects.tt2 | 1 + 5 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Open-ILS/src/templates-bootstrap/opac/parts/config.tt2 b/Open-ILS/src/templates-bootstrap/opac/parts/config.tt2 index b67d202e8d..58cf366e2a 100755 --- a/Open-ILS/src/templates-bootstrap/opac/parts/config.tt2 +++ b/Open-ILS/src/templates-bootstrap/opac/parts/config.tt2 @@ -145,7 +145,6 @@ search.adv_config = [ {adv_label => l("Language"), adv_attr => "item_lang", id => 'adv_selector_item_lang'}, {adv_label => l("Audience"), adv_attr => ["audience_group", "audience"], id => 'adv_selector_audience', adv_break => 1}, {adv_label => l("Video Format"), adv_attr => "vr_format", id => 'adv_selector_video_format'}, - {adv_label => l("Bib Level"), adv_attr => "bib_level", id => 'adv_selector_bib_level'}, {adv_label => l("Literary Form"), adv_attr => "lit_form", id => 'adv_selector_lit_form'}, {adv_label => l("Shelving Location"), adv_special => "copy_location", id => 'adv_copy_location_selector', js_only => 101, adv_break => 1}, {adv_label => l("Search Library"), adv_special => "lib_selector", id => 'adv_org_selector'}, diff --git a/Open-ILS/src/templates-bootstrap/opac/parts/misc_util.tt2 b/Open-ILS/src/templates-bootstrap/opac/parts/misc_util.tt2 index 854a67dd38..fd70af9787 100755 --- a/Open-ILS/src/templates-bootstrap/opac/parts/misc_util.tt2 +++ b/Open-ILS/src/templates-bootstrap/opac/parts/misc_util.tt2 @@ -468,7 +468,7 @@ # Extract the 856 URLs that are not otherwise represented by asset.uri's args.online_res = []; - FOR node IN xml.findnodes('//*[@tag="856" and @ind1="4" and (@ind2="0" or @ind2="1")]'); + FOR node IN xml.findnodes('//*[@tag="856" and @ind1="4" and (@ind2="0" or @ind2="1" or @ind2="2")]'); IF node.findnodes('./*[@code="9" or @code="w" or @code="n"]'); NEXT; END; # asset.uri's label = node.findnodes('./*[@code="y"]'); notes = node.findnodes('./*[@code="z" or @code="3"]'); diff --git a/Open-ILS/src/templates-bootstrap/opac/parts/place_hold_result.tt2 b/Open-ILS/src/templates-bootstrap/opac/parts/place_hold_result.tt2 index 6f2597d8e3..1633285130 100755 --- a/Open-ILS/src/templates-bootstrap/opac/parts/place_hold_result.tt2 +++ b/Open-ILS/src/templates-bootstrap/opac/parts/place_hold_result.tt2 @@ -114,7 +114,7 @@ function disable_submit() { # display: (hdata.age_protect ? - l("All available copies are temporarily unavailable at your pickup library. Placing this hold could result in longer wait times.") : + l("The title you have requested is not available for hold requests at this time. Please contact your local library for assistance.") : EVENT_MSG_MAP.$event_key || FAIL_PART_MSG_MAP.$fail_part_key || (hdata.hold_failed_event.desc ? l(hdata.hold_failed_event.desc) : '') || @@ -139,6 +139,7 @@ function disable_submit() { [% END %] + [% IF ctx.is_staff %] [% IF override_possible %]

@@ -149,6 +150,7 @@ function disable_submit() { [% END %] + [% END %] [% IF any_failures OR ctx.general_hold_error %] [% l('Back To Search') %] diff --git a/Open-ILS/src/templates-bootstrap/opac/parts/qtype_selector.tt2 b/Open-ILS/src/templates-bootstrap/opac/parts/qtype_selector.tt2 index ecb7e0e980..e2c1e23a69 100755 --- a/Open-ILS/src/templates-bootstrap/opac/parts/qtype_selector.tt2 +++ b/Open-ILS/src/templates-bootstrap/opac/parts/qtype_selector.tt2 @@ -1,7 +1,6 @@ [% query_types = [ {value => "keyword", label => l("Keyword")}, {value => "title", label => l("Title"), plural_label => l("Titles"), browse => 1}, - {value => "jtitle", label => l("Journal Title")}, {value => "author", label => l("Author"), plural_label => l("Authors"), browse => 1}, {value => "subject", label => l("Subject"), plural_label => l("Subjects"), browse => 1}, {value => "series", label => l("Series"), plural_label => l("Series"), browse => 1} diff --git a/Open-ILS/src/templates-bootstrap/opac/parts/record/subjects.tt2 b/Open-ILS/src/templates-bootstrap/opac/parts/record/subjects.tt2 index d397be724e..36f798a2e4 100755 --- a/Open-ILS/src/templates-bootstrap/opac/parts/record/subjects.tt2 +++ b/Open-ILS/src/templates-bootstrap/opac/parts/record/subjects.tt2 @@ -35,6 +35,7 @@ BLOCK render_subject; xpath = s.xpath || '//*[starts-with(@tag,"6")]'; FOR node IN ctx.marc_xml.findnodes(xpath); + NEXT IF node.findnodes('./*[@code="2" and (text()="fast")]'); ''; all_terms = []; graphics = []; -- 2.11.0