Koha/koha-tmpl/opac-tmpl/bootstrap/css
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
..
fonts Bug 20554: (follow-up) Add local font files and add method for loading them 2018-10-19 17:27:42 +00:00
src Bug 8995: Show OpenURL links in OPAC search results 2019-04-29 15:34:09 +00:00
babeltheque.css
bootstrap-theme-oai.css Bug 15527: Add a stylesheet for OAI-PMH to aid usability 2016-03-24 17:28:38 +00:00
datatables.css
hierarchy.css
oai.css Bug 15527: Add a stylesheet for OAI-PMH to aid usability 2016-03-24 17:28:38 +00:00
opac.css Bug 22772: Compiled CSS 2019-04-29 11:55:58 +00:00
print.css Bug 20427: (RM follow-up) Add compiled CSS 2018-08-09 15:24:10 +00:00
right-to-left.css Bug 20427: (RM follow-up) Add compiled CSS 2018-08-09 15:24:10 +00:00
sco.css Bug 22772: Compiled CSS 2019-04-29 11:55:58 +00:00