Bug 14544: QA fixes - some minor bug fixes
[koha.git] / koha-tmpl / opac-tmpl / bootstrap / en / modules / opac-MARCdetail.tt
1 [% USE Koha %]
2 [% INCLUDE 'doc-head-open.inc' %]
3 <title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog &rsaquo;  MARC details for record no. [% biblionumber %]</title>
4 [% INCLUDE 'doc-head-close.inc' %]
5 [% BLOCK cssinclude %][% END %]
6 </head>
7 [% INCLUDE 'bodytag.inc' bodyid='opac-marcdetail' bodyclass='scrollto' %]
8 [% INCLUDE 'masthead.inc' %]
9 <div class="main">
10     <ul class="breadcrumb">
11         <li><a href="/cgi-bin/koha/opac-main.pl">Home</a> <span class="divider">&rsaquo;</span></li>
12         <li><a href="#">MARC view: [% bibliotitle %]</a></li>
13     </ul>
14
15     <div class="container-fluid">
16         <div class="row-fluid">
17             <div class="span9">
18                 <div id="opac-detail" class="maincontent">
19                     <div id="usermarcdetail">
20                         <div id="catalogue_detail_biblio">
21
22                             <div id="views">
23                                 <span class="view"><a id="Normalview" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblionumber %]">Normal view</a></span>
24                                 <span class="view"><span id="MARCview">MARC view</span></span>
25                                 [% IF ( ISBD ) %]<span class="view"><a id="ISBDview"  href="/cgi-bin/koha/opac-ISBDdetail.pl?biblionumber=[% biblionumber %]">ISBD view</a></span>[% END %]
26                             </div>
27                             <h1 class="title">[% bibliotitle %] (Record no. [% biblionumber %])</h1>
28
29                             [% IF ( OPACXSLTDetailsDisplay ) %]
30                                 <div id="switchview_div">[ <a id="switchview" href="/cgi-bin/koha/opac-showmarc.pl?id=[% biblionumber %]&amp;viewas=html">view plain</a> ]</div>
31                                 <div id="plainmarc"></div>
32                             [% END %]
33
34                             <div id="labeledmarc">
35                                 <table id="marc" class="table table-bordered table-striped">
36                                     [% FOREACH tab0X IN tab0XX %]
37                                     <tr><th colspan="2">[% tab0X.tag %]</th></tr>
38                                     [% FOREACH subfiel IN tab0X.subfield %]
39                                             <tr>
40                                                 <td>[% subfiel.marc_lib %]</td>
41                                                 <td>[% subfiel.marc_value %]</td>
42                                             </tr>
43                                         [% END %]
44                                     [% END %]
45                                     [% FOREACH tab1X IN tab1XX %]
46                                     <tr><th colspan="2">[% tab1X.tag %]</th></tr>
47                                     [% FOREACH subfiel IN tab1X.subfield %]
48                                             <tr>
49                                                 <td  >[% subfiel.marc_lib %]</td>
50                                                 <td  >[% subfiel.marc_value %]</td>
51                                             </tr>
52                                         [% END %]
53                                     [% END %]
54
55                                     [% FOREACH tab2X IN tab2XX %]
56                                     <tr><th colspan="2">[% tab2X.tag %]</th></tr>
57                                     [% FOREACH subfiel IN tab2X.subfield %]
58                                             <tr>
59                                                 <td>[% subfiel.marc_lib %]</td>
60                                                 <td>[% subfiel.marc_value %]</td>
61                                             </tr>
62                                         [% END %]
63                                     [% END %]
64
65                                     [% FOREACH tab3X IN tab3XX %]
66                                     <tr><th colspan="2">[% tab3X.tag %]</th></tr>
67                                     [% FOREACH subfiel IN tab3X.subfield %]
68                                             <tr>
69                                                 <td>[% subfiel.marc_lib %]</td>
70                                                 <td>[% subfiel.marc_value %]</td>
71                                             </tr>
72                                         [% END %]
73                                     [% END %]
74
75                                     [% FOREACH tab4X IN tab4XX %]
76                                     <tr><th colspan="2" >[% tab4X.tag %]</th></tr>
77                                     [% FOREACH subfiel IN tab4X.subfield %]
78                                             <tr>
79                                                 <td>[% subfiel.marc_lib %]</td>
80                                                 <td>[% subfiel.marc_value %]</td>
81                                             </tr>
82                                         [% END %]
83                                     [% END %]
84
85                                     [% FOREACH tab5X IN tab5XX %]
86                                     <tr><th colspan="2">[% tab5X.tag %]</th></tr>
87                                     [% FOREACH subfiel IN tab5X.subfield %]
88                                             <tr>
89                                                 <td>[% subfiel.marc_lib %]</td>
90                                                 <td>[% subfiel.marc_value %]</td>
91                                             </tr>
92                                         [% END %]
93                                     [% END %]
94
95                                     [% FOREACH tab6X IN tab6XX %]
96                                     <tr><th colspan="2">[% tab6X.tag %]</th></tr>
97                                     [% FOREACH subfiel IN tab6X.subfield %]
98                                             <tr>
99                                                 <td>[% subfiel.marc_lib %]</td>
100                                                 <td>[% subfiel.marc_value %]</td>
101                                             </tr>
102                                         [% END %]
103                                     [% END %]
104
105                                     [% FOREACH tab7X IN tab7XX %]
106                                     <tr><th colspan="2">[% tab7X.tag %]</th></tr>
107                                     [% FOREACH subfiel IN tab7X.subfield %]
108                                             <tr>
109                                                 <td>[% subfiel.marc_lib %]</td>
110                                                 <td>[% subfiel.marc_value %]</td>
111                                             </tr>
112                                         [% END %]
113                                     [% END %]
114
115                                     [% FOREACH tab8X IN tab8XX %]
116                                     <tr><th colspan="2">[% tab8X.tag %]</th></tr>
117                                     [% FOREACH subfiel IN tab8X.subfield %]
118                                             <tr>
119                                                 <td>[% subfiel.marc_lib %]</td>
120                                                 <td>[% subfiel.marc_value %]</td>
121                                             </tr>
122                                         [% END %]
123                                     [% END %]
124
125                                     [% FOREACH tab9X IN tab9XX %]
126                                     <tr><th colspan="2">[% tab9X.tag %]</th></tr>
127                                     [% FOREACH subfiel IN tab9X.subfield %]
128                                             <tr>
129                                                 <td>[% subfiel.marc_lib %]</td>
130                                                 <td>[% subfiel.marc_value %]</td>
131                                             </tr>
132                                         [% END %]
133                                     [% END %]
134                                 </table>
135                             </div>
136                             [% IF ( item_header_loop ) %]
137                                 <table id="items" class="table table-bordered table-condensed table-striped">
138                                     <caption>Holdings</caption>
139                                         <tr>
140                                             [% FOREACH header IN item_header_loop %]
141                                                 <th>[% header %]</th>
142                                             [% END %]
143                                         </tr>
144                                         [% FOREACH item IN item_loop %]
145                                             <tr>
146                                                 [% FOREACH sf_code IN item_subfield_codes %]
147                                                     <td>[% item.$sf_code %]</td>
148                                                 [% END %]
149                                             </tr>
150                                         [% END %]
151                                 </table>
152                             [% ELSE %]
153                                 <p>No items available.</p>
154                             [% END %]
155                         </div> <!-- / #catalogue_detail_biblio -->
156                     </div> <!-- / #usermarcdetail -->
157                 </div> <!-- / #opac-detail -->
158             </div> <!-- / .span9 -->
159             <div class="span3">
160                 [% INCLUDE 'opac-detail-sidebar.inc' %]
161             </div>
162         </div> <!-- / .row-fluid -->
163     </div>  <!-- / .container-fluid -->
164 </div> <!-- / .main -->
165
166 [% INCLUDE 'opac-bottom.inc' %]
167 [% BLOCK jsinclude %]
168 <script type="text/javascript">
169 //<![CDATA[
170 [% IF ( OPACXSLTDetailsDisplay ) %]
171 $(document).ready(function(){
172     $.ajaxSetup({
173         error:function(x,e){
174             switch (x.status) {
175                 case 200: break;
176                 default:
177                 $('#switchview').parent().html("<div class=\"dialog alert\">"+_("Sorry, plain view is temporarily unavailable")+".</div>");
178                 $("#plainmarc").hide();
179                 $("#labeledmarc").show();
180                 break;
181             }
182         }
183     });
184
185     var loaded = 0;
186     var toggle = 0;
187     $("#switchview").on("click",function(e){
188         e.preventDefault();
189         if( toggle == 0){
190             $(this).text(_("view labeled"));
191             $("#labeledmarc").hide();
192             if(!loaded){
193                 $("#plainmarc").show().html("<div style=\"margin:1em;padding:1em;border:1px solid #EEE;font-size:150%;\"><img src=\"[% interface %]/[% theme %]/images/loading.gif\" /> "+_("Loading")+"...</div>").load("/cgi-bin/koha/opac-showmarc.pl","id=[% biblionumber %]&viewas=html");
194                 loaded = 1;
195             } else {
196                 $("#plainmarc").show();
197             }
198             toggle = 1;
199         } else {
200             $(this).text(_("view plain"));
201             $("#labeledmarc").show();
202             $("#plainmarc").hide();
203             toggle = 0;
204         }
205     });
206 });
207 [% END %]
208 //]]>
209 </script>
210 [% END %]