Bug 21871: (QA follow-up) Use Koha.Preference in template
[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                         [% IF ( MARCURLS ) %]
113                             <div class="authstanza online_resources">
114                                 <span class="label">Online resources:</span>
115                                 <ul>
116                                     [% FOREACH MARCurl IN MARCURLS %]
117                                         <li>[% IF ( MARCurl.part ) %][% MARCurl.part | html %]<br />[% END %]
118                                             [% IF ( Koha.Preference('OPACURLOpenInNewWindow') ) %]
119                                                 <a href="[% MARCurl.MARCURL | url %]" title="[% MARCurl.MARCURL | html %]" target="_blank" rel="noreferrer">
120                                             [% ELSE %]
121                                                 <a href="[% MARCurl.MARCURL | url %]" title="[% MARCurl.MARCURL | html %]">
122                                             [% END %]
123                                             [% MARCurl.linktext | html %]</a>
124                                             [% IF ( MARCurl.notes ) %]
125                                                 <ul>
126                                                     [% FOREACH note IN MARCurl.notes %]
127                                                         <li>[% note.note | html %]</li>
128                                                     [% END %]
129                                                 </ul>
130                                             [% END %]
131                                         </li>
132                                     [% END # /FOREACH MARCURLS %]
133                                 </ul>
134                             </div>
135                         [% END # / IF MARCURLS %]
136
137                         <div id="authdescriptions" class="toptabs">
138                             <ul>
139                                 <li id="tab_descriptions"><a href="#descriptions">Notes</a></li>
140                             </ul>
141                             <div id="descriptions">
142                                 <div class="content_set">
143                                     [% FOREACH note IN summary.notes %]
144                                         <p class="note auth[% note.field | html %]">[% note.note | html %]</p>
145                                     [% END %]
146                                 </div>
147                             </div>
148                         </div>
149                     </div> <!-- / .#userauthdetails -->
150                 </div> <!-- / .span10/12 -->
151             </div> <!-- / .row-fluid -->
152         </div> <!-- / .container-fluid -->
153     </div> <!-- / .main -->
154
155 [% INCLUDE 'opac-bottom.inc' %]
156 [% BLOCK jsinclude %]
157 [% IF ( displayhierarchy ) %]
158     [% Asset.js("lib/jquery/plugins/jquery.jstree.js") | $raw %]
159 [% END %]
160 <script>
161     //<![CDATA[
162         $(document).ready(function() {
163             $('#authdescriptions').tabs();
164             [% IF ( displayhierarchy ) %]
165                 var current_nodes = [];
166                 $('.currentauth').each(function() {
167                     current_nodes.push('#' + $(this).parent().parents('li:first').attr('id'));
168                     });
169                 $('#hierarchies').jstree({
170                         "plugins": [ "themes", "html_data"],
171                         "themes": { "theme": "classic",
172                                     "icons": false },
173                         "core": { "initially_open": current_nodes }
174                     });
175             [% END %]
176         });
177     //]]>
178 </script>
179 [% END %]