Koha/koha-tmpl/opac-tmpl/prog/en/includes/authorities-search-results.inc
Jared Camins-Esakov 4f043f3f77 Bug 3462: Links in authorities should be hyperlinks
Make see also links in both the OPAC and authority module search results
into hyperlinks and not just textual strings.

To test:
1. Do a search for an authority that will bring up a heading with a
   see also reference in the staff client and the OPAC.
2. Confirm that the see also references listed in the search results
   are now hyperlinks, which work.

Also quiets an unnecessary warning about an uninitialized value.

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Rebased 26 July 2012

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Rebased on master 1 August 2012

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Rebased on master 6 August 2012

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Rebased on master 11 September 2012

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Patch works nicely and is a great improvement.

Tests:
- Checked links for existing and non existing "see alsos" give correct
  search results
- Verified links show up for all "see alsos" in a result list
- Verified links are properly linked with the correct names
- Checked logs don't show errors

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-09-13 16:53:50 +02:00

63 lines
2.7 KiB
HTML

[% BLOCK showreference %]
[% IF marcflavour == 'UNIMARC' %]
[% SWITCH type %]
[% CASE 'broader' %]
<span class="BT">[% heading | html %]</span> --
[% CASE 'narrower' %]
<span class="NT">[% heading | html %]</span> --
[% CASE 'narrower' %]
<span class="NT">[% heading | html %]</span> --
[% CASE 'seefrom' %]
<span class="UF">[% heading | html %]</span> --
[% CASE 'seealso' %]
<span class="RT">[% heading | html %]</span> --
[% END %]
[% ELSE %]
[% IF ( label ) %]<span class="label">[% label | html %]</span>[% END %]
<span class="heading">
[% IF ( linkpath && search ) %]<a href="[% link | url %][% search | url %]">[% heading | html %]</a>
[% ELSE %][% heading | html %][% END %]
</span>
[% UNLESS ( type=='seefrom' || type=='seealso' ) %]<span class="type">[% SWITCH type %]
[% CASE 'earlier' %](Earlier heading)
[% CASE 'later' %](Later heading)
[% CASE 'acronym' %](Acronym)
[% CASE 'musical' %](Musical composition)
[% CASE 'broader' %](Broader heading)
[% CASE 'narrower' %](Narrower heading)
[% CASE 'parent' %](Immediate parent body)
[% CASE %]([% type | html %])
[% END %]</span>[% END %]
[% END %]
[% END %]
[% BLOCK authresult %]
[% IF ( summary.summary ) %][% summary.summary | html %]:[% END %]
[% UNLESS ( summary.summaryonly ) %]
[% FOREACH authorize IN summary.authorized %]
<span class="authorizedheading">[% authorize.heading | html %]</span>
[% END %]
[% IF ( marcflavour == 'UNIMARC' ) %]
[% FOREACH note IN summary.notes %]
<span class="note">[% note | html %]</span>
[% END %]
[% FOREACH seefro IN summary.seefrom %]
[% PROCESS showreference heading=seefro.heading label="" type=seefro.type search='' %]
[% END %]
[% ELSE %]
[% IF ( summary.seefrom ) %]
[% FOREACH seefro IN summary.seefrom %]
<div class="seefrom authref">
[% PROCESS showreference heading=seefro.heading label="used for/see from:" type=seefro.type search='' %]
</div>
[% END %]
[% END %]
[% IF ( summary.seealso ) %]
[% FOREACH seeals IN summary.seealso %]
<div class="seealso authref">
[% PROCESS showreference heading=seeals.heading label="see also:" type=seeals.type linkpath=link search=seeals.search %]
</div>
[% END %]
[% END %]
[% END %]
[% END %]
[% END %]