From 2db27ec6f11a6c1db45b1f22c16f867f7f980827 Mon Sep 17 00:00:00 2001 From: Jane Sandberg Date: Fri, 24 May 2019 17:49:42 -0700 Subject: [PATCH] LP1812241 follow-up: adds default URI note to Show More Details View This commit also adds some information about this feature's use case to the Release Notes entry, based on a conversation with Rogan. Signed-off-by: Jane Sandberg --- Open-ILS/src/templates/opac/parts/record/summary.tt2 | 11 +---------- Open-ILS/src/templates/opac/parts/result/table.tt2 | 4 +++- Open-ILS/src/templates/opac/parts/uri_note.tt2 | 8 ++++++++ .../OPAC/Default_URI_Link_Note.adoc | 6 ++++++ 4 files changed, 18 insertions(+), 11 deletions(-) create mode 100644 Open-ILS/src/templates/opac/parts/uri_note.tt2 diff --git a/Open-ILS/src/templates/opac/parts/record/summary.tt2 b/Open-ILS/src/templates/opac/parts/record/summary.tt2 index 12a7f91b48..f8bbafd623 100644 --- a/Open-ILS/src/templates/opac/parts/record/summary.tt2 +++ b/Open-ILS/src/templates/opac/parts/record/summary.tt2 @@ -226,16 +226,7 @@ IF num_uris > 0; END; -%] - [%- IF uri.note -%] - [%- '- ' _ uri.note _ '' %] - [%- ELSE -%] - [% IF ctx.get_org_setting(ctx.search_ou, 'opac.uri_default_note_text') %] - [% link_note = ctx.get_org_setting(ctx.search_ou, 'opac.uri_default_note_text') %] - [% ''; link_note | html; '' %] - [% END %] - [%- END -%] - - + [% INCLUDE "opac/parts/uri_note.tt2" %] [%- IF attrs.gtin13; ''; END; %] diff --git a/Open-ILS/src/templates/opac/parts/result/table.tt2 b/Open-ILS/src/templates/opac/parts/result/table.tt2 index 63b4980360..1a2ea519fd 100644 --- a/Open-ILS/src/templates/opac/parts/result/table.tt2 +++ b/Open-ILS/src/templates/opac/parts/result/table.tt2 @@ -347,7 +347,9 @@ END; [% l('Electronic resource') %] - [% uri.link | html %][% ' - ' _ uri.note | html IF uri.note %] + [% uri.link | html %] + [% INCLUDE "opac/parts/uri_note.tt2" %] + [% END %] [% END %] diff --git a/Open-ILS/src/templates/opac/parts/uri_note.tt2 b/Open-ILS/src/templates/opac/parts/uri_note.tt2 new file mode 100644 index 0000000000..1847ec7697 --- /dev/null +++ b/Open-ILS/src/templates/opac/parts/uri_note.tt2 @@ -0,0 +1,8 @@ +[%- IF uri.note -%] + [%- '- ' _ uri.note _ '' %] +[%- ELSE -%] + [% IF ctx.get_org_setting(ctx.search_ou, 'opac.uri_default_note_text') %] + [% link_note = ctx.get_org_setting(ctx.search_ou, 'opac.uri_default_note_text') %] + [% ''; link_note | html; '' %] + [% END %] +[%- END -%] diff --git a/docs/RELEASE_NOTES_NEXT/OPAC/Default_URI_Link_Note.adoc b/docs/RELEASE_NOTES_NEXT/OPAC/Default_URI_Link_Note.adoc index ad8c34ce90..f4abce59c6 100644 --- a/docs/RELEASE_NOTES_NEXT/OPAC/Default_URI_Link_Note.adoc +++ b/docs/RELEASE_NOTES_NEXT/OPAC/Default_URI_Link_Note.adoc @@ -3,3 +3,9 @@ New Setting for Default URI Notes If a URI does not have a 856$z defining a note to display next to it in the OPAC you can use the opac.uri_default_note_text setting to define one. + +This feature helps to save catalogers time. If your library has +a note that should be added to a wide range of electronic resources, +rather than applying the note to all applicable records, you can set +this setting to an appropriate value, and add an 856$z note for any +resources that don't meet the criteria. -- 2.43.2