@@ -, +, @@ display for URL --- .../bug_15352_-_add_URLLinkTextItems_syspref.sql | 1 + installer/data/mysql/sysprefs.sql | 1 + .../en/modules/admin/preferences/cataloguing.pref | 4 +++ .../prog/en/modules/catalogue/detail.tt | 6 ++++- .../opac-tmpl/bootstrap/en/modules/opac-detail.tt | 31 ++++++++++++++++------ 5 files changed, 34 insertions(+), 9 deletions(-) create mode 100644 installer/data/mysql/atomicupdate/bug_15352_-_add_URLLinkTextItems_syspref.sql --- a/installer/data/mysql/atomicupdate/bug_15352_-_add_URLLinkTextItems_syspref.sql +++ a/installer/data/mysql/atomicupdate/bug_15352_-_add_URLLinkTextItems_syspref.sql @@ -0,0 +1, @@ +INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES ('URLLinkTextItems', '', NULL, 'Replace links for items with this text', 'Free'); --- a/installer/data/mysql/sysprefs.sql +++ a/installer/data/mysql/sysprefs.sql @@ -542,6 +542,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('UpdateTotalIssuesOnCirc','0',NULL,'Whether to update the totalissues field in the biblio on each circ.','YesNo'), ('uppercasesurnames','0',NULL,'If ON, surnames are converted to upper case in patron entry form','YesNo'), ('URLLinkText','',NULL,'Text to display as the link anchor in the OPAC','free'), +('URLLinkTextItems', '', NULL, 'Replace links for items with this text', 'Free'), ('UsageStats', 0, NULL, 'Share anonymous usage data on the Hea Koha community website.', 'YesNo'), ('UsageStatsCountry', '', NULL, 'The country where your library is located, to be shown on the Hea Koha community website', 'Choice'), ('UsageStatsID', '', NULL, 'This preference is part of Koha but it should not be deleted or updated manually.', 'Free'), --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/cataloguing.pref +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/cataloguing.pref @@ -127,6 +127,10 @@ Cataloging: - If the pref is empty, no fields are restricted. Display: - + - Show + - pref: URLLinkTextItems + - as the text of links for items. + - - 'Separate multiple displayed authors, series or subjects with ' - pref: AuthoritySeparator class: short --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt @@ -783,7 +783,11 @@ function verify_images() { [% END %] [% IF ( itemdata_uri ) %] - [% item.uri %] + [% IF ( Koha.Preference('URLLinkTextItems') && item.uri ) %] + [% Koha.Preference('URLLinkTextItems') %] + [% ELSE %] + [% item.uri %] + [% END %] [% END %] [% IF ( itemdata_copynumber ) %] [% item.copynumber %] --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt +++ a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt @@ -1288,18 +1288,33 @@ [% IF ( itemdata_uri ) %] [% IF ITEM_RESULT.uri %] - [% IF trackclicks == 'track' || trackclicks == 'anonymous' %] - [% IF Koha.Preference("OPACURLOpenInNewWindow") %] - Link to resource + [% IF Koha.Preference('URLLinkTextItems') %] + [% IF trackclicks == 'track' || trackclicks == 'anonymous' %] + [% IF Koha.Preference("OPACURLOpenInNewWindow") %] + [% Koha.Preference('URLLinkTextItems') %] + [% ELSE %] + [% Koha.Preference('URLLinkTextItems') %] + [% END %] [% ELSE %] - Link to resource + [% IF Koha.Preference("OPACURLOpenInNewWindow") %] + [% Koha.Preference('URLLinkTextItems') %] + [% ELSE %] + [% Koha.Preference('URLLinkTextItems') %] + [% END %] [% END %] - [% ELSE %] - [% IF Koha.Preference("OPACURLOpenInNewWindow") %] - [% ITEM_RESULT.uri %] + [% IF trackclicks == 'track' || trackclicks == 'anonymous' %] + [% IF Koha.Preference("OPACURLOpenInNewWindow") %] + Link to resource + [% ELSE %] + Link to resource + [% END %] [% ELSE %] - [% ITEM_RESULT.uri %] + [% IF Koha.Preference("OPACURLOpenInNewWindow") %] + [% ITEM_RESULT.uri %] + [% ELSE %] + [% ITEM_RESULT.uri %] + [% END %] [% END %] [% END %] [% END %] --