Bug 13406: Add styling classes to authority MARC detail display
[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>Koha &rsaquo; Authorities &rsaquo;
7     [% IF ( unknownauthid ) %]
8       Unknown authority record
9     [% ELSE %]
10       Details for authority #[% authid | html %] ([% authtypetext | html %])
11     [% END %]
12 </title>
13 [% INCLUDE 'doc-head-close.inc' %]
14 </head>
15
16 <body id="auth_detail" class="auth">
17 [% INCLUDE 'header.inc' %]
18 [% INCLUDE 'authorities-search.inc' %]
19 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/authorities/authorities-home.pl">Authorities</a> &rsaquo;
20     [% IF ( unknownauthid ) %]
21       Unknown authority record
22     [% ELSE %]
23       Details for authority #[% authid | html %] ([% authtypetext | html %])
24     [% END %]
25 </div>
26
27 <div class="main container-fluid">
28     <div class="row">
29         <div class="col-md-8 col-md-offset-2">
30
31     [% INCLUDE 'authorities-toolbar.inc' %]
32         
33 [% IF ( displayhierarchy ) %]
34 <div id="hierarchies">
35 [% PROCESS showhierarchy trees = loophierarchies %]
36 </div>
37 [% END %]
38
39
40 [% IF ( unknownauthid ) %]
41     <div class="dialog message">The authority record you requested does not exist ([% errauthid | html %]).</div>
42 [% ELSE %]
43 <h1>Authority #[% authid | html %] ([% authtypetext | html %])</h1>
44
45 <div id="action">
46     [% IF count %]
47         Used in <a href="/cgi-bin/koha/catalogue/search.pl?type=intranet&amp;op=do_search&amp;q=an=[% authid | html %]">[% count | html %] record(s)</a>
48     [% ELSE %]
49         This authority is not used in any records.
50     [% END %]
51 </div>
52
53 <div id="authoritiestabs" class="toptabs numbered">
54     <ul>
55         [% FOREACH BIG_LOO IN BIG_LOOP %]
56             <li>
57                 <a href="#tab[% BIG_LOO.number | html %]XX">[% BIG_LOO.number | html %]</a>
58             </li>
59         [% END %]
60     </ul>
61
62 [% FOREACH BIG_LOO IN BIG_LOOP %]
63     <div id="tab[% BIG_LOO.number | html %]XX">
64     [% FOREACH innerloo IN BIG_LOO.innerloop %]
65         [% IF ( innerloo.tag ) %]
66             <div class="tag">
67             <div class="tag_title">
68                 <span class="tag_num">[% innerloo.tag_number | html %]</span>
69                 [% IF (innerloo.defined("ind1") ) %]
70                     <span class="tag_ind1">[% innerloo.ind1 %]</span><span class="tag_ind2">[% innerloo.ind2 | html %]</span>
71                 [% END %]
72                 [% IF (innerloo.tag_desc) %]<span class="dashwrapper"> -</span> <span class="tag_desc">[% innerloo.tag_desc | html %]</span>[% END %]
73             </div>
74         [% ELSE %]
75             <div class="tag">
76         [% END %]
77         [% FOREACH subfiel IN innerloo.subfield %]
78             <p>
79                 <label class="labelsubfield">&nbsp;
80                 [% UNLESS ( subfiel.hide_marc ) %]<b>[% subfiel.marc_subfield | html %]</b>[% END %]
81                 <span title="[% subfiel.long_desc | html %]" class="desc">[% subfiel.short_desc | html %]</span></label>
82                 [% subfiel.marc_value | html %]
83                 [% IF ( subfiel.link ) %]
84                     <a href="/cgi-bin/koha/catalogue/search.pl?op=do_search&amp;marclist=[% subfiel.link | html %]&amp;operator==&amp;type=intranet&amp;value=[% subfiel.marc_value |url %]">
85                         <img src="[% interface | html %]/[% theme | html %]/images/filefind.png" height="15" title="Search on [% subfiel.marc_value | html %]">
86                     </a>
87                 [% END %]
88                 [% IF ( subfiel.authority ) %]
89                     <a href="/cgi-bin/koha/authorities/detail.pl?authid=[% subfiel.authority | html %]" class="button">Auth</a>
90                 [% END %]
91             </p>
92         [% END %]
93         </div>
94     [% END %]
95     </div>
96 [% END %]
97 </div>
98 </div>
99 </div>
100 [% END %]
101
102 [% MACRO jsinclude BLOCK %]
103     [% INCLUDE 'authorities_js.inc' %]
104     [% IF ( displayhierarchy ) %]
105         [% Asset.js("lib/jquery/plugins/jquery.jstree.js") | $raw %]
106     [% END %]
107     <script type="text/javascript">
108         $(document).ready(function() {
109             $('#authoritiestabs').tabs();
110             [% IF ( displayhierarchy ) %]
111                 var current_nodes = [];
112                 $('.currentauth').each(function() {
113                     current_nodes.push('#' + $(this).parent().parents('li:first').attr('id'));
114                     });
115                 $('#hierarchies').jstree({
116                         "plugins": [ "themes", "html_data"],
117                         "themes": { "theme": "classic",
118                                     "icons": false },
119                         "core": { "initially_open": current_nodes }
120                     });
121             [% END %]
122          });
123     </script>
124 [% END %]
125
126 [% INCLUDE 'intranet-bottom.inc' %]