Koha/koha-tmpl/intranet-tmpl/prog/en/modules/admin
Julian Maurice ffb432df78 Bug 8995: Show OpenURL links in OPAC search results
This patch use GetCOinS sub to provide an OpenURL link in OPAC search
results. It uses 4 new system preferences:
  - OpenURLinOPACResults: enable or disable this feature
  - OpenURLResolverURL: url of the openURL resolver
  - OpenURLText: text of the link
  - OpenURLImageLocation: image of the link

Link is displayed as an image if OpenURLImageLocation is defined, and as
text otherwise.
It works both with and without XSLT enabled.

Changes made to GetCOinSBiblio:

For 'journal':
- Title should be in rft.jtitle instead of rft.title
- rft.date, rft.aulast, rft.aufirst, rft.au, rft.pub and rft.pages have
  no meaning for a subscription, so they are simply removed from URL

This patch refactors GetCOinSBiblio, so the construction of URL is done
only at the end. This way we do not have ugly
  $var .= "&$value"
in the function body.

Also use URI::Escape instead of custom regexps.

This development consider the value of syspref OPACURLOpenInNewWindow
when building the link.

Test plan:
1/ Enable syspref OPACShowOpenURL and put your OpenURL resolver URL in
OpenURLResolverURL syspref (if you don't have one, just fill it with
some fake URL, you'll have to check if OpenURL links are correct)
2/ If you want, set the other sysprefs OpenURLImageLocation and
OpenURLText
3/ Fill syspref OPACOpenURLItemTypes with some (not all) of your
item types.
4/ Empty sysprefs OPACXSLTDetailsDisplay and OPACXSLTResultsDisplay
5/ Go to OPAC and launch a search.
6/ Check you have in the results (near the title) the OpenURL link (only
for itemtypes that are in OPACOpenURLItemTypes).
Toggle OPACURLOpenInNewWindow syspref and check that the behaviour of
the link is correct.
7/ Go to the detail page of one of those and check you have the OpenURL
link too. (Above tags)
Toggle OPACURLOpenInNewWindow syspref and check that the behaviour of
the link is correct.
8/ Set sysprefs OPACXSLTDetailsDisplay and OPACXSLTResultsDisplay to
"default" and repeat steps 5 to 7

Signed-off-by: Paola Rossi <paola.rossi@cineca.it>

Signed-off-by: Magnus Enger <magnus@libriotech.no>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-04-29 15:34:09 +00:00
..
preferences Bug 8995: Show OpenURL links in OPAC search results 2019-04-29 15:34:09 +00:00
searchengine/elasticsearch Bug 18213: Add language facets to Elasticsearch 2019-03-28 15:57:32 +00:00
additional-fields.tt Bug 22764: Change marcfield to MARC field in alert message 2019-04-25 11:36:23 +00:00
admin-home.tt Bug 15774: (follow-up) fix rebase issues 2019-03-07 20:37:06 +00:00
aqbudgetperiods.tt Bug 22015: Move DataTables CSS to global include 2019-02-19 19:40:35 +00:00
aqbudgets.tt Bug 22015: Move DataTables CSS to global include 2019-02-19 19:40:35 +00:00
aqcontract.tt Bug 21526: Use the 'url' filter when needed 2018-11-12 16:35:43 -03:00
aqplan.tt Bug 21526: uri escape TT variables when used in 'a href' 2018-10-26 17:09:57 +00:00
audio_alerts.tt Bug 22698: Fix incorrect button classes 2019-04-16 13:17:33 +00:00
auth_subfields_structure.tt Bug 21706: (QA follow-up) Fix tabs 2018-11-12 16:39:57 -03:00
auth_tag_structure.tt Bug 22023: Further improve responsive layout handling of staff client menu bar 2019-03-13 05:31:28 +00:00
authorised_values.tt Bug 22023: Further improve responsive layout handling of staff client menu bar 2019-03-13 05:31:28 +00:00
authtypes.tt Bug 22023: Further improve responsive layout handling of staff client menu bar 2019-03-13 05:31:28 +00:00
biblio_framework.tt Bug 22023: Further improve responsive layout handling of staff client menu bar 2019-03-13 05:31:28 +00:00
branch_transfer_limits.tt Bug 18584: Our legacy code contains trailing-spaces 2019-04-12 02:01:39 +00:00
branches.tt Bug 22023: Further improve responsive layout handling of staff client menu bar 2019-03-13 05:31:28 +00:00
categories.tt Bug 18011: Enrollment period date on patron category can be set in the past without any error/warning messages 2019-04-16 13:17:32 +00:00
checkmarc.tt
cities.tt Bug 22023: Further improve responsive layout handling of staff client menu bar 2019-03-13 05:31:28 +00:00
classsources.tt Bug 22023: Further improve responsive layout handling of staff client menu bar 2019-03-13 05:31:28 +00:00
clone-rules.tt
columns_settings.tt Bug 21783: Reindent admin/columns_settings.tt 2019-04-19 14:38:50 +00:00
currency.tt Bug 22023: Further improve responsive layout handling of staff client menu bar 2019-03-13 05:31:28 +00:00
didyoumean.tt Bug 14457: (QA follow-up) Fix QA script complaints and amend system preference text 2019-04-16 13:17:33 +00:00
edi_accounts.tt Bug 22023: Further improve responsive layout handling of staff client menu bar 2019-03-13 05:31:28 +00:00
edi_ean_accounts.tt Bug 22023: Further improve responsive layout handling of staff client menu bar 2019-03-13 05:31:28 +00:00
fieldmapping.tt Bug 20741: Update two-column templates with Bootstrap grid: Administration part 5 2018-09-06 12:18:32 +00:00
item_circulation_alerts.tt Bug 21672: Switch templates to Bootstrap grid: Various 2019-01-25 17:41:37 +00:00
items_search_field.tt
items_search_fields.tt Bug 19497: Removed title (tooltip) from Edit button in items_search_fields.tt 2019-04-11 13:52:08 +00:00
itemtypes.tt Bug 22023: Further improve responsive layout handling of staff client menu bar 2019-03-13 05:31:28 +00:00
koha2marclinks.tt Bug 22015: Move DataTables CSS to global include 2019-02-19 19:40:35 +00:00
library_groups.tt Bug 22023: Further improve responsive layout handling of staff client menu bar 2019-03-13 05:31:28 +00:00
localization.tt Bug 22015: Move DataTables CSS to global include 2019-02-19 19:40:35 +00:00
marc_subfields_structure.tt Bug 21740: Show @ when editing fixed-length fields on bibliographic frameworks 2018-11-05 14:41:03 +00:00
marctagstructure.tt Bug 22023: Further improve responsive layout handling of staff client menu bar 2019-03-13 05:31:28 +00:00
matching-rules.tt Bug 22023: Further improve responsive layout handling of staff client menu bar 2019-03-13 05:31:28 +00:00
oai_set_mappings.tt Bug 20742: Update two-column templates with Bootstrap grid: Administration part 6 2018-09-06 12:43:20 +00:00
oai_sets.tt Bug 22023: Further improve responsive layout handling of staff client menu bar 2019-03-13 05:31:28 +00:00
overdrive.tt Bug 21646: Clean up Overdrive template 2019-03-29 11:28:23 +00:00
patron-attr-types.tt Bug 22023: Further improve responsive layout handling of staff client menu bar 2019-03-13 05:31:28 +00:00
preferences.tt Bug 8000: (QA follow-up) Add email validation to system preferences 2019-04-29 15:08:47 +00:00
printers.tt Bug 22023: Further improve responsive layout handling of staff client menu bar 2019-03-13 05:31:28 +00:00
share_content.tt Bug 22196: (QA follow-up) Fix some more typo 2019-02-04 14:53:59 +00:00
smart-rules.tt Bug 20837: (QA follow-up) adding missing filter to make QA tool happy 2019-04-25 10:26:22 +00:00
sms_providers.tt Bug 22023: Further improve responsive layout handling of staff client menu bar 2019-03-13 05:31:28 +00:00
sru_modmapping.tt Bug 21647: Clean up SRU fields mapping templates 2018-11-06 17:01:44 +00:00
sru_modmapping_auth.tt Bug 21647: Clean up SRU fields mapping templates 2018-11-06 17:01:44 +00:00
systempreferences.tt Bug 22023: Further improve responsive layout handling of staff client menu bar 2019-03-13 05:31:28 +00:00
transport-cost-matrix.tt Bug 21279: Fix &nbsp; in transport cost matrix 2018-10-15 13:08:04 +00:00
usage_statistics.tt Bug 21526: Use the 'url' filter when needed 2018-11-12 16:35:43 -03:00
z3950servers.tt Bug 22023: Further improve responsive layout handling of staff client menu bar 2019-03-13 05:31:28 +00:00