Bug 28955: (follow-up) Set to fall back
[koha.git] / koha-tmpl / opac-tmpl / bootstrap / en / modules / opac-auth-MARCdetail.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 || default_branch, blocktitle => 0 ) %]
7 [% SET OpacNavBottom = AdditionalContents.get( location => "OpacNavBottom", lang => lang, library => logged_in_user.branchcode || default_branch, blocktitle => 0 ) %]
8 [% INCLUDE 'doc-head-open.inc' %]
9 <title>Entry [% authtypetext | html %] &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">Entry [% authtypetext | html %]</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-lg-2">
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="userauthMARCdetails" class="maincontent">
48                         <div id="views">
49                             <span class="view">
50                                 <a id="Normalview" href="/cgi-bin/koha/opac-authoritiesdetail.pl?authid=[% authid | html %]">Normal view</a>
51                             </span>
52                             <span class="view">
53                                 <span id="MARCview">MARC view</span>
54                             </span>
55                         </div>
56
57                         [% IF ( displayhierarchy ) %]
58                             <div id="hierarchies">
59                                 [% PROCESS showhierarchy trees = loophierarchies marc = 1 %]
60                             </div>
61                         [% END %]
62
63                         <h1>Entry [% authtypetext | html %]</h1>
64                         <p><a href="opac-search.pl?type=opac&amp;q=[% authid | uri %]&amp;idx=an,phr">Number of records used in: [% count | html %]</a></p>
65                             [% FOREACH Tag0X IN Tab0XX %]
66                                 <p><strong>[% Tag0X.tag | html %]</strong></p>
67                                 <ul>
68                                 [% FOREACH subfiel IN Tag0X.subfield %]
69                                     <li><strong>[% subfiel.marc_lib | $raw %]:</strong>
70                                     [% IF subfiel.isurl %]<a href="[% subfiel.marc_value | url %]">[% subfiel.marc_value | html %]</a>
71                                     [% ELSE %][% subfiel.marc_value | html %][% END %]</li>
72                                 [% END %]
73                                 </ul>
74                             [% END %]
75                     </div> <!-- / #userauthMARCdetails -->
76                 </div> <!-- / .col-lg-10/12 -->
77             </div> <!-- / .row -->
78         </div> <!-- / .container-fluid -->
79     </div> <!-- / .main -->
80
81 [% INCLUDE 'opac-bottom.inc' %]
82 [% BLOCK jsinclude %]
83     [% Asset.js("lib/jquery/plugins/jstree/jstree-3.3.12.min.js") | $raw %]
84     <script>
85         $(document).ready(function() {
86             [% IF ( displayhierarchy ) %]
87                 $('#hierarchies').jstree({
88                     "types" : {
89                         "default" : {
90                             "icon" : "fa fa-file-o"
91                         }
92                     },
93                     "plugins" : [ "types" ]
94                 }).on('ready.jstree', function(){
95                     $(this).jstree('open_all')
96                     $("#hier"+[% authid | html %]+"_anchor").on("click",
97                         function(e){e.preventDefault(); return false;}
98                     ).css("text-decoration", "none").css("color", "#333");
99                     $(".currentauth").css("text-decoration", "none").css("color", "#333");
100                 }).bind("select_node.jstree", function (e, data) {
101                     e.preventDefault();
102                     document.location.href = data.node.a_attr.href;
103                 });
104             [% END %]
105         });
106     </script>
107 [% END %]