Bug 8210 - Headings in OPAC bib details should link to authority record
Summary: Headings in OPAC bib details should link to authority record
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: 3.10
Hardware: All All
: P5 - low enhancement
Assignee: Jared Camins-Esakov
QA Contact: Mason James
URL:
Keywords:
Depends on:
Blocks: 5888 8212
  Show dependency treegraph
 
Reported: 2012-06-07 14:37 UTC by Jared Camins-Esakov
Modified: 2013-05-23 06:24 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 8210: add links to authorities to headings in OPAC (5.74 KB, patch)
2012-08-04 17:45 UTC, Jared Camins-Esakov
Details | Diff | Splinter Review
screenshot (47.42 KB, image/png)
2012-08-09 06:09 UTC, Katrin Fischer
Details
Bug 8210: add links to authorities to headings in OPAC (6.30 KB, patch)
2012-08-09 11:40 UTC, Jared Camins-Esakov
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 8210: add links to authorities to headings in OPAC (6.50 KB, patch)
2012-08-10 05:18 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 8210: add links to authorities in normal mode headings (6.37 KB, patch)
2012-08-13 20:01 UTC, Jared Camins-Esakov
Details | Diff | Splinter Review
Bug 8210: add links to authorities in normal mode headings (6.39 KB, patch)
2012-08-14 01:59 UTC, Chris Cormack
Details | Diff | Splinter Review
Bug 8210: add links to authorities to headings in OPAC (6.68 KB, patch)
2012-09-16 13:17 UTC, Jared Camins-Esakov
Details | Diff | Splinter Review
Bug 8210: add links to authorities in normal mode headings (6.15 KB, patch)
2012-09-16 13:27 UTC, Jared Camins-Esakov
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jared Camins-Esakov 2012-06-07 14:37:10 UTC
There should be a link to used authority records from the bibliographic details display. This is already done in 5888 for the "normal" display.
Comment 1 Jared Camins-Esakov 2012-08-04 17:45:08 UTC Comment hidden (obsolete)
Comment 2 Katrin Fischer 2012-08-09 06:09:33 UTC
Created attachment 11474 [details]
screenshot

Hi Jared,

features works nicely. Only request I have is a little space between the magnifying glass and the term. 

I think we are also missing a space between the relator code and the term, but this can go on a separate bug.

I love that the icon has a class, so I can hide it if a library doesn't like it:

.authlink {display:none;}
Comment 3 Jared Camins-Esakov 2012-08-09 11:40:30 UTC Comment hidden (obsolete)
Comment 4 Katrin Fischer 2012-08-10 05:18:16 UTC Comment hidden (obsolete)
Comment 5 Jared Camins-Esakov 2012-08-13 20:01:08 UTC Comment hidden (obsolete)
Comment 6 Chris Cormack 2012-08-14 01:59:17 UTC
I like the little icon! Works well, signed off
Comment 7 Chris Cormack 2012-08-14 01:59:45 UTC Comment hidden (obsolete)
Comment 8 Mason James 2012-09-16 12:28:13 UTC
> Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
> Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>


Jared, i get some conflicts applying both patches to master (ce03893)

can you rebase, then ping me for QA?
Comment 9 Jared Camins-Esakov 2012-09-16 13:17:18 UTC
Created attachment 12261 [details] [review]
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 <Katrin.Fischer.83@web.de>
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.
Comment 10 Jared Camins-Esakov 2012-09-16 13:27:24 UTC
Created attachment 12262 [details] [review]
Bug 8210: add links to authorities in normal mode headings

Cherry-picked from BibLibre's work on bug 5888:
opac-detail subject/author links improvements

Added a link to opac-authoritiesdetail.pl when possible.

Only affects 'Normal view'. Does not affect XSLT display.

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Comment 11 Mason James 2012-09-16 13:48:48 UTC
(In reply to comment #8)
> > Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
> > Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

patch looks good, passing QA…

$ koha-qa.pl  -c 2

testing 2 commit(s) (applied to commit ce03893)
 * f0af280 Bug 8210: add links to authorities in normal mode headings
      C4/Biblio.pm
      koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt

 * 2a60d49 Bug 8210: add links to authorities to headings in OPAC
      koha-tmpl/opac-tmpl/prog/en/css/opac.css
      koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl
      koha-tmpl/opac-tmpl/prog/en/xslt/NORMARCslim2OPACDetail.xsl

* C4/Biblio.pm                                                             OK
* koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt                       OK
* koha-tmpl/opac-tmpl/prog/en/xslt/MARC21slim2OPACDetail.xsl               OK
* koha-tmpl/opac-tmpl/prog/en/xslt/NORMARCslim2OPACDetail.xsl              OK
Comment 12 Paul Poulain 2012-09-18 15:45:34 UTC
Patch pushed to master

I don't understand why you say:
Because UNIMARC handles authorities differently, the link is not added
to the XSLT.

In UNIMARC, the $9 also contains the authority. The templates
  <xsl:template name="tag_7xx">
and
  <xsl:call-template name="tag_subject">

in UNIMARCslimUtils.xsl could be used for that unless I'm missing something.

Your opinion ? (& follow-up welcomed ;-) )