Bug 31028: Only show pending concerns if there are some
[koha-ffzg.git] / koha-tmpl / intranet-tmpl / prog / en / modules / authorities / detail.tt
1 [% USE raw %]
2 [% USE Asset %]
3 [% SET footerjs = 1 %]
4 [% PROCESS 'authorities.inc' %]
5 [% INCLUDE 'doc-head-open.inc' %]
6 <title>
7     [% IF ( unknownauthid ) %]
8         Unknown authority record
9     [% ELSE %]
10         Details for authority #[% authid | html %] ([% authtypetext | html %])
11     [% END %] &rsaquo; Authorities &rsaquo; Koha
12 </title>
13 [% INCLUDE 'doc-head-close.inc' %]
14 [% Asset.css("css/addbiblio.css") | $raw %]
15 [% IF ( displayhierarchy ) %]
16     [% Asset.css("lib/jquery/plugins/jstree/themes/default/style.min.css") | $raw %]
17 [% END %]
18 </head>
19
20 <body id="auth_detail" class="auth">
21 [% WRAPPER 'header.inc' %]
22     [% INCLUDE 'authorities-search.inc' %]
23 [% END %]
24
25 [% WRAPPER 'sub-header.inc' %]
26 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
27     <ol>
28         <li>
29             <a href="/cgi-bin/koha/mainpage.pl">Home</a>
30         </li>
31         <li>
32             <a href="/cgi-bin/koha/authorities/authorities-home.pl">Authorities</a>
33         </li>
34
35         <li>
36             <a href="#" aria-current="page">
37                 [% IF ( unknownauthid ) %]
38                     Unknown authority record
39                 [% ELSE %]
40                     Details for authority #[% authid | html %] ([% authtypetext | html %])
41                 [% END %]
42             </a>
43         </li>
44     </ol>
45 </nav>
46 [% END %]
47
48 <div class="main container-fluid">
49     <div class="row">
50         <div class="col-md-8 col-md-offset-2">
51
52             [% INCLUDE 'authorities-toolbar.inc' %]
53
54             [% IF ( displayhierarchy ) %]
55                 <div id="hierarchies">
56                     [% PROCESS showhierarchy trees = loophierarchies %]
57                 </div>
58             [% END %]
59
60
61             [% IF ( unknownauthid ) %]
62                 <h1>Authority does not exist</h1>
63                 <div class="dialog message">The authority record you requested does not exist ([% errauthid | html %]).</div>
64             [% ELSE %]
65
66                 <h1>Authority #[% authid | html %] ([% authtypetext | html %])</h1>
67
68                 <div id="action">
69                     [% IF count %]
70                         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>
71                     [% ELSE %]
72                         This authority is not used in any records.
73                     [% END %]
74                 </div>
75
76                 <div id="authoritiestabs" class="toptabs numbered">
77                     <ul class="nav nav-tabs" role="tablist">
78                         [% FOREACH BIG_LOO IN BIG_LOOP %]
79                             <li role="presentation">
80                                 <a href="#tab[% BIG_LOO.number | uri %]XX" aria-controls="tab[% BIG_LOO.number | uri %]XX" role="tab" data-toggle="tab">[% BIG_LOO.number | html %]</a>
81                             </li>
82                         [% END %]
83                     </ul>
84                     <div class="tab-content">
85                         [% FOREACH BIG_LOO IN BIG_LOOP %]
86                             <div id="tab[% BIG_LOO.number | html %]XX" role="tabpanel" class="tab-pane">
87                                 [% FOREACH innerloo IN BIG_LOO.innerloop %]
88                                     [% IF ( innerloo.tag_number ) %]
89                                         <div class="tag">
90                                             <div class="tag_title">
91                                                 <span class="tag_num marc_field">[% innerloo.tag_number | html %]</span>
92                                                 [% IF (innerloo.defined("ind1") ) %]
93                                                     <span class="tag_ind1">[% innerloo.ind1 | html %]</span><span class="tag_ind2">[% innerloo.ind2 | html %]</span>
94                                                 [% END %]
95                                                 [% IF (innerloo.tag_desc) %]
96                                                     <span class="dashwrapper"> -</span> <span class="tag_desc marc_field">[% innerloo.tag_desc | html %]</span>
97                                                 [% END %]
98                                             </div> <!-- /.tag_title -->
99                                     [% ELSE %]
100                                         <div class="tag">
101                                     [% END # /IF ( innerloo.tag_number ) %]
102
103                                         [% FOREACH subfiel IN innerloo.subfield %]
104                                             <div class="auth_subfield">
105                                                 <div class="subfield_info marc_field">
106                                                     [% UNLESS ( subfiel.hide_marc ) %]
107                                                         <span class="marc_subfield">[% subfiel.marc_subfield | html %]</span>
108                                                     [% END %]
109                                                     <span class="marc_subfield_desc">[% subfiel.long_desc | html %]</span>
110                                                 </div> <!-- /.subfield_info.marc_field -->
111                                                 <div class="subfield_content marc_field">
112                                                     <span class="subfield_value">
113                                                         [% IF ( subfiel.is_url ) %]
114                                                             <a href="[% subfiel.marc_value | url %]">[% subfiel.marc_value | html %]</a>
115                                                         [% ELSE %]
116                                                             [% subfiel.marc_value | html %]
117                                                         [% END %]
118                                                     </span>
119                                                 </div> <!-- /.subfield_content.marc_field -->
120                                             </div> <!-- /.auth_subfield -->
121                                         [% END #/FOREACH subfiel %]
122                                     </div> <!-- /.tag -->
123                                 [% END # /FOREACH innerloo %]
124                             </div> <!-- /.tab-pane -->
125                         [% END # /FOREACH BIG_LOO %]
126                     </div> <!-- /.tab-content -->
127                 </div> <!-- /#authoritiestabs -->
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( $(".tab-pane.active").length < 1 ){
140                 $("#authoritiestabs a:first").tab("show");
141             }
142
143             var editAuth = $("#editAuth");
144             var editAuthLink = editAuth.attr("href");
145
146             $("a[data-toggle='tab']").on("shown.bs.tab", function (e) {
147                 var newTabId = $(this).attr("href");
148                 editAuth.attr("href", editAuthLink + newTabId );
149             });
150
151             [% IF ( displayhierarchy ) %]
152                 $('#hierarchies').jstree({
153                     "types" : {
154                         "default" : {
155                             "icon" : "fa fa-file-o"
156                         }
157                     },
158                     "plugins" : [ "types" ]
159                 }).on('ready.jstree', function(){
160                     $(this).jstree('open_all');
161                     $("#hier"+[% authid | html %]+"_anchor").on("click",
162                         function(e){e.preventDefault(); return false;}
163                     ).css("text-decoration", "none").css("color", "#333");
164                     $(".currentauth").css("text-decoration", "none").css("color", "#333");
165                 }).bind("select_node.jstree", function (e, data) {
166                     e.preventDefault();
167                     document.location.href = data.node.a_attr.href;
168                 });
169             [% END # /IF ( displayhierarchy ) %]
170          });
171     </script>
172 [% END %]
173
174 [% INCLUDE 'intranet-bottom.inc' %]