5 [% INCLUDE 'doc-head-open.inc' %]
6 <title>Koha › Search for vendor [% supplier | html %]</title>
7 [% INCLUDE 'doc-head-close.inc' %]
8 <style type="text/css">
13 [% Asset.css("css/datatables.css") | $raw %]
16 <body id="acq_booksellers" class="acq">
17 [% INCLUDE 'header.inc' %]
18 [% INCLUDE 'acquisitions-search.inc' %]
20 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> › Search for vendor <em>[% supplier | html %]</em> </div>
22 <div class="main container-fluid">
24 <div class="col-sm-10 col-sm-push-2">
27 [% INCLUDE 'acquisitions-toolbar.inc' %]
28 [% UNLESS ( count == 1 ) %]
30 <h1>Your search returned no results.</h1>
31 [% ELSIF ( supplier.length < 1 ) %]
32 <h1>Vendor search: [% count | html %] results found</h1>
34 <h1>Vendor search: [% count | html %] results found for '[% supplier | html %]'</h1>
37 [% IF ( loop_suppliers.size ) %]
38 [% UNLESS (count == 1) %]
39 <p>Choose a vendor in the list to jump directly to the right place.
40 <select id="supplierlist">
41 [% FOREACH supplier1 IN loop_suppliers %]
42 <option value="[% supplier1.booksellerid | html %]">[% supplier1.name | html %]</option>
47 [% IF ( allbaskets ) %]
48 <a href="/cgi-bin/koha/acqui/booksellers.pl?supplier=[% supplier | uri %]&booksellerid=[% booksellerid | uri %]">Show active baskets only</a>
50 <a href="/cgi-bin/koha/acqui/booksellers.pl?supplier=[% supplier | uri %]&booksellerid=[% booksellerid | uri %]&allbaskets=1">Show all baskets</a>
52 [% UNLESS booksellerid %]
53 | <a href="#" id="show_active_vendors">Show active vendors only</a><a href="#" id="show_all_vendors">Show all vendors</a>
55 <div id="acqui_order_supplierlist">
56 [% FOREACH supplier IN loop_suppliers %]
57 [% IF ( supplier.active ) %]
58 <div class="supplier">
60 <div class="supplier inactive">
62 <span class="suppliername">
63 [% IF (supplier.name) %]
64 <a name="[% supplier.booksellerid | html %]" href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% supplier.booksellerid | html %]">[% supplier.name | html %]</a>
66 <a name="[% supplier.booksellerid | html %]" href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% supplier.booksellerid | html %]">NO NAME</a>
70 [% IF ( CAN_user_acquisition_order_manage ) %]
71 [% IF ( supplier.active ) %]
72 <a class="btn btn-default btn-sm" href="/cgi-bin/koha/acqui/basketheader.pl?booksellerid=[% supplier.booksellerid | html %]&op=add_form"><i class="fa fa-plus"></i> New basket</a>
77 [% IF ( supplier.loop_basket.size ) %]
78 <a class="btn btn-default btn-sm" href="/cgi-bin/koha/acqui/parcels.pl?booksellerid=[% supplier.booksellerid | html %]"><i class="fa fa-inbox"></i> Receive shipment</a>
82 [% IF ( supplier.loop_basket.size ) %]
83 <table class="baskets">
88 <th class="title-numeric">Item count</th>
89 <th class="title-numeric">Bibliographic record count</th>
90 <th>Items expected</th>
92 <th class="title-string">Date</th>
94 <th class="title-string">Closed</th>
99 [% FOREACH basket IN supplier.loop_basket %]
100 [% IF ( basket.uncertainprices ) %]
105 <td>[% basket.basketno | html %]</td>
106 <td>[% basket.basketname | html %]</td>
108 <span title="[% basket.total_items | html %]">[% basket.total_items | html %]
109 [% IF basket.total_items_cancelled %]
110 ([% basket.total_items_cancelled | html %] cancelled)
115 <span title="[% basket.total_biblios | html %]">[% basket.total_biblios | html %]
116 [% IF basket.total_biblios_cancelled %]
117 ([% basket.total_biblios_cancelled | html %] cancelled)
121 <td>[% basket.expected_items | html %]</td>
123 [% IF basket.authorisedby %]
124 [% basket.authorisedby.firstname | html %]
125 [% basket.authorisedby.surname | html %]
128 <td><span title="[% basket.creationdate | html %]">[% basket.creationdate | $KohaDates %]</span></td>
130 [% IF basket.basketgroup %]
131 [% basketgroup = basket.basketgroup %]
132 [% IF basketgroup.closed %]
133 [% basketgroup.name | html %] (closed)
135 <a href="/cgi-bin/koha/acqui/basketgroup.pl?op=add&booksellerid=[% basket.booksellerid | uri %]&basketgroupid=[% basketgroup.id | uri %]">[% basketgroup.name | html %]</a>
140 [% IF ( basket.closedate ) %]
141 <span title="[% basket.closedate | html %]">[% basket.closedate | $KohaDates %]</span>
143 <span title="9999-99-99"></span>
147 <a class="btn btn-default btn-xs" href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basket.basketno | html %]"><i class="fa fa-eye"></i> View</a>
149 [% IF not basket.closedate and supplier.active %]
150 <a class="btn btn-default btn-xs" id="addtoBasketLabel[% basket.basketno | html %]" href="#addtoBasket[% basket.basketno | html %]" role="button" data-toggle="modal"><i class="fa fa-plus"></i> Add to basket</a>
152 <div id="addtoBasket[% basket.basketno | html %]" class="modal" tabindex="-1" role="dialog" aria-labelledby="addtoBasketLabel[% basket.basketno | html %]" aria-hidden="true" data-basketno="[% basket.basketname | html %]">
153 <div class="modal-dialog">
154 <div class="modal-content">
155 <div class="modal-body">
156 [% INCLUDE 'acquisitions-add-to-basket.inc' booksellerid=supplier.booksellerid basketno=basket.basketno %]
158 <div class="modal-footer">
159 <a href="#" class="cancel" data-dismiss="modal" aria-hidden="true">Cancel</a>
167 [% END %][%# FOREACH basket IN supplier.loop_basket %]
172 <p>No pending baskets</p>
173 [% END %][%# IF ( supplier.loop_basket.size ) %]
176 [% END %][%# FOREACH supplier IN loop_suppliers %]
178 [% END %][%# IF ( loop_suppliers.size ) %]
180 </div> <!-- /.col-sm-10.col-sm-push-2 -->
181 <div class="col-sm-2 col-sm-pull-10">
183 [% IF ( booksellerid ) %]
184 [% INCLUDE 'vendor-menu.inc' %]
186 [% INCLUDE 'acquisitions-menu.inc' %]
189 </div> <!-- /.row -->
191 [% MACRO jsinclude BLOCK %]
192 [% Asset.js("js/acquisitions-menu.js") | $raw %]
193 [% INCLUDE 'datatables.inc' %]
195 $(document).ready(function() {
196 $("table.baskets").dataTable($.extend(true, {}, dataTablesDefaults, {
201 "aaSorting": [[ 1, "asc" ]],
203 { "sType": "title-string", "aTargets" : [ "title-string" ] },
204 { "sType": "title-numeric", "aTargets" : [ "title-numeric" ] },
205 { 'aTargets': [-1], 'bSortable': false }
208 $("#supplierlist").change(function() {
209 var id = $(this).find("option:selected").val();
210 window.location.href = "#" + id;
212 $(".modal").on("show", function(){
213 var basket = $(this).data("basketno");
214 var legend = _("Add order to basket %s").format(basket);
215 $(this).find("legend").html(legend);
217 $("#show_all_vendors").hide();
218 $("#show_active_vendors").on('click', function(e){
220 $(".inactive").hide();
221 $("#show_active_vendors").hide();
222 $("#show_all_vendors").show();
224 $("#show_all_vendors").on('click', function(e){
226 $(".inactive").show();
227 $("#show_all_vendors").hide();
228 $("#show_active_vendors").show();
234 [% INCLUDE 'intranet-bottom.inc' %]