Bug 21341: Style button on acquisitions existing record search with Bootstrap
[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>&nbsp;</th>
47          <th>&nbsp;</th>
48       </tr>
49     </thead>
50     <tbody>
51       [% FOREACH biblio IN resultsloop %]
52         <tr>
53             <td>
54                 <p><span class="title"><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% biblio.biblionumber | html %]">[% biblio.title | html %]</a></span>
55                 [% FOREACH subtitle IN biblio.subtitles %] <span class="subtitle">[% subtitle.subfield | html %]</span>[% END %]
56                 [% IF ( biblio.author ) %]  by <span class="author">[% biblio.author | html %]</span>,[% END %]</p>
57                 <p>[% IF ( biblio.isbn ) %] [% biblio.isbn | html %][% END %]
58                 [% IF ( biblio.pages ) %] - [% biblio.pages | html %][% END %]
59                 [% IF ( biblio.notes ) %] : [% biblio.notes | html %][% END %]
60                 [% IF ( biblio.size ) %] ; [% biblio.size | html %][% END %]
61                 </p>
62             </td>
63             <td>
64                 [% biblio.publishercode | html %]
65                 [% IF ( biblio.place ) %] ; [% biblio.place | html %][% END %]
66             </td>
67             <td>
68                 [% biblio.copyrightdate | html %]
69             </td>
70         <td>
71         <a href="/cgi-bin/koha/catalogue/showmarc.pl?id=[% biblio.biblionumber | html %]&amp;viewas=html" class="btn btn-default btn-xs previewMARC">View MARC</a>
72         </td>
73             <td>
74             <a href="/cgi-bin/koha/acqui/neworderempty.pl?booksellerid=[% booksellerid | html %]&amp;basketno=[% basketno | html %]&amp;biblionumber=[% biblio.biblionumber | html %]" class="btn btn-default btn-xs" title="Order this one">
75                 Order
76             </a>
77             </td>
78         </tr>
79       [% END %]
80     </tbody>
81     </table>
82     <div id="marcPreview" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="marcPreviewLabel" aria-hidden="true">
83         <div class="modal-dialog modal-wide">
84         <div class="modal-content">
85         <div class="modal-header">
86             <button type="button" class="closebtn" data-dismiss="modal" aria-hidden="true">×</button>
87             <h3 id="marcPreviewLabel">MARC preview</h3>
88         </div>
89         <div class="modal-body">
90             <div id="loading"> <img src="[% interface | html %]/[% theme | html %]/img/spinner-small.gif" alt="" /> Loading </div>
91         </div>
92         <div class="modal-footer">
93             <button class="btn btn-default" data-dismiss="modal" aria-hidden="true">Close</button>
94         </div>
95         </div>
96         </div>
97     </div>
98 </div>
99 [% END %]
100
101 [% INCLUDE 'acquisitions-add-to-basket.inc' %]
102
103 </main>
104 </div> <!-- /.col-sm-10.col-sm-push-2 -->
105
106 <div class="col-sm-2 col-sm-pull-10">
107     <aside>
108         [% INCLUDE 'acquisitions-menu.inc' %]
109     </aside>
110 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
111 </div> <!-- /.row -->
112
113 [% MACRO jsinclude BLOCK %]
114     [% Asset.js("js/acquisitions-menu.js") | $raw %]
115     [% INCLUDE 'datatables.inc' %]
116     <script>
117          $(document).ready(function() {
118             var resultst = $("#resultst").dataTable($.extend(true, {}, dataTablesDefaults, {
119                 'sDom': 't',
120                 'bPaginate': false,
121                 'bFilter': false,
122                 'bInfo': false,
123                 'bSort': false,
124             } ) );
125             $(".previewMARC").on("click", function(e){
126                 e.preventDefault();
127                 var ltitle = $(this).text();
128                 var page = $(this).attr("href");
129                 $("#marcPreviewLabel").text(ltitle);
130                 $("#marcPreview .modal-body").load(page + " table");
131                 $('#marcPreview').modal({show:true});
132             });
133             $("#marcPreview").on("hidden", function(){
134                 $("#marcPreviewLabel").html("");
135                 $("#marcPreview .modal-body").html("<div id=\"loading\"><img src=\"[% interface | html %]/[% theme | html %]/img/spinner-small.gif\" alt=\"\" /> "+_("Loading")+"</div>");
136             });
137          });
138     </script>
139 [% END %]
140
141 [% INCLUDE 'intranet-bottom.inc' %]