Bug 10691: (follow-up) restore behaviour for control field ($w)
[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="label">
25         [% IF ( linkType=='seefrom' ) %]
26             used for/see from:
27         [% ELSIF  ( linkType=='seealso' ) %]
28             see also:
29         [% END %]
30         </span>
31         <span class="heading">
32         [% IF ( linkType=='seealso' ) %]
33             [% IF ( authid ) %]
34             <a href="[% authidurl | url %][% authid | url %]">[% heading | html %]</a>
35             [% ELSE %]
36             <a href="[% searchurl | url %][% heading | html %]">[% heading | html %]</a>
37             [% END %]
38         [% ELSE %]
39             [% heading | html %]
40         [% END %]
41         </span>
42         [% UNLESS ( type=='seefrom' || type=='seealso' ) %]
43         <span class="type">
44             [% SWITCH type %]
45             [% CASE 'earlier' %](Earlier heading)
46             [% CASE 'later' %](Later heading)
47             [% CASE 'acronym' %](Acronym)
48             [% CASE 'musical' %](Musical composition)
49             [% CASE 'broader' %](Broader heading)
50             [% CASE 'narrower' %](Narrower heading)
51             [% CASE 'parent' %](Immediate parent body)
52             [% CASE %][% IF type %]([% type | html %])
53             [% END %]
54         [% END %]
55         </span>
56         [% END %]
57     [% END %]
58 [% END %]
59 [% BLOCK authresult %]
60     [% IF ( summary.summary ) %][% summary.summary | html %]:[% END %]
61     [% UNLESS ( summary.summaryonly ) %]
62         <div class="authorizedheading">
63           [% FOREACH authorize IN summary.authorized %]
64             <span class="authorizedheading">[% authorize.heading | html %]</span>
65           [% END %]
66         </div>
67         [% IF ( marcflavour == 'UNIMARC' ) %]
68           [% IF summary.notes %]
69            <div class="authres_notes">
70            [% FOREACH note IN summary.notes %]
71              [% note.note | html %]</span>
72            [% END %]
73            </div>
74           [% END %]
75           [% IF summary.seefrom %]
76             <div class="authres_seefrom">
77             [% FOREACH see IN summary.seefrom %]
78               [% PROCESS showreference heading=see.heading linkType="" type=see.type search='' %]
79               [% IF ! loop.last %] ; [% END %]
80             [% END %]
81             </div>
82           [% END %]
83             [% IF summary.seealso %]
84               <div class="authres_seealso">
85               [% FOREACH see IN summary.seealso %]
86                  [% PROCESS showreference heading=see.heading linkType="" type=see.type search='' %]
87                  [% IF ! loop.last %] ; [% END %]
88               [% END %]
89               </div>
90             [% END %]
91             [% IF summary.otherscript %]
92               <div class="authres_otherscript">
93               [% FOREACH other IN summary.otherscript %]
94                 [% PROCESS language lang=other.lang | trim %]:
95                 [% other.term %]
96                 [% IF ! loop.last %] ; [% END %]
97               [% END %]
98               </div>
99             [% END %]
100         [% ELSE %]
101             [% IF ( summary.seefrom ) %]
102                 [% FOREACH seefro IN summary.seefrom %]
103                     <div class="seefrom authref">
104                     [% PROCESS showreference
105                         heading=seefro.heading
106                         linkType='seefrom'
107                         type=seefro.type
108                         authid=seefro.authid
109                     %]
110                     </div>
111                 [% END %]
112             [% END %]
113             [% IF ( summary.seealso ) %]
114                 [% FOREACH seeals IN summary.seealso %]
115                     <div class="seealso authref">
116                     [% PROCESS showreference
117                         heading=seeals.heading
118                         linkType='seealso'
119                         type=seeals.type
120                         authid=seeals.authid
121                     %]
122                     </div>
123                 [% END %]
124             [% END %]
125         [% END %]
126     [% END %]
127 [% END %]
128 [% BLOCK language %]
129   [% SWITCH lang %]
130    [% CASE ['en', 'eng'] %]English
131    [% CASE ['fr', 'fre'] %]French
132    [% CASE ['it', 'ita'] %]Italian
133    [% CASE ['de', 'ger', 'deu'] %]German
134    [% CASE ['es', 'spa'] %]Spanish
135    [% CASE ['heb'] %]Hebrew
136    [% CASE ['ara'] %]Arabic
137    [% CASE ['gre'] %]Greek (modern)
138    [% CASE ['grc'] %]Greek (to 1453)
139    [% CASE %][% lang %]
140   [% END %]
141 [% END %]