Bug 12060: remove extraneous tags from header.inc
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / includes / authorities-search-results.inc
1 [% BLOCK showreference %]
2 [%#
3     Parameters:
4     heading: the heading itself
5     linkType: currently 'seefrom' or 'seealso', controls the label for the entry
6     type:
7     authid: if it is a linked authority, its authid
8 %]
9     [% SET authidurl = '/cgi-bin/koha/authorities/detail.pl?authid=' %]
10     [% SET searchurl = '/cgi-bin/koha/authorities/authorities-home.pl?op=do_search&type=intranet&marclist=any&operator=contains&orderby=HeadingAsc&value=' %]
11
12     [% IF marcflavour == 'UNIMARC' %]
13         [% SWITCH type %]
14         [% CASE 'broader' %]
15             <span class="BT">BT: [% heading | html %]</span>
16         [% CASE 'narrower' %]
17             <span class="NT">NT: [% heading | html %]</span>
18         [% CASE 'seefrom' %]
19             <span class="UF">UF: [% heading | html %]</span>
20         [% CASE 'seealso' %]
21             <span class="RT">RT: [% heading | html %]</span>
22         [% END %]
23     [% ELSE %]
24         <span class="heading">
25         [% IF ( linkType=='seealso' ) %]
26             [% IF ( authid ) %]
27             <a href="[% authidurl | url %][% authid | url %]">[% heading | html %]</a>
28             [% ELSE %]
29             <a href="[% searchurl | url %][% heading | html %]">[% heading | html %]</a>
30             [% END %]
31         [% ELSE %]
32             [% heading | html %]
33         [% END %]
34         </span>
35         [% UNLESS ( type=='seefrom' || type=='seealso' ) %]
36         <span class="type">
37             [% SWITCH type %]
38             [% CASE 'earlier' %](Earlier heading)
39             [% CASE 'later' %](Later heading)
40             [% CASE 'acronym' %](Acronym)
41             [% CASE 'musical' %](Musical composition)
42             [% CASE 'broader' %](Broader heading)
43             [% CASE 'narrower' %](Narrower heading)
44             [% CASE 'parent' %](Immediate parent body)
45             [% CASE %][% IF type %]([% type | html %])
46             [% END %]
47         [% END %]
48         </span>
49         [% END %]
50     [% END %]
51 [% END %]
52 [% BLOCK authresult %]
53     [% IF ( summary.summary ) %][% summary.summary | html %]:[% END %]
54     [% UNLESS ( summary.summaryonly ) %]
55         <div class="authorizedheading">
56           [% FOREACH authorize IN summary.authorized %]
57             <span class="authorizedheading">[% authorize.heading | html %]</span>
58           [% END %]
59         </div>
60         [% IF ( marcflavour == 'UNIMARC' ) %]
61           [% IF summary.notes %]
62            <div class="authres_notes">
63            [% FOREACH note IN summary.notes %]
64              [% note.note | html %]</span>
65            [% END %]
66            </div>
67           [% END %]
68           [% IF summary.seefrom %]
69             <div class="authres_seefrom">
70             [% FOREACH see IN summary.seefrom %]
71               [% PROCESS showreference heading=see.heading linkType="" type=see.type search='' %]
72               [% IF ! loop.last %] ; [% END %]
73             [% END %]
74             </div>
75           [% END %]
76             [% IF summary.seealso %]
77               <div class="authres_seealso">
78               [% FOREACH see IN summary.seealso %]
79                  [% PROCESS showreference heading=see.heading linkType="" type=see.type search='' %]
80                  [% IF ! loop.last %] ; [% END %]
81               [% END %]
82               </div>
83             [% END %]
84             [% IF summary.otherscript %]
85               <div class="authres_otherscript">
86               [% FOREACH other IN summary.otherscript %]
87                 [% PROCESS language lang=other.lang | trim %]:
88                 [% other.term %]
89                 [% IF ! loop.last %] ; [% END %]
90               [% END %]
91               </div>
92             [% END %]
93         [% ELSE %]
94             [% IF ( summary.seefrom.size >= 1 ) %]
95             <div class="seefrom">
96                 <span class="seefrom">used for/see from:</span>
97                 [% FOREACH seefro IN summary.seefrom %]
98                     <div class="authref">
99                     [% PROCESS showreference
100                         heading=seefro.heading
101                         linkType='seefrom'
102                         type=seefro.type
103                         authid=seefro.authid
104                     %]
105                     </div>
106                 [% END %]
107             </div>
108             [% END %]
109             [% IF ( summary.seealso.size >= 1 ) %]
110             <div class="seealso">
111                 <span class="seealso">see also:</span>
112                 [% FOREACH seeals IN summary.seealso %]
113                     <div class="authref">
114                     [% PROCESS showreference
115                         heading=seeals.heading
116                         linkType='seealso'
117                         type=seeals.type
118                         authid=seeals.authid
119                     %]
120                     </div>
121                 [% END %]
122             </div>
123             [% END %]
124         [% END %]
125     [% END %]
126 [% END %]
127 [% BLOCK language %]
128   [% SWITCH lang %]
129    [% CASE ['en', 'eng'] %]English
130    [% CASE ['fr', 'fre'] %]French
131    [% CASE ['it', 'ita'] %]Italian
132    [% CASE ['de', 'ger', 'deu'] %]German
133    [% CASE ['es', 'spa'] %]Spanish
134    [% CASE ['heb'] %]Hebrew
135    [% CASE ['ara'] %]Arabic
136    [% CASE ['gre'] %]Greek (modern)
137    [% CASE ['grc'] %]Greek (to 1453)
138    [% CASE %][% lang %]
139   [% END %]
140 [% END %]