Bug 18762: Remove warnings from xt/author/valid-templates.t
[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"><abbr title="Broader Term">BT</abbr>: [% heading | html %]</span>
16         [% CASE 'narrower' %]
17             <span class="NT"><abbr title="Narrower Term">NT</abbr>: [% heading | html %]</span>
18         [% CASE 'seefrom' %]
19             <span class="UF"><abbr title="Used For">UF</abbr>: [% heading | html %]</span>
20         [% CASE 'seealso' %]
21             <span class="RT"><abbr title="Related Term">RT</abbr>: [% 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.label ) %][% summary.label | html %]:[% END %]
54     [% IF summary.summary %]
55       <div class="authority-summary">
56         [% summary.summary %]
57       </div>
58     [% END %]
59     [% UNLESS ( summary.summaryonly ) %]
60         <div class="authorizedheading">
61           [% FOREACH authorize IN summary.authorized %]
62             <span class="authorizedheading">[% authorize.heading | html %]</span>
63             [% UNLESS loop.last %] | [% END %]
64           [% END %]
65         </div>
66         [% IF ( marcflavour == 'UNIMARC' ) %]
67           [% IF summary.notes %]
68            <div class="authres_notes">
69            [% FOREACH note IN summary.notes %]
70              <span>[% note.note | html %]</span>
71            [% END %]
72            </div>
73           [% END %]
74           [% IF summary.seefrom %]
75             <div class="authres_seefrom">
76             [% FOREACH see IN summary.seefrom %]
77               [% PROCESS showreference heading=see.heading linkType="" type=see.type search='' %]
78               [% IF ! loop.last %] ; [% END %]
79             [% END %]
80             </div>
81           [% END %]
82             [% IF summary.seealso %]
83               <div class="authres_seealso">
84               [% FOREACH see IN summary.seealso %]
85                  [% PROCESS showreference heading=see.heading linkType="" type=see.type search='' %]
86                  [% IF ! loop.last %] ; [% END %]
87               [% END %]
88               </div>
89             [% END %]
90             [% IF summary.otherscript %]
91               <div class="authres_otherscript">
92               [% FOREACH other IN summary.otherscript %]
93                 [% PROCESS language lang=other.lang | trim %]:
94                 [% other.term %]
95                 [% IF ! loop.last %] ; [% END %]
96               [% END %]
97               </div>
98             [% END %]
99         [% ELSE %]
100             [% IF ( summary.seefrom.size >= 1 ) %]
101             <div class="seefrom">
102                 <span class="seefrom">used for/see from:</span>
103                 [% FOREACH seefro IN summary.seefrom %]
104                     <div class="authref">
105                     [% PROCESS showreference
106                         heading=seefro.heading
107                         linkType='seefrom'
108                         type=seefro.type
109                         authid=seefro.authid
110                     %]
111                     </div>
112                 [% END %]
113             </div>
114             [% END %]
115             [% IF ( summary.seealso.size >= 1 ) %]
116             <div class="seealso">
117                 <span class="seealso">see also:</span>
118                 [% FOREACH seeals IN summary.seealso %]
119                     <div class="authref">
120                     [% PROCESS showreference
121                         heading=seeals.heading
122                         linkType='seealso'
123                         type=seeals.type
124                         authid=seeals.authid
125                     %]
126                     </div>
127                 [% END %]
128             </div>
129             [% END %]
130         [% END %]
131     [% END %]
132 [% END %]
133 [% BLOCK language %]
134   [% SWITCH lang %]
135    [% CASE ['en', 'eng'] %]English
136    [% CASE ['fr', 'fre'] %]French
137    [% CASE ['it', 'ita'] %]Italian
138    [% CASE ['de', 'ger', 'deu'] %]German
139    [% CASE ['es', 'spa'] %]Spanish
140    [% CASE ['heb'] %]Hebrew
141    [% CASE ['ara'] %]Arabic
142    [% CASE ['gre'] %]Greek (modern)
143    [% CASE ['grc'] %]Greek (to 1453)
144    [% CASE %][% lang %]
145   [% END %]
146 [% END %]