Bug 16939: Making all 'add to basket' actions buttons
[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 [% Asset.css("css/datatables.css") | $raw %]
7 [% INCLUDE 'doc-head-close.inc' %]
8 </head>
9
10 <body id="acq_neworderbiblio" class="acq">
11 [% INCLUDE 'header.inc' %]
12 [% INCLUDE 'acquisitions-search.inc' %]
13
14 <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>
15
16 <div class="main container-fluid">
17     <div class="row">
18         <div class="col-sm-10 col-sm-push-2">
19             <main>
20
21 <h1>Search existing records</h1>
22
23
24 [% IF ( total ) %]
25 <b>[% total | html %] results found </b> 
26 <div class="pages">[% pagination_bar | $raw %]</div>
27 [% ELSE %]
28 <h3> No results found</h3>
29 <p>
30     No results match your search for <span style="font-weight: bold;">&ldquo;[% query | html %]&rdquo;</span> in [% LibraryName | html %]
31 </p>
32 [% END %]
33
34 [% IF ( query_error ) %]
35     <div class="dialog alert"><p><strong>Error:</strong> [% query_error | html %]</p></div>
36 [% END %]
37
38 [% IF ( total ) %]
39 <div class="searchresults">
40     <table id="resultst">
41     <thead>
42       <tr>
43          <th>Summary</th>
44          <th>Publisher</th>
45          <th>Copyright</th>
46          <th>Actions</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 | uri %]">[% biblio.title | html %]</a></span>
54                 [% FOREACH subtitle IN biblio.subtitles %] <span class="subtitle">[% subtitle.subfield | html %]</span>[% END %]
55                 [% IF ( biblio.author ) %]  by <span class="author">[% biblio.author | html %]</span>,[% END %]</p>
56                 <p>[% IF ( biblio.isbn ) %] [% biblio.isbn | html %][% END %]
57                 [% IF ( biblio.pages ) %] - [% biblio.pages | html %][% END %]
58                 [% IF ( biblio.notes ) %] : [% biblio.notes | html %][% END %]
59                 [% IF ( biblio.size ) %] ; [% biblio.size | html %][% END %]
60                 </p>
61             </td>
62             <td>
63                 [% biblio.publishercode | html %]
64                 [% IF ( biblio.place ) %] ; [% biblio.place | html %][% END %]
65             </td>
66             <td>
67                 [% biblio.copyrightdate | html %]
68             </td>
69             <td class="actions">
70                 <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>
71                 <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>
72             </td>
73         </tr>
74       [% END %]
75     </tbody>
76     </table>
77     <div id="marcPreview" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="marcPreviewLabel" aria-hidden="true">
78         <div class="modal-dialog modal-wide">
79         <div class="modal-content">
80         <div class="modal-header">
81             <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
82             <h3 id="marcPreviewLabel">MARC preview</h3>
83         </div>
84         <div class="modal-body">
85             <div id="loading"> <img src="[% interface | html %]/[% theme | html %]/img/spinner-small.gif" alt="" /> Loading </div>
86         </div>
87         <div class="modal-footer">
88             <button class="btn btn-default" data-dismiss="modal" aria-hidden="true">Close</button>
89         </div>
90         </div>
91         </div>
92     </div>
93 </div>
94 [% END %]
95
96 [% INCLUDE 'acquisitions-add-to-basket.inc' %]
97
98 </main>
99 </div> <!-- /.col-sm-10.col-sm-push-2 -->
100
101 <div class="col-sm-2 col-sm-pull-10">
102     <aside>
103         [% INCLUDE 'acquisitions-menu.inc' %]
104     </aside>
105 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
106 </div> <!-- /.row -->
107
108 [% MACRO jsinclude BLOCK %]
109     [% Asset.js("js/acquisitions-menu.js") | $raw %]
110     [% INCLUDE 'datatables.inc' %]
111     <script>
112          $(document).ready(function() {
113             var resultst = $("#resultst").dataTable($.extend(true, {}, dataTablesDefaults, {
114                 'sDom': 't',
115                 'bPaginate': false,
116                 'bFilter': false,
117                 'bInfo': false,
118                 'bSort': false,
119             } ) );
120             $(".previewMARC").on("click", function(e){
121                 e.preventDefault();
122                 var ltitle = $(this).text();
123                 var page = $(this).attr("href");
124                 $("#marcPreviewLabel").text(ltitle);
125                 $("#marcPreview .modal-body").load(page + " table");
126                 $('#marcPreview').modal({show:true});
127             });
128             $("#marcPreview").on("hidden.bs.modal", function(){
129                 $("#marcPreviewLabel").html("");
130                 $("#marcPreview .modal-body").html("<div id=\"loading\"><img src=\"[% interface | html %]/[% theme | html %]/img/spinner-small.gif\" alt=\"\" /> "+_("Loading")+"</div>");
131             });
132          });
133     </script>
134 [% END %]
135
136 [% INCLUDE 'intranet-bottom.inc' %]