Koha/koha-tmpl/intranet-tmpl/prog/en/modules
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
..
acqui Bug 22556: Add ability to quickly filter funds/budgets by library on the Acquisitions home page 2019-04-25 11:44:34 +00:00
admin Bug 8995: Show OpenURL links in OPAC search results 2019-04-29 15:34:09 +00:00
authorities Bug 22023: Further improve responsive layout handling of staff client menu bar 2019-03-13 05:31:28 +00:00
basket Bug 22023: Further improve responsive layout handling of staff client menu bar 2019-03-13 05:31:28 +00:00
batch Bug 20102: Remove attribute "text/css" for <style> element used in staff client templates 2019-02-19 13:52:15 +00:00
catalogue Bug 22035: Improve local cover image browser page 2019-04-26 10:48:34 +00:00
cataloguing Bug 15496: (follow-up) Update interaction for deleting records 2019-04-26 12:07:04 +00:00
circ Bug 10300: (follow-up) add controls on transfers page 2019-04-26 11:49:08 +00:00
clubs Bug 22698: Fix incorrect button classes 2019-04-16 13:17:33 +00:00
common Bug 22015: Move DataTables CSS to global include 2019-02-19 19:40:35 +00:00
course_reserves Bug 22698: Fix incorrect button classes 2019-04-16 13:17:33 +00:00
errors
ill Bug 21460: (follow-up) Fix bugs found in QA 2019-04-25 10:46:56 +00:00
installer Bug 20658: Move template JavaScript to the footer: Installer and onboarding 2019-03-15 19:44:45 +00:00
labels Bug 22698: Fix incorrect button classes 2019-04-16 13:17:33 +00:00
mana Bug 22250: Clean up Mana KB integration with serials and reports 2019-04-11 11:34:14 +00:00
members Bug 21757: (folow-up) Restore patron brief detail page 2019-04-29 12:12:40 +00:00
offline_circ
onboarding Bug 22451: Use Asset everywhere 2019-04-16 13:17:32 +00:00
patron_lists Bug 22505: Add column configuration to patron list table 2019-03-28 18:03:48 +00:00
patroncards Bug 22698: Fix incorrect button classes 2019-04-16 13:17:33 +00:00
plugins Bug 22023: Further improve responsive layout handling of staff client menu bar 2019-03-13 05:31:28 +00:00
reports Bug 22698: Fix incorrect button classes 2019-04-16 13:17:33 +00:00
reserve Bug 20421: (follow-up) Fix styling 2019-04-29 13:35:35 +00:00
reviews
rotating_collections Bug 22015: Move DataTables CSS to global include 2019-02-19 19:40:35 +00:00
serials Bug 22621: Fix filters on subscription search results 2019-04-26 10:26:13 +00:00
services
suggestion Bug 22023: Further improve responsive layout handling of staff client menu bar 2019-03-13 05:31:28 +00:00
tags Bug 22698: Fix incorrect button classes 2019-04-16 13:17:33 +00:00
test
tools Bug 22175: (follow-up) Identify columns to exclude from export 2019-04-18 10:53:05 +00:00
virtualshelves Bug 20891: Escape html then JSON 2019-04-25 10:27:27 +00:00
about.tt Bug 21502: (QA follow-up) Rephrase warning slightly 2019-04-29 12:44:08 +00:00
auth.tt Bug 21890: Allow restricting password resets by patron category 2019-04-12 02:32:03 +00:00
intranet-main.tt