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