Bug 34791: Add links to HTML Customizations to CookieConsent preferences
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / authorities / detail.tt
1 [% USE raw %]
2 [% USE Koha %]
3 [% USE Asset %]
4 [% PROCESS 'i18n.inc' %]
5 [% SET footerjs = 1 %]
6 [% PROCESS 'authorities.inc' %]
7 [% INCLUDE 'doc-head-open.inc' %]
8 <title>[% FILTER collapse %]
9     [% IF ( unknownauthid ) %]
10         [% t("Unknown authority record") | html %]
11     [% ELSE %]
12         [% tx("Details for authority #{authid} ({authtypetext})", { authid = authid, authtypetext = authtypetext }) | html %]
13     [% END %] &rsaquo;
14     [% t("Authorities") | html %] &rsaquo;
15     [% t("Koha") | html %]
16 [% END %]</title>
17 [% INCLUDE 'doc-head-close.inc' %]
18 [% Asset.css("css/addbiblio.css") | $raw %]
19 [% IF ( displayhierarchy ) %]
20     [% Asset.css("lib/jquery/plugins/jstree/themes/default/style.min.css") | $raw %]
21 [% END %]
22 </head>
23
24 <body id="auth_detail" class="auth">
25 [% WRAPPER 'header.inc' %]
26     [% INCLUDE 'authorities-search.inc' %]
27 [% END %]
28
29 [% WRAPPER 'sub-header.inc' %]
30     [% WRAPPER breadcrumbs %]
31         [% WRAPPER breadcrumb_item %]
32             <a href="/cgi-bin/koha/authorities/authorities-home.pl">Authorities</a>
33         [% END %]
34
35         [% WRAPPER breadcrumb_item bc_active= 1 %]
36             [% IF ( unknownauthid ) %]
37                 <span>Unknown authority record</span>
38             [% ELSE %]
39                 <span>Details for authority #[% authid | html %] ([% authtypetext | html %])</span>
40             [% END %]
41         [% END %]
42     [% END #/ WRAPPER breadcrumbs %]
43 [% END #/ WRAPPER sub-header.inc %]
44
45 <div class="main container-fluid">
46     <div class="row">
47         <div class="col-md-8 col-md-offset-2">
48
49             [% INCLUDE 'authorities-toolbar.inc' %]
50
51             [% IF ( displayhierarchy ) %]
52                 <div id="hierarchies">
53                     [% PROCESS showhierarchy trees = loophierarchies %]
54                 </div>
55             [% END %]
56
57
58             [% IF ( unknownauthid ) %]
59                 <h1>Authority does not exist</h1>
60                 <div class="dialog message">The authority record you requested does not exist ([% errauthid | html %]).</div>
61             [% ELSE %]
62
63                 <h1>Authority #[% authid | html %] ([% authtypetext | html %])</h1>
64
65                 <div id="action">
66                     [% IF count %]
67                         Used in <a href="/cgi-bin/koha/catalogue/search.pl?type=intranet&amp;op=do_search&amp;q=an:[% authid | uri %]">[% count | html %] record(s)</a>
68                     [% ELSE %]
69                         This authority is not used in any records.
70                     [% END %]
71                 </div>
72
73                 [% WRAPPER tabs id= "authoritiestabs" %]
74                     [% WRAPPER tabs_nav %]
75                         [% FOREACH BIG_LOO IN BIG_LOOP %]
76                             [% WRAPPER tab_item tabname= "tab${ BIG_LOO.number }XX" %]
77                                 [% BIG_LOO.number | html %]
78                             [% END %]
79                         [% END %]
80                     [% END # /WRAPPER tabs_nav %]
81
82                     [% WRAPPER tab_panels %]
83                         [% FOREACH BIG_LOO IN BIG_LOOP %]
84                             [% WRAPPER tab_panel tabname="tab${ BIG_LOO.number }XX" %]
85                                 [% FOREACH innerloo IN BIG_LOO.innerloop %]
86                                     [% IF ( innerloo.tag_number ) %]
87                                         <div class="tag">
88                                             <div class="tag_title">
89                                                 <span class="tag_num marc_field">[% innerloo.tag_number | html %]</span>
90                                                 [% IF (innerloo.defined("ind1") ) %]
91                                                     <span class="tag_ind1">[% innerloo.ind1 | html %]</span><span class="tag_ind2">[% innerloo.ind2 | html %]</span>
92                                                 [% END %]
93                                                 [% IF (innerloo.tag_desc) %]
94                                                     <span class="dashwrapper"> -</span> <span class="tag_desc marc_field">[% innerloo.tag_desc | html %]</span>
95                                                 [% END %]
96                                             </div> <!-- /.tag_title -->
97                                     [% ELSE %]
98                                         <div class="tag">
99                                     [% END # /IF ( innerloo.tag_number ) %]
100
101                                         [% FOREACH subfiel IN innerloo.subfield %]
102                                             <div class="auth_subfield">
103                                                 <div class="subfield_info marc_field">
104                                                     [% UNLESS ( subfiel.hide_marc ) %]
105                                                         <span class="marc_subfield">[% subfiel.marc_subfield | html %]</span>
106                                                     [% END %]
107                                                     <span class="marc_subfield_desc">[% subfiel.long_desc | html %]</span>
108                                                 </div> <!-- /.subfield_info.marc_field -->
109                                                 <div class="subfield_content marc_field">
110                                                     <span class="subfield_value">
111                                                         [% IF ( subfiel.is_url ) %]
112                                                             <a href="[% subfiel.marc_value | url %]">[% subfiel.marc_value | html %]</a>
113                                                         [% ELSE %]
114                                                             [% subfiel.marc_value | html %]
115                                                         [% END %]
116                                                     </span>
117                                                 </div> <!-- /.subfield_content.marc_field -->
118                                             </div> <!-- /.auth_subfield -->
119                                         [% END #/FOREACH subfiel %]
120                                     </div> <!-- /.tag -->
121                                 [% END # /FOREACH innerloo %]
122                             [% END # /tab_panel#tab${ BIG_LOO.number }XX  %]
123                         [% END # /FOREACH BIG_LOO %]
124                     [% END # /WRAPPER tab_panels %]
125                 [% END # /WRAPPER tabs %]
126
127             [% END # /IF ( unknownauthid ) %]
128         </div> <!-- /.col-md-8 col-md-offset-2 -->
129     </div> <!-- /.row -->
130
131 [% MACRO jsinclude BLOCK %]
132     [% INCLUDE 'authorities_js.inc' %]
133     [% IF ( displayhierarchy ) %]
134         [% Asset.js("lib/jquery/plugins/jstree/jstree-3.3.12.min.js") | $raw %]
135     [% END %]
136     <script>
137         $(document).ready(function() {
138             if( $("#authoritiestabs .tab-pane.active").length < 1 ){
139                 let tab_object = [];
140
141                 [% SET DefaultAuthorityTab = Koha.Preference('DefaultAuthorityTab') %]
142                 [% IF DefaultAuthorityTab %]
143                     tab_object = $("#authoritiestabs #tab[% DefaultAuthorityTab | html %]XX-tab");
144                 [% END %]
145
146                 if( tab_object.length > 0 ){
147                     tab_object.tab("show");
148                 } else {
149                     $("#authoritiestabs a:first").tab("show");
150                 }
151             }
152
153             var editAuth = $("#editAuth");
154             var editAuthLink = editAuth.attr("href");
155
156             $("a[data-toggle='tab']").on("shown.bs.tab", function (e) {
157                 var newTabId = $(this).attr("href");
158                 editAuth.attr("href", editAuthLink + newTabId );
159             });
160
161             [% IF ( displayhierarchy ) %]
162                 $('#hierarchies').jstree({
163                     "types" : {
164                         "default" : {
165                             "icon" : "fa-solid fa-file"
166                         }
167                     },
168                     "plugins" : [ "types" ]
169                 }).on('ready.jstree', function(){
170                     $(this).jstree('open_all');
171                     $("#hier"+[% authid | html %]+"_anchor").on("click",
172                         function(e){e.preventDefault(); return false;}
173                     ).css("text-decoration", "none").css("color", "#333");
174                     $(".currentauth").css("text-decoration", "none").css("color", "#333");
175                 }).bind("select_node.jstree", function (e, data) {
176                     e.preventDefault();
177                     document.location.href = data.node.a_attr.href;
178                 });
179             [% END # /IF ( displayhierarchy ) %]
180          });
181     </script>
182 [% END %]
183
184 [% INCLUDE 'intranet-bottom.inc' %]