]> git.koha-community.org Git - koha.git/blob - koha-tmpl/intranet-tmpl/prog/en/modules/authorities/detail.tt
Bug 32910: (follow-up) Replace v4 icon names with v6
[koha.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     [% WRAPPER breadcrumbs %]
27         [% WRAPPER breadcrumb_item %]
28             <a href="/cgi-bin/koha/authorities/authorities-home.pl">Authorities</a>
29         [% END %]
30
31         [% WRAPPER breadcrumb_item bc_active= 1 %]
32             [% IF ( unknownauthid ) %]
33                 <span>Unknown authority record</span>
34             [% ELSE %]
35                 <span>Details for authority #[% authid | html %] ([% authtypetext | html %])</span>
36             [% END %]
37         [% END %]
38     [% END #/ WRAPPER breadcrumbs %]
39 [% END #/ WRAPPER sub-header.inc %]
40
41 <div class="main container-fluid">
42     <div class="row">
43         <div class="col-md-8 col-md-offset-2">
44
45             [% INCLUDE 'authorities-toolbar.inc' %]
46
47             [% IF ( displayhierarchy ) %]
48                 <div id="hierarchies">
49                     [% PROCESS showhierarchy trees = loophierarchies %]
50                 </div>
51             [% END %]
52
53
54             [% IF ( unknownauthid ) %]
55                 <h1>Authority does not exist</h1>
56                 <div class="dialog message">The authority record you requested does not exist ([% errauthid | html %]).</div>
57             [% ELSE %]
58
59                 <h1>Authority #[% authid | html %] ([% authtypetext | html %])</h1>
60
61                 <div id="action">
62                     [% IF count %]
63                         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>
64                     [% ELSE %]
65                         This authority is not used in any records.
66                     [% END %]
67                 </div>
68
69                 [% WRAPPER tabs id= "authoritiestabs" %]
70                     [% WRAPPER tabs_nav %]
71                         [% FOREACH BIG_LOO IN BIG_LOOP %]
72                             [% WRAPPER tab_item tabname= "tab${ BIG_LOO.number }XX" %]
73                                 [% BIG_LOO.number | html %]
74                             [% END %]
75                         [% END %]
76                     [% END # /WRAPPER tabs_nav %]
77
78                     [% WRAPPER tab_panels %]
79                         [% FOREACH BIG_LOO IN BIG_LOOP %]
80                             [% WRAPPER tab_panel tabname="tab${ BIG_LOO.number }XX" %]
81                                 [% FOREACH innerloo IN BIG_LOO.innerloop %]
82                                     [% IF ( innerloo.tag_number ) %]
83                                         <div class="tag">
84                                             <div class="tag_title">
85                                                 <span class="tag_num marc_field">[% innerloo.tag_number | html %]</span>
86                                                 [% IF (innerloo.defined("ind1") ) %]
87                                                     <span class="tag_ind1">[% innerloo.ind1 | html %]</span><span class="tag_ind2">[% innerloo.ind2 | html %]</span>
88                                                 [% END %]
89                                                 [% IF (innerloo.tag_desc) %]
90                                                     <span class="dashwrapper"> -</span> <span class="tag_desc marc_field">[% innerloo.tag_desc | html %]</span>
91                                                 [% END %]
92                                             </div> <!-- /.tag_title -->
93                                     [% ELSE %]
94                                         <div class="tag">
95                                     [% END # /IF ( innerloo.tag_number ) %]
96
97                                         [% FOREACH subfiel IN innerloo.subfield %]
98                                             <div class="auth_subfield">
99                                                 <div class="subfield_info marc_field">
100                                                     [% UNLESS ( subfiel.hide_marc ) %]
101                                                         <span class="marc_subfield">[% subfiel.marc_subfield | html %]</span>
102                                                     [% END %]
103                                                     <span class="marc_subfield_desc">[% subfiel.long_desc | html %]</span>
104                                                 </div> <!-- /.subfield_info.marc_field -->
105                                                 <div class="subfield_content marc_field">
106                                                     <span class="subfield_value">
107                                                         [% IF ( subfiel.is_url ) %]
108                                                             <a href="[% subfiel.marc_value | url %]">[% subfiel.marc_value | html %]</a>
109                                                         [% ELSE %]
110                                                             [% subfiel.marc_value | html %]
111                                                         [% END %]
112                                                     </span>
113                                                 </div> <!-- /.subfield_content.marc_field -->
114                                             </div> <!-- /.auth_subfield -->
115                                         [% END #/FOREACH subfiel %]
116                                     </div> <!-- /.tag -->
117                                 [% END # /FOREACH innerloo %]
118                             [% END # /tab_panel#tab${ BIG_LOO.number }XX  %]
119                         [% END # /FOREACH BIG_LOO %]
120                     [% END # /WRAPPER tab_panels %]
121                 [% END # /WRAPPER tabs %]
122
123             [% END # /IF ( unknownauthid ) %]
124         </div> <!-- /.col-md-8 col-md-offset-2 -->
125     </div> <!-- /.row -->
126
127 [% MACRO jsinclude BLOCK %]
128     [% INCLUDE 'authorities_js.inc' %]
129     [% IF ( displayhierarchy ) %]
130         [% Asset.js("lib/jquery/plugins/jstree/jstree-3.3.12.min.js") | $raw %]
131     [% END %]
132     <script>
133         $(document).ready(function() {
134             if( $("#authoritiestabs .tab-pane.active").length < 1 ){
135                 $("#authoritiestabs a:first").tab("show");
136             }
137
138             var editAuth = $("#editAuth");
139             var editAuthLink = editAuth.attr("href");
140
141             $("a[data-toggle='tab']").on("shown.bs.tab", function (e) {
142                 var newTabId = $(this).attr("href");
143                 editAuth.attr("href", editAuthLink + newTabId );
144             });
145
146             [% IF ( displayhierarchy ) %]
147                 $('#hierarchies').jstree({
148                     "types" : {
149                         "default" : {
150                             "icon" : "fa-solid fa-file"
151                         }
152                     },
153                     "plugins" : [ "types" ]
154                 }).on('ready.jstree', function(){
155                     $(this).jstree('open_all');
156                     $("#hier"+[% authid | html %]+"_anchor").on("click",
157                         function(e){e.preventDefault(); return false;}
158                     ).css("text-decoration", "none").css("color", "#333");
159                     $(".currentauth").css("text-decoration", "none").css("color", "#333");
160                 }).bind("select_node.jstree", function (e, data) {
161                     e.preventDefault();
162                     document.location.href = data.node.a_attr.href;
163                 });
164             [% END # /IF ( displayhierarchy ) %]
165          });
166     </script>
167 [% END %]
168
169 [% INCLUDE 'intranet-bottom.inc' %]