Bug 11873: (QA follow-up) Add missing TT filters
[koha.git] / koha-tmpl / opac-tmpl / bootstrap / en / modules / opac-auth-detail.tt
1 [% USE raw %]
2 [% USE Asset %]
3 [% USE Koha %]
4 [% USE AdditionalContents %]
5 [% PROCESS 'opac-authorities.inc' %]
6 [% SET OpacNav = AdditionalContents.get( location => "OpacNav", lang => lang, library => logged_in_user.branchcode, blocktitle => 0 ) %]
7 [% SET OpacNavBottom = AdditionalContents.get( location => "OpacNavBottom", lang => lang, library => logged_in_user.branchcode, blocktitle => 0 ) %]
8 [% INCLUDE 'doc-head-open.inc' %]
9 <title>[% summary.mainentry | html %][% IF authtypetext %] ([% authtypetext | html %])[% END %] &rsaquo; Authority search &rsaquo; [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog</title>
10 [% INCLUDE 'doc-head-close.inc' %]
11 [% BLOCK cssinclude %]
12     [% IF ( displayhierarchy ) %]
13         [% Asset.css("lib/jquery/plugins/jstree/themes/default/style.min.css") | $raw %]
14     [% END %]
15 [% END %]
16 [%# FIXME authid is modified when passed authheadingdisplay %]
17 [%# It's then wrong in the JS %]
18 [% SET original_authid = authid %]
19 </head>
20 [% INCLUDE 'bodytag.inc' bodyid='opac-authoritiesdetail' bodyclass='scrollto' %]
21 [% INCLUDE 'masthead.inc' %]
22
23     <div class="main">
24         <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumbs">
25             <ol class="breadcrumb">
26                 <li class="breadcrumb-item">
27                     <a href="/cgi-bin/koha/opac-main.pl">Home</a>
28                 </li>
29                 <li class="breadcrumb-item">
30                     <a href="/cgi-bin/koha/opac-authorities-home.pl">Authority search</a>
31                 </li>
32                 <li class="breadcrumb-item active">
33                     <a href="#" aria-current="page">[% summary.mainentry | html %][% IF authtypetext %] ([% authtypetext | html %])[% END %]</a>
34                 </li>
35             </ol>
36         </nav> <!-- /#breadcrumbs -->
37
38         <div class="container-fluid">
39             <div class="row">
40                 [% IF ( OpacNav || OpacNavBottom ) %]
41                     <div class="col col-lg-2 order-2 order-lg-1">
42                         <div id="navigation">
43                             [% INCLUDE 'navigation.inc' %]
44                         </div>
45                     </div>
46                     <div class="col-lg-10 order-first order-md-first order-lg-2">
47                 [% ELSE %]
48                     <div class="col order-first order-md-first order-lg-2">
49                 [% END %]
50                     <div id="userauthdetails" class="maincontent">
51                         <div id="views">
52                             <span class="view">
53                                 <span id="Normalview">Normal view</span>
54                             </span>
55                             <span class="view">
56                                 <a id="MARCview" href="/cgi-bin/koha/opac-authoritiesdetail.pl?authid=[% authid | html %]&amp;marc=1">MARC view</a>
57                             </span>
58                         </div>
59
60                         [% IF ( displayhierarchy ) %]
61                             <div id="hierarchies">
62                                 [% PROCESS showhierarchy trees = loophierarchies %]
63                             </div>
64                         [% END %]
65
66                         <h1>[% summary.mainentry | html %][% IF authtypetext %] ([% authtypetext | html %])[% END %]</h1>
67
68                         <div class="usedin">
69                             [% 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 %]
70                         </div>
71
72                         <div class="authstanza">
73                             [% FOREACH authorize IN summary.authorized %]
74                                 <div class="heading authorized auth[% seefro.field | html %]">
75                                     <span class="label">Preferred form: </span>
76                                     <span class="authorized">[% authorize.heading | html %]</span>
77                                 </div>
78                             [% END %]
79                             [% PROCESS otherscript headings=summary.otherscript wantcategory='preferred' %]
80                         </div>
81
82                         [% IF summary.seefrom.size %]
83                             <div class="authstanza seefrom">
84                                 <div class="authstanzaheading">Used for/see from:</div>
85                                 <ul class="seefrom">
86                                     [% FOREACH seefro IN summary.seefrom %]
87                                         <li class="heading seefrom auth[% seefro.field | html %]">
88                                             [% IF seefro.type && seefro.type != 'seefrom' %]
89                                                 <span class="label">[% PROCESS authtypelabel type=seefro.type | trim %]:</span>
90                                             [% END %]
91                                             <span class="seefrom">[% PROCESS authheadingdisplay heading=seefro.heading search=seefrosearch authid=seefro.authid %]</span>
92                                         </li>
93                                     [% END %]
94                                     [% PROCESS otherscript headings=summary.otherscript wantcategory='seefrom' %]
95                                 </ul>
96                             </div>
97                         [% END %]
98
99                         [% IF summary.seealso.size %]
100                             <div class="authstanza seealso">
101                                 <div class="authstanzaheading">See also:</div>
102                                 <ul class="seelso">
103                                     [% FOREACH seeals IN summary.seealso %]
104                                         <li class="heading seealso auth[% seeals.field | html %]">
105                                             [% IF seeals.type && seeals.type != 'seealso' %]
106                                                 <span class="label">[% PROCESS authtypelabel type=seeals.type | trim %]:</span>
107                                             [% END %]
108                                             <span class="seealso">[% PROCESS authheadingdisplay heading=seeals.heading search=seeals.search authid=seeals.authid %]</span>
109                                         </li>
110                                     [% END %]
111                                     [% PROCESS otherscript headings=summary.otherscript wantcategory='seealso' %]
112                                 </ul>
113                             </div>
114                         [% END %]
115
116                         [% IF marcflavour == 'UNIMARC' && summary.otherscript %]
117                             <div class="authstanza">
118                                 <div class="authstanzaheading">Other forms:</div>
119                                 <ul>
120                                     [% FOREACH otherscrip IN summary.otherscript %]
121                                         <li>
122                                             [% PROCESS language lang=otherscrip.lang | trim %]:
123                                             <span class="otherscript">[% otherscrip.term | html %]</span>
124                                         </li>
125                                     [% END %]
126                                 </ul>
127                             </div>
128                         [% END %]
129
130                         [% IF ( MARCURLS ) %]
131                             <div class="authstanza online_resources">
132                                 <span class="label">Online resources:</span>
133                                 <ul>
134                                     [% FOREACH MARCurl IN MARCURLS %]
135                                         <li>[% IF ( MARCurl.part ) %][% MARCurl.part | html %]<br />[% END %]
136                                             [% IF ( Koha.Preference('OPACURLOpenInNewWindow') ) %]
137                                                 <a href="[% MARCurl.MARCURL | url %]" title="[% MARCurl.MARCURL | html %]" target="_blank" rel="noreferrer">
138                                             [% ELSE %]
139                                                 <a href="[% MARCurl.MARCURL | url %]" title="[% MARCurl.MARCURL | html %]">
140                                             [% END %]
141                                             [% MARCurl.linktext | html %]</a>
142                                             [% IF ( MARCurl.notes ) %]
143                                                 <ul>
144                                                     [% FOREACH note IN MARCurl.notes %]
145                                                         <li>[% note.note | html %]</li>
146                                                     [% END %]
147                                                 </ul>
148                                             [% END %]
149                                         </li>
150                                     [% END # /FOREACH MARCURLS %]
151                                 </ul>
152                             </div>
153                         [% END # / IF MARCURLS %]
154
155                         <div id="authdescriptions" class="toptabs">
156                             <ul>
157                                 <li id="tab_descriptions"><a href="#descriptions">Notes</a></li>
158                             </ul>
159                             <div id="descriptions">
160                                 <div class="content_set">
161                                     [% FOREACH note IN summary.notes %]
162                                         <p class="note auth[% note.field | html %]">[% note.note | html %]</p>
163                                     [% END %]
164                                 </div>
165                             </div>
166                         </div>
167                     </div> <!-- / .#userauthdetails -->
168                 </div> <!-- / .col-lg-10/12 -->
169             </div> <!-- / .row -->
170         </div> <!-- / .container-fluid -->
171     </div> <!-- / .main -->
172
173 [% INCLUDE 'opac-bottom.inc' %]
174 [% BLOCK jsinclude %]
175 [% IF ( displayhierarchy ) %]
176     [% Asset.js("lib/jquery/plugins/jstree/jstree-3.3.12.min.js") | $raw %]
177 [% END %]
178 <script>
179     $(document).ready(function() {
180         $('#authdescriptions').tabs();
181         [% IF ( displayhierarchy ) %]
182             $('#hierarchies').jstree({
183                 "types" : {
184                     "default" : {
185                         "icon" : "fa fa-file-o"
186                     }
187                 },
188                 "plugins" : [ "types" ]
189             }).on('ready.jstree', function(){
190                 $(this).jstree('open_all');
191                 $("#hier"+[% original_authid | html %]+"_anchor").on("click",
192                     function(e){e.preventDefault(); return false;}
193                 ).css("text-decoration", "none").css("color", "#333");
194                 $(".currentauth").css("text-decoration", "none").css("color", "#333");
195             }).bind("select_node.jstree", function (e, data) {
196                 e.preventDefault();
197                 document.location.href = data.node.a_attr.href;
198             });
199         [% END %]
200     });
201 </script>
202 [% END %]