Koha-clms/installer/data/mysql
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
..
atomicupdate Bug 8995: Show OpenURL links in OPAC search results 2019-04-29 15:34:09 +00:00
de-DE Bug 21545: Translate new ACCOUNT_PAYMENT and ACCOUNT_WRITEOFF notices to German 2019-04-18 12:00:14 +00:00
en Bug 21545: Translate 'Stock rotation slip' 2019-04-18 12:00:14 +00:00
es-ES Bug 21545: Translate 'Stock rotation slip' 2019-04-18 12:00:14 +00:00
fr-CA Bug 22095: Replaced dead links with working links 2019-01-17 02:23:27 +00:00
fr-FR Bug 21545: Translate 'Stock rotation slip' 2019-04-18 12:00:14 +00:00
it-IT Bug 22095: Replaced dead links with working links 2019-01-17 02:23:27 +00:00
mandatory Bug 20581: Modifications to database schema 2019-02-22 14:31:31 +00:00
nb-NO Bug 21545: Translate 'Stock rotation slip' 2019-04-18 12:00:14 +00:00
pl-PL Bug 21545: Translate 'Stock rotation slip' 2019-04-18 12:00:14 +00:00
ru-RU Bug 21545: Translate 'Stock rotation slip' 2019-04-18 12:00:14 +00:00
uk-UA Bug 21545: Translate 'Stock rotation slip' 2019-04-18 12:00:14 +00:00
account_offset_types.sql Bug 22521: (QA follow-up) Corrections to tests 2019-04-17 16:49:36 +00:00
audio_alerts.sql Bug 11431: (QA followup) Make audio alerts sql top level 2015-11-04 12:33:53 -03:00
backfill_statistics.pl Bug 13795: Remove occurences of unused columns in code 2019-04-18 10:05:51 +00:00
fix_unclosed_nonaccruing_fines_bug17135.pl Bug 17135: [QA Follow-up] Changes as to reporting 2016-09-16 10:47:03 +00:00
kohastructure.sql Bug 22729: DB update 2019-04-25 10:06:44 +00:00
labels_upgrade.pl Bug 20000: Use Modern::Perl in installer scripts 2019-02-04 16:57:14 +00:00
patroncards_upgrade.pl Bug 20000: Use Modern::Perl in installer scripts 2019-02-04 16:57:14 +00:00
sysprefs.sql Bug 8995: Show OpenURL links in OPAC search results 2019-04-29 15:34:09 +00:00
update22to30.pl Bug 20000: Use Modern::Perl in installer scripts 2019-02-04 16:57:14 +00:00
updatedatabase.pl Bug 10300: DBRev 18.12.00.065 2019-04-26 11:49:08 +00:00
userflags.sql Bug 11897: Add mising semi-colon to user*.sql 2018-10-09 17:19:00 +00:00
userpermissions.sql Bug 20128: Add new permission for new installations 2019-04-17 12:25:26 +00:00