[% BLOCK showreference %]
[%# Parameters: %]
[%# heading: the heading itself %]
[%# linkType: currently 'seefrom' or 'seealso', controls the label for the entry type: %]
[%# authid: if it is a linked authority, its authid %]
[% SET authidurl = '/cgi-bin/koha/authorities/detail.pl?authid=' %]
[% SET searchurl = '/cgi-bin/koha/authorities/authorities-home.pl?op=do_search&type=intranet&marclist=any&operator=contains&orderby=HeadingAsc&value=' %]
[% IF marcflavour == 'UNIMARC' %]
[% SWITCH type %]
[% CASE 'broader' %]
BT: [% heading | html %]
[% CASE 'narrower' %]
NT: [% heading | html %]
[% CASE 'seefrom' %]
UF: [% heading | html %]
[% CASE 'seealso' %]
RT: [% heading | html %]
[% END %]
[% ELSE %]
[% IF ( linkType=='seealso' ) %]
[% IF ( authid ) %]
[% heading | html %]
[% ELSE %]
[% heading | html %]
[% END %]
[% ELSE %]
[% heading | html %]
[% END %]
[% UNLESS ( type=='seefrom' || type=='seealso' ) %]
[% 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 %][% IF type %]([% type | html %])
[% END %]
[% END %]
[% END %]
[% END %]
[% END %]
[% BLOCK authresult %]
[% IF ( summary.label ) %][% summary.label | html %]:[% END %]
[% IF summary.summary %]
[% summary.summary %]
[% END %]
[% UNLESS ( summary.summaryonly ) %]
[% FOREACH authorize IN summary.authorized %]
[% authorize.heading | html %]
[% UNLESS loop.last %] | [% END %]
[% END %]
[% IF ( marcflavour == 'UNIMARC' ) %]
[% IF summary.notes %]
[% FOREACH note IN summary.notes %]
[% note.note | html %]
[% END %]
[% END %]
[% IF summary.seefrom %]
[% FOREACH see IN summary.seefrom %]
[% PROCESS showreference heading=see.heading linkType="" type=see.type search='' %]
[% IF ! loop.last %] ; [% END %]
[% END %]
[% END %]
[% IF summary.seealso %]
[% FOREACH see IN summary.seealso %]
[% PROCESS showreference heading=see.heading linkType="" type=see.type search='' %]
[% IF ! loop.last %] ; [% END %]
[% END %]
[% END %]
[% IF summary.otherscript %]
[% FOREACH other IN summary.otherscript %]
[% PROCESS language lang=other.lang | trim %]:
[% other.term %]
[% IF ! loop.last %] ; [% END %]
[% END %]
[% END %]
[% ELSE %]
[% IF ( summary.seefrom.size >= 1 ) %]
used for/see from:
[% FOREACH seefro IN summary.seefrom %]
[%# Following on one line for translatability %]
[% PROCESS showreference heading=seefro.heading linkType='seefrom' type=seefro.type authid=seefro.authid %]
[% END %]
[% END %]
[% IF ( summary.seealso.size >= 1 ) %]
see also:
[% FOREACH seeals IN summary.seealso %]
[%# Following on one line for translatability %]
[% PROCESS showreference heading=seeals.heading linkType='seealso' type=seeals.type authid=seeals.authid %]
[% END %]
[% END %]
[% END %]
[% END %]
[% END %]
[% BLOCK language %]
[% SWITCH lang %]
[% CASE ['en', 'eng'] %]English
[% CASE ['fr', 'fre'] %]French
[% CASE ['it', 'ita'] %]Italian
[% CASE ['de', 'ger', 'deu'] %]German
[% CASE ['es', 'spa'] %]Spanish
[% CASE ['heb'] %]Hebrew
[% CASE ['ara'] %]Arabic
[% CASE ['gre'] %]Greek (modern)
[% CASE ['grc'] %]Greek (to 1453)
[% CASE %][% lang %]
[% END %]
[% END %]