From: Dan Pearl Date: Mon, 19 Mar 2018 19:09:43 +0000 (-0400) Subject: LP1753536 - Add a new column to the OPAC items out display which indicates which X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=a661b740adb1c6b0d36410196177100dee2343af;p=working%2FEvergreen.git LP1753536 - Add a new column to the OPAC items out display which indicates which library owns the materials (the library you would have to approach for a renewal if you are out of renewals). Signed-off-by: Dan Pearl --- diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm index b6305175ed..4c2773d846 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Account.pm @@ -1525,7 +1525,7 @@ sub fetch_user_circs { flesh => 3, flesh_fields => { circ => ['target_copy'], - acp => ['call_number'], + acp => ['call_number','location','circ_lib'], acn => ['record'] } }; @@ -1741,7 +1741,7 @@ sub handle_circ_update { my $action = shift; my $circ_ids = shift; - my $circ_ids //= [$self->cgi->param('circ_id')]; + $circ_ids //= [$self->cgi->param('circ_id')]; if ($action =~ /delete/) { my $options = { diff --git a/Open-ILS/src/templates/opac/myopac/circs.tt2 b/Open-ILS/src/templates/opac/myopac/circs.tt2 index 1b0683cd91..e7088f899f 100644 --- a/Open-ILS/src/templates/opac/myopac/circs.tt2 +++ b/Open-ILS/src/templates/opac/myopac/circs.tt2 @@ -76,7 +76,8 @@ [% sort_head("renews", l("Renewals Left")) %] [% sort_head("due", l("Due Date")) %] [% sort_head("barcode", l("Barcode")) %] - [% sort_head("callnum", l("Call number")) %] + [% sort_head("callnum", l("Call Number")) %] + [% sort_head("lib", l("Lending Library")) %] @@ -112,6 +113,8 @@ CASE "callnum"; circ.SORTING = circ.circ.target_copy.call_number.label; + CASE "lib"; + circ.SORTING = circ.circ.target_copy.circ_lib.name; CASE; sort_field = ""; @@ -179,6 +182,11 @@ [% circ.circ.target_copy.call_number.label | html %] + + [%- copy_info = circ.circ.target_copy; + INCLUDE "opac/parts/library_name_link.tt2"; + %] + [% IF circ.renewal_response AND circ.renewal_response.textcode != 'SUCCESS' %] diff --git a/Open-ILS/src/templates/opac/parts/library_name_link.tt2 b/Open-ILS/src/templates/opac/parts/library_name_link.tt2 index 1ad030c25a..8b8275e634 100644 --- a/Open-ILS/src/templates/opac/parts/library_name_link.tt2 +++ b/Open-ILS/src/templates/opac/parts/library_name_link.tt2 @@ -4,12 +4,21 @@ opac_root = ctx.kpac_root; END; - org_name = ctx.get_aou(copy_info.circ_lib).name; - org_sname = ctx.get_aou(copy_info.circ_lib).shortname; - lib_url = ctx.get_org_setting(copy_info.circ_lib, 'lib.info_url'); - prefer_external_url = ctx.get_org_setting(copy_info.circ_lib, 'lib.prefer_external_url'); + # 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 = copy_info.circ_lib.shortname; + ELSE; + org_id = copy_info.circ_lib; + org_name = ctx.get_aou(org_id).name; + org_sname = ctx.get_aou(org_id).shortname; + END; + + 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/' _ ctx.get_aou(copy_info.circ_lib).shortname, {}, 1); + lib_url = mkurl(opac_root _ '/library/' _ org_sname, {}, 1); END; IF lib_url; ''; END; ''; org_name | html; ''; diff --git a/docs/RELEASE_NOTES_NEXT/OPAC/LP1753536_items_out_lib.adoc b/docs/RELEASE_NOTES_NEXT/OPAC/LP1753536_items_out_lib.adoc new file mode 100644 index 0000000000..c17c7cd006 --- /dev/null +++ b/docs/RELEASE_NOTES_NEXT/OPAC/LP1753536_items_out_lib.adoc @@ -0,0 +1,7 @@ +New Column in Items Out Display +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +A new column, Lending Library, has been added to the Items Out display which +shows the owning library of the item (not necessarily the library at which +the item was picked up at). When a patron has run out of renewals, the owning +library is the one with whom the patron will negotiate additional renewals, and +clicking on the library name will provide contact information for that library.