Bug 21526: uri escape TT variables when used in 'a href'
[koha.git] / koha-tmpl / opac-tmpl / bootstrap / en / modules / opac-auth-detail.tt
1 [% USE raw %]
2 [% USE Asset %]
3 [% USE Koha %]
4 [% PROCESS 'opac-authorities.inc' %]
5 [% INCLUDE 'doc-head-open.inc' %]
6 <title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog &rsaquo; Authority search &rsaquo; [% summary.mainentry | html %][% IF authtypetext %] ([% authtypetext | html %])[% END %]</title>
7 [% INCLUDE 'doc-head-close.inc' %]
8 [% BLOCK cssinclude %][% END %]
9 </head>
10 [% INCLUDE 'bodytag.inc' bodyid='opac-authoritiesdetail' bodyclass='scrollto' %]
11 [% INCLUDE 'masthead.inc' %]
12
13     <div class="main">
14         <ul class="breadcrumb">
15             <li><a href="/cgi-bin/koha/opac-main.pl">Home</a> <span class="divider">&rsaquo;</span></li>
16             <li><a href="/cgi-bin/koha/opac-authorities-home.pl">Authority search</a> <span class="divider">&rsaquo;</span></li>
17             <li><a href="#">[% summary.mainentry | html %][% IF authtypetext %] ([% authtypetext | html %])[% END %]</a></li>
18         </ul>
19
20         <div class="container-fluid">
21             <div class="row-fluid">
22                 [% IF ( OpacNav || OpacNavBottom ) %]
23                     <div class="span2">
24                         <div id="navigation">
25                             [% INCLUDE 'navigation.inc' %]
26                         </div>
27                     </div>
28                     <div class="span10">
29                 [% ELSE %]
30                     <div class="span12">
31                 [% END %]
32                     <div id="userauthdetails" class="maincontent">
33                         <div id="views">
34                             <span class="view">
35                                 <span id="Normalview">Normal view</span>
36                             </span>
37                             <span class="view">
38                                 <a id="MARCview" href="/cgi-bin/koha/opac-authoritiesdetail.pl?authid=[% authid | html %]&amp;marc=1">MARC view</a>
39                             </span>
40                         </div>
41
42                         [% IF ( displayhierarchy ) %]
43                             <div id="hierarchies">
44                                 [% PROCESS showhierarchy trees = loophierarchies %]
45                             </div>
46                         [% END %]
47
48                         <h1>[% summary.mainentry | html %][% IF authtypetext %] ([% authtypetext | html %])[% END %]</h1>
49
50                         <div class="usedin">
51                             [% IF count %]<a href="/cgi-bin/koha/opac-search.pl?type=opac&amp;q=[% authid | uri %]&amp;idx=an,phr">Number of records used in: [% count | html %]</a>[% ELSE %]This authority is not used in any records.[% END %]
52                         </div>
53
54                         <div class="authstanza">
55                             [% FOREACH authorize IN summary.authorized %]
56                                 <div class="heading authorized auth[% seefro.field | html %]">
57                                     <span class="label">Preferred form: </span>
58                                     <span class="authorized">[% authorize.heading | html %]</span>
59                                 </div>
60                             [% END %]
61                             [% PROCESS otherscript headings=summary.otherscript wantcategory='preferred' %]
62                         </div>
63
64                         [% IF summary.seefrom.size %]
65                             <div class="authstanza seefrom">
66                                 <div class="authstanzaheading">Used for/see from:</div>
67                                 <ul class="seefrom">
68                                     [% FOREACH seefro IN summary.seefrom %]
69                                         <li class="heading seefrom auth[% seefro.field | html %]">
70                                             [% IF seefro.type && seefro.type != 'seefrom' %]
71                                                 <span class="label">[% PROCESS authtypelabel type=seefro.type | trim %]:</span>
72                                             [% END %]
73                                             <span class="seefrom">[% PROCESS authheadingdisplay heading=seefro.heading search=seefrosearch authid=seefro.authid %]</span>
74                                         </li>
75                                     [% END %]
76                                     [% PROCESS otherscript headings=summary.otherscript wantcategory='seefrom' %]
77                                 </ul>
78                             </div>
79                         [% END %]
80
81                         [% IF summary.seealso.size %]
82                             <div class="authstanza seealso">
83                                 <div class="authstanzaheading">See also:</div>
84                                 <ul class="seelso">
85                                     [% FOREACH seeals IN summary.seealso %]
86                                         <li class="heading seealso auth[% seeals.field | html %]">
87                                             [% IF seeals.type && seeals.type != 'seealso' %]
88                                                 <span class="label">[% PROCESS authtypelabel type=seeals.type | trim %]:</span>
89                                             [% END %]
90                                             <span class="seealso">[% PROCESS authheadingdisplay heading=seeals.heading search=seeals.search authid=seeals.authid %]</span>
91                                         </li>
92                                     [% END %]
93                                     [% PROCESS otherscript headings=summary.otherscript wantcategory='seealso' %]
94                                 </ul>
95                             </div>
96                         [% END %]
97
98                         [% IF marcflavour == 'UNIMARC' && summary.otherscript %]
99                             <div class="authstanza">
100                                 <div class="authstanzaheading">Other forms:</div>
101                                 <ul>
102                                     [% FOREACH otherscrip IN summary.otherscript %]
103                                         <li>
104                                             [% PROCESS language lang=otherscrip.lang | trim %]:
105                                             <span class="otherscript">[% otherscrip.term | html %]</span>
106                                         </li>
107                                     [% END %]
108                                 </ul>
109                             </div>
110                         [% END %]
111
112                         <div id="authdescriptions" class="toptabs">
113                             <ul>
114                                 <li id="tab_descriptions"><a href="#descriptions">Notes</a></li>
115                             </ul>
116                             <div id="descriptions">
117                                 <div class="content_set">
118                                     [% FOREACH note IN summary.notes %]
119                                         <p class="note auth[% note.field | html %]">[% note.note | html %]</p>
120                                     [% END %]
121                                 </div>
122                             </div>
123                         </div>
124                     </div> <!-- / .#userauthdetails -->
125                 </div> <!-- / .span10/12 -->
126             </div> <!-- / .row-fluid -->
127         </div> <!-- / .container-fluid -->
128     </div> <!-- / .main -->
129
130 [% INCLUDE 'opac-bottom.inc' %]
131 [% BLOCK jsinclude %]
132 [% IF ( displayhierarchy ) %]
133     [% Asset.js("lib/jquery/plugins/jquery.jstree.js") | $raw %]
134 [% END %]
135 <script>
136     //<![CDATA[
137         $(document).ready(function() {
138             $('#authdescriptions').tabs();
139             [% IF ( displayhierarchy ) %]
140                 var current_nodes = [];
141                 $('.currentauth').each(function() {
142                     current_nodes.push('#' + $(this).parent().parents('li:first').attr('id'));
143                     });
144                 $('#hierarchies').jstree({
145                         "plugins": [ "themes", "html_data"],
146                         "themes": { "theme": "classic",
147                                     "icons": false },
148                         "core": { "initially_open": current_nodes }
149                     });
150             [% END %]
151         });
152     //]]>
153 </script>
154 [% END %]