Bug 19754: Move template JavaScript to the footer: Acquisitions, part 2
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / acqui / neworderbiblio.tt
1 [% SET footerjs = 1 %]
2 [% INCLUDE 'doc-head-open.inc' %]
3 <title>Koha &rsaquo; Acquisitions &rsaquo; Search existing records</title>
4 <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
5 [% INCLUDE 'doc-head-close.inc' %]
6 </head>
7
8 <body id="acq_neworderbiblio" class="acq">
9 [% INCLUDE 'header.inc' %]
10 [% INCLUDE 'acquisitions-search.inc' %]
11
12 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> &rsaquo; <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid %]">[% name %]</a> &rsaquo; <a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basketno %]">Basket [% basketno %]</a> &rsaquo; Search existing records</div>
13
14 <div id="doc3" class="yui-t2">
15    
16    <div id="bd">
17         <div id="yui-main">
18         <div class="yui-b">
19         
20 <h1>Search existing records</h1>
21
22
23 [% IF ( total ) %]
24 <b>[% total %] results found </b> 
25 <div class="pages">[% pagination_bar %]</div>
26 [% ELSE %]
27 <h3> No results found</h3>
28 <p>
29     No results match your search for <span style="font-weight: bold;">&ldquo;[% query %]&rdquo;</span> in [% LibraryName %]
30 </p>
31 [% END %]
32
33 [% IF ( query_error ) %]
34     <div class="dialog alert"><p><strong>Error:</strong> [% query_error %]</p></div>
35 [% END %]
36
37 [% IF ( total ) %]
38 <div class="searchresults">
39     <table id="resultst">
40     <thead>
41       <tr>
42          <th>Summary</th>
43          <th>Publisher</th>
44          <th>Copyright</th>
45          <th>&nbsp;</th>
46          <th>&nbsp;</th>
47       </tr>
48     </thead>
49     <tbody>
50       [% FOREACH biblio IN resultsloop %]
51         <tr>
52             <td>
53                 <p><span class="title"><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblio.biblionumber %]">[% biblio.title | html %]</a></span>
54                 [% FOREACH subtitle IN biblio.subtitles %] <span class="subtitle">[% subtitle.subfield %]</span>[% END %]
55                 [% IF ( biblio.author ) %]  by <span class="author">[% biblio.author %]</span>,[% END %]</p>
56                 <p>[% IF ( biblio.isbn ) %] [% biblio.isbn %][% END %]
57                 [% IF ( biblio.pages ) %] - [% biblio.pages %][% END %]
58                 [% IF ( biblio.notes ) %] : [% biblio.notes %][% END %]
59                 [% IF ( biblio.size ) %] ; [% biblio.size %][% END %]
60                 </p>
61             </td>
62             <td>
63                 [% biblio.publishercode %]
64                 [% IF ( biblio.place ) %] ; [% biblio.place %][% END %]
65             </td>
66             <td>
67                 [% biblio.copyrightdate %]
68             </td>
69         <td>
70         <a href="/cgi-bin/koha/catalogue/showmarc.pl?id=[% biblio.biblionumber %]&amp;viewas=html" class="previewMARC">View MARC</a>
71         </td>
72             <td>
73             <a href="/cgi-bin/koha/acqui/neworderempty.pl?booksellerid=[% booksellerid %]&amp;basketno=[% basketno %]&amp;biblionumber=[% biblio.biblionumber %]" title="Order this one">
74                 Order
75             </a>
76             </td>
77         </tr>
78       [% END %]
79     </tbody>
80     </table>
81     <div id="marcPreview" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="marcPreviewLabel" aria-hidden="true">
82         <div class="modal-dialog">
83         <div class="modal-content">
84         <div class="modal-header">
85             <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
86             <h3 id="marcPreviewLabel">MARC preview</h3>
87         </div>
88         <div class="modal-body">
89             <div id="loading"> <img src="[% interface %]/[% theme %]/img/spinner-small.gif" alt="" /> Loading </div>
90         </div>
91         <div class="modal-footer">
92             <button class="btn btn-default" data-dismiss="modal" aria-hidden="true">Close</button>
93         </div>
94         </div>
95         </div>
96     </div>
97 </div>
98 [% END %]
99
100 [% INCLUDE 'acquisitions-add-to-basket.inc' %]
101
102 </div>
103 </div>
104 <div class="yui-b">
105 [% INCLUDE 'acquisitions-menu.inc' %]
106 </div>
107 </div>
108
109 [% MACRO jsinclude BLOCK %]
110     <script type="text/javascript" src="[% interface %]/[% theme %]/js/acquisitions-menu_[% KOHA_VERSION %].js"></script>
111     [% INCLUDE 'datatables.inc' %]
112     <script type="text/javascript">
113          $(document).ready(function() {
114             var resultst = $("#resultst").dataTable($.extend(true, {}, dataTablesDefaults, {
115                 'sDom': 't',
116                 'bPaginate': false,
117                 'bFilter': false,
118                 'bInfo': false,
119                 'bSort': false,
120             } ) );
121             $(".previewMARC").on("click", function(e){
122                 e.preventDefault();
123                 var ltitle = $(this).text();
124                 var page = $(this).attr("href");
125                 $("#marcPreviewLabel").text(ltitle);
126                 $("#marcPreview .modal-body").load(page + " table");
127                 $('#marcPreview').modal({show:true});
128             });
129             $("#marcPreview").on("hidden", function(){
130                 $("#marcPreviewLabel").html("");
131                 $("#marcPreview .modal-body").html("<div id=\"loading\"><img src=\"[% interface %]/[% theme %]/img/spinner-small.gif\" alt=\"\" /> "+_("Loading")+"</div>");
132             });
133          });
134     </script>
135 [% END %]
136
137 [% INCLUDE 'intranet-bottom.inc' %]