Merge remote-tracking branch 'origin/new/bug_8623'
[koha.git] / koha-tmpl / opac-tmpl / prog / en / includes / opac-authorities.inc
1 [% BLOCK showhierarchy %]
2     [% FOREACH tree IN trees %]
3         [% PROCESS showtree tree = tree %]
4     [% END %]
5 [% END %]
6 [% BLOCK showtree %]
7     <ul class="hierarchy">
8         [% FOREACH node IN tree %]
9             <li id="hier[% node.authid %]" class="[% node.class %] authnode">
10             [% IF ( node.current_value ) %]
11                 <span class='currentauth'>[% node.value | html %]</span>
12             [% ELSE %]
13                 <a href="opac-authoritiesdetail.pl?authid=[% node.authid %]" title="Term">[% node.value | html %]</a>
14             [% END %]
15             [% IF ( node.children && node.children.size > 0 ) %]
16                 [% PROCESS showtree tree = node.children %]
17             [% END %]
18             </li>
19         [% END %]
20     </ul>
21 [% END %]
22
23 [% BLOCK authtypelabel %]
24     [% UNLESS ( type=='seefrom' || type=='seealso' || type=='' ) %]
25         <span class="type">[% FILTER trim %][% SWITCH type %]
26         [% CASE 'earlier' %]Earlier heading
27         [% CASE 'later' %]Later heading
28         [% CASE 'acronym' %]Acronym
29         [% CASE 'musical' %]Musical composition
30         [% CASE 'broader' %]Broader heading
31         [% CASE 'narrower' %]Narrower heading
32         [% CASE %][% type %]
33         [% END %][% END %]</span>
34     [% END %]
35 [% END %]
36 [% BLOCK otherscript %]
37     [% FOREACH heading IN headings %]
38         [% IF heading.category == wantcategory %]
39             [% IF heading.direction == 'ltr' %]
40                 <div class="heading otherscript [% heading.category %]">
41                 <span class="[% heading.category %]">[% heading.term %]</span>
42                 </div>
43             [% ELSIF heading.direction == 'rtl' %]
44                 <div class="heading otherscript [% heading.category %] rtl">
45                 <span class="[% heading.category %]">[% heading.term %]</span>
46                 </div>
47             [% END %]
48         [% END %]
49     [% END %]
50 [% END %]
51 [% BLOCK authheadingdisplay %]
52     [% IF authid %]<a href="/cgi-bin/koha/opac-authoritiesdetail.pl?authid=[% authid %]">[% heading %]</a>
53     [% ELSIF search %]<a href="/cgi-bin/koha/opac-authorities-home.pl?op=do_search&type=opac&operator=contains&marclist=mainentry&and_ora=and&orderby=HeadingAsc&value=[% search %]">[% heading %]</a>
54     [% ELSE %][% heading %]
55     [% END %]
56 [% END %]