Merge remote-tracking branch 'origin/new/bug_8092'
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / acqui / histsearch.tt
1 [% USE KohaDates %]
2 [% INCLUDE 'doc-head-open.inc' %]
3 <title>Koha &rsaquo; Acquisitions &rsaquo; [% IF ( suggestions_loop ) %]Orders search &rsaquo; Search results[% ELSE %]Order search[% END %]</title>
4 <link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
5 [% INCLUDE 'doc-head-close.inc' %]
6 <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.dataTables.min.js"></script>
7 [% INCLUDE 'datatables-strings.inc' %]
8 <script type="text/javascript" src="[% themelang %]/js/datatables.js"></script>
9 <script type="text/javascript">
10 //<![CDATA[
11  $(document).ready(function() {
12     var histsearcht = $("#histsearcht").dataTable($.extend(true, {}, dataTablesDefaults, {
13         "sPaginationType": "four_button"
14     } ) );
15  });
16  //]]>
17 </script>
18 [% INCLUDE 'calendar.inc' %]
19 </head>
20 <body id="acq_histsearch" class="acq">
21 [% INCLUDE 'header.inc' %]
22 [% INCLUDE 'acquisitions-search.inc' %]
23
24 <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; [% IF ( suggestions_loop ) %]<a href="/cgi-bin/koha/acqui/histsearch.pl">Orders search</a> &rsaquo; Search results[% ELSE %]Order search[% END %]</div>
25
26 <div id="doc3" class="yui-t2">
27    
28    <div id="bd">
29         <div id="yui-main">
30         <div class="yui-b">
31         
32                 [% UNLESS ( suggestions_loop ) %]<form action="/cgi-bin/koha/acqui/histsearch.pl" method="post">
33 <fieldset class="rows">
34         <legend>Search Orders</legend>
35                 <ol>
36                 <li><label for="title">Title: </label> <input type="text" name="title" id="title" value="[% title %]" /></li>
37                 <li><label for="author">Author: </label> <input type="text" name="author" id="author" value="[% author %]" /></li>
38                 <li><label for="isbn">ISBN: </label> <input type="isbn" name="isbn" id="isbn" value="[% isbn %]" /></li>
39                 [% IF (UNIMARC) %]
40         <li><label for="ean">EAN: </label> <input type="text" name="ean" id="ean" value="[% ean %]" /></li>
41                 [% END %]
42                 <li><label for="name">Vendor: </label> <input type="text" name="name" id="name" value="[% name %]" /></li>
43                 <li><label for="basket">Basket: </label> <input type="text" name="basket" id="basket" value="[% basket %]" /></li>
44         <li><label for="booksellerinvoicenumber ">Bookseller invoice no: </label> <input type="text" name="booksellerinvoicenumber" id="booksellerinvoicenumber" value="[% booksellerinvoicenumber %]" /></li>
45                 <li><label for="from">From: </label> 
46                         <input type="text" size="10" id="from" name="from" value="[% from_placed_on %]" />
47                         <img src="[% themelang %]/lib/calendar/cal.gif" id="openCalendarFrom" style="cursor: pointer;" alt="Show Calendar" />
48                                 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
49                 </li>
50                 <li><label for="to">To: </label> 
51                         <input type="text" size="10" id="to" name="to" value="[% to_placed_on %]" />
52                         <img src="[% themelang %]/lib/calendar/cal.gif" id="openCalendarTo" style="cursor: pointer;" alt="Show Calendar" />
53                         <script type="text/javascript">
54                                 // return true if the date is blocked.
55                                 function disable_from(date) {var limit = get_Calendar_limit(date,'to'  ); return (limit && limit < date);}  // true or false
56                                 function disable_to  (date) {var limit = get_Calendar_limit(date,'from'); return (limit && limit > date);}  // true or false
57                                 Calendar.setup({
58                                         inputField : "from",
59                                         ifFormat : "[% DHTMLcalendar_dateformat %]",
60                                         button : "openCalendarFrom",
61                                         disableFunc : disable_from,
62                                         dateStatusFunc : disable_from
63                                 });
64                                 Calendar.setup({
65                                         inputField : "to",
66                                         ifFormat : "[% DHTMLcalendar_dateformat %]",
67                                         button : "openCalendarTo",
68                                         disableFunc : disable_to,
69                                         dateStatusFunc : disable_to
70                      });
71                         </script>
72                                 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
73                 </li>
74                 </ol>
75         </fieldset>
76     <input type="hidden" name="do_search" value="1" />
77         <fieldset class="action"><input type="submit" value="Search" /></fieldset>
78         </form>[% END %]
79     [% IF ( suggestions_loop ) %]<h1>Search results</h1>
80         <div id="acqui_histsearch">
81         <table id="histsearcht">
82             <thead>
83                         <tr>
84                                 <th>Basket</th>
85                                 <th>Basket group</th>
86                 <th>Invoice number</th>
87                 <th>Order number</th>
88                                 <th>Summary</th>
89                                 <th>Vendor</th>
90                                 <th>Placed on</th>
91                                 <th>Received on</th>
92                                 <th>Quantity ordered</th>
93                                 <th>Unit cost</th>
94                         </tr>
95             </thead>
96             <tbody>
97                         [% FOREACH suggestions_loo IN suggestions_loop %]
98                                 <tr>
99                     <td>[% suggestions_loo.basketname %] (<a href="basket.pl?basketno=[% suggestions_loo.basketno %]">[% suggestions_loo.basketno %]</a>)</td>
100                     <td>
101                         [% IF ( suggestions_loo.basketgroupid ) %]
102                             [% suggestions_loo.groupname %] (<a href="basketgroup.pl?booksellerid=[% suggestions_loo.id %]">[% suggestions_loo.basketgroupid %]</a>)
103                         [% ELSE %]
104                             &nbsp;
105                         [% END %]
106                     </td>
107                                         <td>[% IF ( suggestions_loo.invoicenumber ) %]
108                                                 <a href="/cgi-bin/koha/acqui/parcel.pl?invoice=[% suggestions_loo.invoicenumber %]&amp;booksellerid=[% suggestions_loo.id %]&amp;datereceived=[% suggestions_loo.datereceived %]">[% suggestions_loo.invoicenumber %]</a>
109                                             [% ELSE %]
110                                                 &nbsp;
111                                             [% END %]
112                                         </td>
113                     <td>[% suggestions_loo.ordernumber %]</td>
114                                         <td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% suggestions_loo.biblionumber %]">[% suggestions_loo.title |html %]</a>
115                         <br />[% suggestions_loo.author %] <br /> [% suggestions_loo.isbn %]</td>
116                                         <td><a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% suggestions_loo.id %]">[% suggestions_loo.name %]</a></td>
117                                         <td>[% suggestions_loo.creationdate | $KohaDates %]</td>
118                                         <td>[% suggestions_loo.datereceived | $KohaDates %]</td>
119                                         <td>[% suggestions_loo.quantity %]</td>
120                                         <td>[% suggestions_loo.ecost %]</td>
121                                 </tr>
122                         [% END %]
123             </tbody>
124                 </table>
125         </div>[% ELSE %][% END %]
126
127 </div>
128 </div>
129 <div class="yui-b">
130 [% INCLUDE 'acquisitions-menu.inc' %]
131 </div>
132 </div>
133 [% INCLUDE 'intranet-bottom.inc' %]