Bug 21871: Show authority 856 links in the OPAC
[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
119                                         [% IF ( OPACURLOpenInNewWindow ) %]
120                                             [% IF trackclicks == 'track' || trackclicks == 'anonymous' %]
121                                                 <a href="/cgi-bin/koha/tracklinks.pl?uri=[% MARCurl.MARCURL | uri %]&amp;biblionumber=[% biblio.biblionumber | uri %]" title="[% MARCurl.MARCURL | html %]" target="_blank" rel="noreferrer">
122                                             [% ELSE %]
123                                                 <a href="[% MARCurl.MARCURL | url %]" title="[% MARCurl.MARCURL | html %]" target="_blank" rel="noreferrer">
124                                             [% END %]
125                                         [% ELSE %]
126                                             [% IF trackclicks == 'track' || trackclicks == 'anonymous' %]
127                                                 <a href="/cgi-bin/koha/tracklinks.pl?uri=[% MARCurl.MARCURL | uri %]&amp;biblionumber=[% biblio.biblionumber | uri %]" title="[% MARCurl.MARCURL | html %]">
128                                             [% ELSE %]
129                                                 <a href="[% MARCurl.MARCURL | url %]" title="[% MARCurl.MARCURL | html %]">
130                                             [% END %]
131                                         [% END %]
132                                         [% MARCurl.linktext | html %]</a>
133                                             [% IF ( MARCurl.notes ) %]
134                                                 <ul>
135                                                     [% FOREACH note IN MARCurl.notes %]
136                                                         <li>[% note.note | html %]</li>
137                                                     [% END %]
138                                                 </ul>
139                                             [% END %]
140                                         </li>
141                                     [% END # /FOREACH MARCURLS %]
142                                 </ul>
143                             </div>
144                         [% END # / IF MARCURLS %]
145
146                         <div id="authdescriptions" class="toptabs">
147                             <ul>
148                                 <li id="tab_descriptions"><a href="#descriptions">Notes</a></li>
149                             </ul>
150                             <div id="descriptions">
151                                 <div class="content_set">
152                                     [% FOREACH note IN summary.notes %]
153                                         <p class="note auth[% note.field | html %]">[% note.note | html %]</p>
154                                     [% END %]
155                                 </div>
156                             </div>
157                         </div>
158                     </div> <!-- / .#userauthdetails -->
159                 </div> <!-- / .span10/12 -->
160             </div> <!-- / .row-fluid -->
161         </div> <!-- / .container-fluid -->
162     </div> <!-- / .main -->
163
164 [% INCLUDE 'opac-bottom.inc' %]
165 [% BLOCK jsinclude %]
166 [% IF ( displayhierarchy ) %]
167     [% Asset.js("lib/jquery/plugins/jquery.jstree.js") | $raw %]
168 [% END %]
169 <script>
170     //<![CDATA[
171         $(document).ready(function() {
172             $('#authdescriptions').tabs();
173             [% IF ( displayhierarchy ) %]
174                 var current_nodes = [];
175                 $('.currentauth').each(function() {
176                     current_nodes.push('#' + $(this).parent().parents('li:first').attr('id'));
177                     });
178                 $('#hierarchies').jstree({
179                         "plugins": [ "themes", "html_data"],
180                         "themes": { "theme": "classic",
181                                     "icons": false },
182                         "core": { "initially_open": current_nodes }
183                     });
184             [% END %]
185         });
186     //]]>
187 </script>
188 [% END %]