From 9989c0e1c42b445bc31cdf45f3e9faabac312237 Mon Sep 17 00:00:00 2001 From: Jared Camins-Esakov Date: Sat, 4 Aug 2012 13:38:59 -0400 Subject: [PATCH] [SIGNED-OFF] Bug 8210: add links to authorities to headings in OPAC At the moment, there is no way to get to an authority record from a bib record that uses it other than doing a new search on the authority file. This patch adds a link (a cute little magnifying glass) to linked authority records on the OPAC detail view for MARC21 and NORMARC with XSLT enabled. A follow-up patch will add the link to regular mode. Because UNIMARC handles authorities differently, the link is not added to the XSLT. Test plan: 1) Set OPACXSLTDetailsDisplay to 'default' 2) View a record that has some headings that are linked to authority records in the OPAC (easiest way to find a record like that is to edit a record and add some headings using the thesaurus plugin) 3) Observe the cute little magnifying glass links to the authority. Revised version of the patch adds a space between the heading and the magnifying glass. Signed-off-by: Katrin Fischer Patch works nicely. If a library does not like to see the magnifying glass/link to the authority, it's easy to disable it by adding the line .authlink {display:none;} to OpacUserCSS. --- koha-tmpl/opac-tmpl/prog/en/css/opac.css | 4 ++++ .../prog/en/xslt/MARC21slim2OPACDetail.xsl | 12 ++++++++++ .../prog/en/xslt/NORMARCslim2OPACDetail.xsl | 24 ++++++++++++++++++++ 3 files changed, 40 insertions(+) diff --git a/koha-tmpl/opac-tmpl/prog/en/css/opac.css b/koha-tmpl/opac-tmpl/prog/en/css/opac.css index 1e259fb..c273cf2 100644 --- a/koha-tmpl/opac-tmpl/prog/en/css/opac.css +++ b/koha-tmpl/opac-tmpl/prog/en/css/opac.css @@ -2609,6 +2609,10 @@ ul.ui-tabs-nav li { margin-left: 0.5em; } +.authlink { + padding-left: 0.25em; +} + /* jQuery UI Datepicker */ .ui-datepicker-trigger { vertical-align: middle; diff --git a/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl b/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl index b6db8b4..906e053 100644 --- a/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl +++ b/koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl @@ -506,6 +506,12 @@ + + + /cgi-bin/koha/opac-authoritiesdetail.pl?authid= + + + | @@ -909,6 +915,12 @@ ] + + + /cgi-bin/koha/opac-authoritiesdetail.pl?authid= + + + . diff --git a/koha-tmpl/opac-tmpl/prog/en/xslt/NORMARCslim2OPACDetail.xsl b/koha-tmpl/opac-tmpl/prog/en/xslt/NORMARCslim2OPACDetail.xsl index 3a77417..9cfec9a 100644 --- a/koha-tmpl/opac-tmpl/prog/en/xslt/NORMARCslim2OPACDetail.xsl +++ b/koha-tmpl/opac-tmpl/prog/en/xslt/NORMARCslim2OPACDetail.xsl @@ -119,6 +119,12 @@ + + + /cgi-bin/koha/opac-authoritiesdetail.pl?authid= + + + .; @@ -134,6 +140,12 @@ + + + /cgi-bin/koha/opac-authoritiesdetail.pl?authid= + + + .; @@ -148,6 +160,12 @@ + + + /cgi-bin/koha/opac-authoritiesdetail.pl?authid= + + + .; @@ -345,6 +363,12 @@ + + + /cgi-bin/koha/opac-authoritiesdetail.pl?authid= + + + | -- 1.7.9.5