482185b33e0cca7f7d662e70168d7a27cc2ab275
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / acqui / neworderbiblio.tt
1 [% USE raw %]
2 [% USE Asset %]
3 [% SET footerjs = 1 %]
4 [% INCLUDE 'doc-head-open.inc' %]
5 <title>Koha &rsaquo; Acquisitions &rsaquo; Search existing records</title>
6 [% INCLUDE 'doc-head-close.inc' %]
7 </head>
8
9 <body id="acq_neworderbiblio" class="acq">
10 [% INCLUDE 'header.inc' %]
11 [% INCLUDE 'acquisitions-search.inc' %]
12
13 <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 | html %]">[% name | html %]</a> &rsaquo; <a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basketno | html %]">Basket [% basketno | html %]</a> &rsaquo; Search existing records</div>
14
15 <div class="main container-fluid">
16     <div class="row">
17         <div class="col-sm-10 col-sm-push-2">
18             <main>
19
20 <h1>Search existing records</h1>
21
22
23 [% IF ( total ) %]
24 <b>[% total | html %] results found </b> 
25 <div class="pages">[% pagination_bar | $raw %]</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 | html %]&rdquo;</span> in [% LibraryName | html %]
30 </p>
31 [% END %]
32
33 [% IF ( query_error ) %]
34     <div class="dialog alert"><p><strong>Error:</strong> [% query_error | html %]</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>Actions</th>
46       </tr>
47     </thead>
48     <tbody>
49       [% FOREACH biblio IN resultsloop %]
50         <tr>
51             <td>
52                 <p><span class="title"><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblio.biblionumber | uri %]">[% biblio.title | html %]</a></span>
53                 [% FOREACH subtitle IN biblio.subtitles %] <span class="subtitle">[% subtitle.subfield | html %]</span>[% END %]
54                 [% IF ( biblio.author ) %]  by <span class="author">[% biblio.author | html %]</span>,[% END %]</p>
55                 <p>[% IF ( biblio.isbn ) %] [% biblio.isbn | html %][% END %]
56                 [% IF ( biblio.pages ) %] - [% biblio.pages | html %][% END %]
57                 [% IF ( biblio.notes ) %] : [% biblio.notes | html %][% END %]
58                 [% IF ( biblio.size ) %] ; [% biblio.size | html %][% END %]
59                 </p>
60             </td>
61             <td>
62                 [% biblio.publishercode | html %]
63                 [% IF ( biblio.place ) %] ; [% biblio.place | html %][% END %]
64             </td>
65             <td>
66                 [% biblio.copyrightdate | html %]
67             </td>
68             <td class="actions">
69                 <a href="/cgi-bin/koha/catalogue/showmarc.pl?id=[% biblio.biblionumber | uri %]&amp;viewas=html" class="previewMARC btn btn-default btn-xs"><i class="fa fa-eye"></i> View MARC</a>
70                 <a href="/cgi-bin/koha/acqui/neworderempty.pl?booksellerid=[% booksellerid | uri %]&amp;basketno=[% basketno | uri %]&amp;biblionumber=[% biblio.biblionumber | uri %]" title="Order this one" class="btn btn-default btn-xs"><i class="fa fa-plus"></i> Order</a>
71             </td>
72         </tr>
73       [% END %]
74     </tbody>
75     </table>
76     <div id="marcPreview" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="marcPreviewLabel" aria-hidden="true">
77         <div class="modal-dialog modal-wide">
78         <div class="modal-content">
79         <div class="modal-header">
80             <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
81             <h3 id="marcPreviewLabel">MARC preview</h3>
82         </div>
83         <div class="modal-body">
84             <div id="loading"> <img src="[% interface | html %]/[% theme | html %]/img/spinner-small.gif" alt="" /> Loading </div>
85         </div>
86         <div class="modal-footer">
87             <button class="btn btn-default" data-dismiss="modal" aria-hidden="true">Close</button>
88         </div>
89         </div>
90         </div>
91     </div>
92 </div>
93 [% END %]
94
95 [% INCLUDE 'acquisitions-add-to-basket.inc' %]
96
97 </main>
98 </div> <!-- /.col-sm-10.col-sm-push-2 -->
99
100 <div class="col-sm-2 col-sm-pull-10">
101     <aside>
102         [% INCLUDE 'acquisitions-menu.inc' %]
103     </aside>
104 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
105 </div> <!-- /.row -->
106
107 [% MACRO jsinclude BLOCK %]
108     [% Asset.js("js/acquisitions-menu.js") | $raw %]
109     [% INCLUDE 'datatables.inc' %]
110     <script>
111          $(document).ready(function() {
112             var resultst = $("#resultst").dataTable($.extend(true, {}, dataTablesDefaults, {
113                 'sDom': 't',
114                 'bPaginate': false,
115                 'bFilter': false,
116                 'bInfo': false,
117                 'bSort': false,
118             } ) );
119             $(".previewMARC").on("click", function(e){
120                 e.preventDefault();
121                 var ltitle = $(this).text();
122                 var page = $(this).attr("href");
123                 $("#marcPreviewLabel").text(ltitle);
124                 $("#marcPreview .modal-body").load(page + " table");
125                 $('#marcPreview').modal({show:true});
126             });
127             $("#marcPreview").on("hidden.bs.modal", function(){
128                 $("#marcPreviewLabel").html("");
129                 $("#marcPreview .modal-body").html("<div id=\"loading\"><img src=\"[% interface | html %]/[% theme | html %]/img/spinner-small.gif\" alt=\"\" /> "+_("Loading")+"</div>");
130             });
131          });
132     </script>
133 [% END %]
134
135 [% INCLUDE 'intranet-bottom.inc' %]