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