From: Rogan Hamby Date: Thu, 17 Jan 2019 16:47:26 +0000 (-0500) Subject: LP1812241: add YAOUS for default URI note text X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=c45f323fde5ace3ce6d89b2c0db72c9a10953863;p=working%2FEvergreen.git LP1812241: add YAOUS for default URI note text Signed-off-by: Rogan Hamby Signed-off-by: Jane Sandberg --- diff --git a/Open-ILS/src/sql/Pg/950.data.seed-values.sql b/Open-ILS/src/sql/Pg/950.data.seed-values.sql index c887e9a5bd..e70adec752 100644 --- a/Open-ILS/src/sql/Pg/950.data.seed-values.sql +++ b/Open-ILS/src/sql/Pg/950.data.seed-values.sql @@ -5498,7 +5498,15 @@ INSERT into config.org_unit_setting_type 'circ.staff_placed_holds_fallback_to_ws_ou', 'For staff-placed holds, in the absence of a patron preferred pickup location, fall back to using the staff workstation OU (rather than patron home OU)', 'coust', 'description'), - 'bool', null) + 'bool', null), +( 'opac.uri_default_note_text', 'opac', + oils_i18n_gettext('opac.uri_default_note_text', + 'Default text to appear for 856 links if none is present', + 'coust', 'label'), + oils_i18n_gettext('opac.uri_default_note_text', + 'When no value is present in the 856$z this string will be used instead', + 'coust', 'description'), + 'string', null) ; UPDATE config.org_unit_setting_type diff --git a/Open-ILS/src/sql/Pg/upgrade/XXXX.data.uri_note_setting-data.sql b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.uri_note_setting-data.sql new file mode 100644 index 0000000000..abc8487354 --- /dev/null +++ b/Open-ILS/src/sql/Pg/upgrade/XXXX.data.uri_note_setting-data.sql @@ -0,0 +1,16 @@ +BEGIN; + +INSERT into config.org_unit_setting_type +( name, grp, label, description, datatype, fm_class ) VALUES +( 'opac.uri_default_note_text', 'opac', + oils_i18n_gettext('opac.uri_default_note_text', + 'Default text to appear for 856 links if none is present', + 'coust', 'label'), + oils_i18n_gettext('opac.uri_default_note_text', + 'When no value is present in the 856$z this string will be used instead', + 'coust', 'description'), + 'string', null) +; + +COMMIT; + diff --git a/Open-ILS/src/templates/opac/parts/record/summary.tt2 b/Open-ILS/src/templates/opac/parts/record/summary.tt2 index 3bc0ef5855..12a7f91b48 100644 --- a/Open-ILS/src/templates/opac/parts/record/summary.tt2 +++ b/Open-ILS/src/templates/opac/parts/record/summary.tt2 @@ -226,7 +226,17 @@ IF num_uris > 0; END; -%] - [%- ' - ' _ uri.note _ '' IF uri.note %] + [%- 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 -%] + + + [%- IF attrs.gtin13; ''; END; %] [%- IF num_uris == 1 %]

[% ELSE %][% 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 new file mode 100644 index 0000000000..ad8c34ce90 --- /dev/null +++ b/docs/RELEASE_NOTES_NEXT/OPAC/Default_URI_Link_Note.adoc @@ -0,0 +1,5 @@ +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.