Koha/koha-tmpl/opac-tmpl/prog/en/includes/authorities-search-results.inc
Jared Camins-Esakov 569e3823fd Bug 8204: Add user friendly authority view to OPAC
Up until now, the only authority view in the OPAC was a
rather-unfriendly expanded MARC view. This patch adds a user-friendly
view similar to the biblio details view.

Specific features to be aware of:
* Right-to-left text in the MARC21 880 field will show up in the
  appropriate location with the appropriate alignment and wrapping
* There is very little CSS styling. Any suggestions for how to make
  the display more attractive would be gratefully received.

To test:
1) Do a search for an authority in the OPAC.
2) Choose an authority record to view.
3) Observe that the view is more user-friendly and polished.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works very nicely now. The old view is still available, but the
user is presented with a nicer non-MARC view first.
2012-07-26 18:11:44 +02:00

59 lines
2.4 KiB
HTML

[% BLOCK showreference %]
[% IF marcflavour == 'UNIMARC' %]
[% SWITCH type %]
[% CASE 'broader' %]
<span class="BT">[% heading %]</span> --
[% CASE 'narrower' %]
<span class="NT">[% heading %]</span> --
[% CASE 'narrower' %]
<span class="NT">[% heading %]</span> --
[% CASE 'seefrom' %]
<span class="UF">[% heading %]</span> --
[% CASE 'seealso' %]
<span class="RT">[% heading %]</span> --
[% END %]
[% ELSE %]
[% IF ( label ) %]<span class="label">[% label %]</span>[% END %]
<span class="heading">[% heading %]</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 %]([% type %])
[% END %]</span>[% END %]
[% END %]
[% END %]
[% BLOCK authresult %]
[% IF ( summary.summary ) %][% summary.summary %]:[% END %]
[% UNLESS ( summary.summaryonly ) %]
[% FOREACH authorize IN summary.authorized %]
<span class="authorizedheading">[% authorize.heading %]</span>
[% END %]
[% IF ( marcflavour == 'UNIMARC' ) %]
[% FOREACH note IN summary.notes %]
<span class="note">[% note %]</span>
[% END %]
[% FOREACH seefro IN summary.seefrom %]
[% PROCESS showreference heading=seefro.heading label="" type=seefro.type %]
[% 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 %]
</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 %]
</div>
[% END %]
[% END %]
[% END %]
[% END %]
[% END %]