Bug 34478: Manual fix - account payout
[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             [% INCLUDE 'messages.inc' %]
49
50             [% INCLUDE 'authorities-toolbar.inc' %]
51
52             [% IF ( displayhierarchy ) %]
53                 <div id="hierarchies">
54                     [% PROCESS showhierarchy trees = loophierarchies %]
55                 </div>
56             [% END %]
57
58
59             [% IF ( unknownauthid ) %]
60                 <h1>Authority does not exist</h1>
61                 <div class="dialog message">The authority record you requested does not exist ([% errauthid | html %]).</div>
62             [% ELSE %]
63
64                 <h1>Authority #[% authid | html %] ([% authtypetext | html %])</h1>
65
66                 <div id="action">
67                     [% IF count %]
68                         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>
69                     [% ELSE %]
70                         This authority is not used in any records.
71                     [% END %]
72                 </div>
73
74                 [% WRAPPER tabs id= "authoritiestabs" %]
75                     [% WRAPPER tabs_nav %]
76                         [% FOREACH BIG_LOO IN BIG_LOOP %]
77                             [% WRAPPER tab_item tabname= "tab${ BIG_LOO.number }XX" %]
78                                 [% BIG_LOO.number | html %]
79                             [% END %]
80                         [% END %]
81                     [% END # /WRAPPER tabs_nav %]
82
83                     [% WRAPPER tab_panels %]
84                         [% FOREACH BIG_LOO IN BIG_LOOP %]
85                             [% WRAPPER tab_panel tabname="tab${ BIG_LOO.number }XX" %]
86                                 [% FOREACH innerloo IN BIG_LOO.innerloop %]
87                                     [% IF ( innerloo.tag_number ) %]
88                                         <div class="tag">
89                                             <div class="tag_title">
90                                                 <span class="tag_num marc_field">[% innerloo.tag_number | html %]</span>
91                                                 [% IF (innerloo.defined("ind1") ) %]
92                                                     <span class="tag_ind1">[% innerloo.ind1 | html %]</span><span class="tag_ind2">[% innerloo.ind2 | html %]</span>
93                                                 [% END %]
94                                                 [% IF (innerloo.tag_desc) %]
95                                                     <span class="dashwrapper"> -</span> <span class="tag_desc marc_field">[% innerloo.tag_desc | html %]</span>
96                                                 [% END %]
97                                             </div> <!-- /.tag_title -->
98                                     [% ELSE %]
99                                         <div class="tag">
100                                     [% END # /IF ( innerloo.tag_number ) %]
101
102                                         [% FOREACH subfiel IN innerloo.subfield %]
103                                             <div class="auth_subfield">
104                                                 <div class="subfield_info marc_field">
105                                                     [% UNLESS ( subfiel.hide_marc ) %]
106                                                         <span class="marc_subfield">[% subfiel.marc_subfield | html %]</span>
107                                                     [% END %]
108                                                     <span class="marc_subfield_desc">[% subfiel.long_desc | html %]</span>
109                                                 </div> <!-- /.subfield_info.marc_field -->
110                                                 <div class="subfield_content marc_field">
111                                                     <span class="subfield_value">
112                                                         [% IF ( subfiel.is_url ) %]
113                                                             <a href="[% subfiel.marc_value | url %]">[% subfiel.marc_value | html %]</a>
114                                                         [% ELSE %]
115                                                             [% subfiel.marc_value | html %]
116                                                         [% END %]
117                                                     </span>
118                                                 </div> <!-- /.subfield_content.marc_field -->
119                                             </div> <!-- /.auth_subfield -->
120                                         [% END #/FOREACH subfiel %]
121                                     </div> <!-- /.tag -->
122                                 [% END # /FOREACH innerloo %]
123                             [% END # /tab_panel#tab${ BIG_LOO.number }XX  %]
124                         [% END # /FOREACH BIG_LOO %]
125                     [% END # /WRAPPER tab_panels %]
126                 [% END # /WRAPPER tabs %]
127
128             [% END # /IF ( unknownauthid ) %]
129         </div> <!-- /.col-md-8 col-md-offset-2 -->
130     </div> <!-- /.row -->
131
132 [% MACRO jsinclude BLOCK %]
133     [% INCLUDE 'authorities_js.inc' %]
134     [% IF ( displayhierarchy ) %]
135         [% Asset.js("lib/jquery/plugins/jstree/jstree-3.3.12.min.js") | $raw %]
136     [% END %]
137     <script>
138         $(document).ready(function() {
139             if( $("#authoritiestabs .tab-pane.active").length < 1 ){
140                 let tab_object = [];
141
142                 [% SET DefaultAuthorityTab = Koha.Preference('DefaultAuthorityTab') %]
143                 [% IF DefaultAuthorityTab %]
144                     tab_object = $("#authoritiestabs #tab[% DefaultAuthorityTab | html %]XX-tab");
145                 [% END %]
146
147                 if( tab_object.length > 0 ){
148                     tab_object.tab("show");
149                 } else {
150                     $("#authoritiestabs a:first").tab("show");
151                 }
152             }
153
154             var editAuth = $("#editAuth");
155             var editAuthLink = editAuth.attr("href");
156
157             $("a[data-toggle='tab']").on("shown.bs.tab", function (e) {
158                 var newTabId = $(this).attr("href");
159                 editAuth.attr("href", editAuthLink + newTabId );
160             });
161
162             [% IF ( displayhierarchy ) %]
163                 $('#hierarchies').jstree({
164                     "types" : {
165                         "default" : {
166                             "icon" : "fa-solid fa-file"
167                         }
168                     },
169                     "plugins" : [ "types" ]
170                 }).on('ready.jstree', function(){
171                     $(this).jstree('open_all');
172                     $("#hier"+[% authid | html %]+"_anchor").on("click",
173                         function(e){e.preventDefault(); return false;}
174                     ).css("text-decoration", "none").css("color", "#333");
175                     $(".currentauth").css("text-decoration", "none").css("color", "#333");
176                 }).bind("select_node.jstree", function (e, data) {
177                     e.preventDefault();
178                     document.location.href = data.node.a_attr.href;
179                 });
180             [% END # /IF ( displayhierarchy ) %]
181          });
182     </script>
183 [% END %]
184
185 [% INCLUDE 'intranet-bottom.inc' %]