1 [% PROCESS 'i18n.inc' %]
6 [% INCLUDE 'doc-head-open.inc' %]
7 <title>Koha › Search for vendor [% supplier | html %]</title>
8 [% INCLUDE 'doc-head-close.inc' %]
16 <body id="acq_booksellers" class="acq">
17 [% INCLUDE 'header.inc' %]
18 [% INCLUDE 'acquisitions-search.inc' %]
20 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
23 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
26 <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a>
29 <a href="#" aria-current="page">
30 Search for vendor <em>[% supplier | html %]</em>
36 <div class="main container-fluid">
38 <div class="col-sm-10 col-sm-push-2">
41 [% INCLUDE 'acquisitions-toolbar.inc' %]
42 [% UNLESS ( count == 1 ) %]
44 <h1>Your search returned no results.</h1>
45 [% ELSIF ( supplier.length < 1 ) %]
46 <h1>Vendor search: [% count | html %] results found</h1>
48 <h1>Vendor search: [% count | html %] results found for '[% supplier | html %]'</h1>
51 [% IF ( loop_suppliers.size ) %]
52 [% UNLESS (count == 1) %]
53 <p>Choose a vendor in the list to jump directly to the right place.
54 <select id="supplierlist">
55 [% FOREACH supplier1 IN loop_suppliers %]
56 <option value="[% supplier1.booksellerid | html %]">[% supplier1.name | html %]</option>
61 [% IF ( allbaskets ) %]
62 <a href="/cgi-bin/koha/acqui/booksellers.pl?supplier=[% supplier | uri %]&booksellerid=[% booksellerid | uri %]">Show active baskets only</a>
64 <a href="/cgi-bin/koha/acqui/booksellers.pl?supplier=[% supplier | uri %]&booksellerid=[% booksellerid | uri %]&allbaskets=1">Show all baskets</a>
66 [% UNLESS booksellerid %]
67 | <a href="#" id="show_active_vendors">Show active vendors only</a><a href="#" id="show_all_vendors">Show all vendors</a>
69 <div id="acqui_order_supplierlist">
70 [% FOREACH supplier IN loop_suppliers %]
71 [% IF ( supplier.active ) %]
72 <div class="supplier">
74 <div class="supplier inactive">
76 <span class="suppliername">
77 [% IF (supplier.name) %]
78 <a name="[% supplier.booksellerid | html %]" href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% supplier.booksellerid | uri %]">[% supplier.name | html %]</a>
80 <a name="[% supplier.booksellerid | html %]" href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% supplier.booksellerid | uri %]">NO NAME</a>
84 [% IF ( CAN_user_acquisition_order_manage ) %]
85 [% IF ( supplier.active ) %]
86 <a class="btn btn-default btn-sm" href="/cgi-bin/koha/acqui/basketheader.pl?booksellerid=[% supplier.booksellerid | uri %]&op=add_form"><i class="fa fa-plus"></i> New basket</a>
91 [% IF ( supplier.loop_basket.size ) %]
92 <a class="btn btn-default btn-sm" href="/cgi-bin/koha/acqui/parcels.pl?booksellerid=[% supplier.booksellerid | uri %]"><i class="fa fa-inbox"></i> Receive shipment</a>
96 [% IF ( supplier.loop_basket.size ) %]
97 <table class="baskets">
102 <th class="title-numeric">Item count</th>
103 <th class="title-numeric">Bibliographic record count</th>
104 <th>Items expected</th>
105 <th>[% tp('basket created by', 'Created by') | html %]</th>
106 <th class="title-string">Date</th>
107 <th>Basket group</th>
108 <th class="title-string">Closed</th>
109 <th class="noExport">Actions</th>
113 [% FOREACH basket IN supplier.loop_basket %]
114 [% IF ( basket.uncertainprices ) %]
119 <td>[% basket.basketno | html %]</td>
120 <td><a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basket.basketno | uri %]">[% basket.basketname | html %]</a></td>
122 <span title="[% basket.total_items | html %]">[% basket.total_items | html %]
123 [% IF basket.total_items_cancelled %]
124 ([% basket.total_items_cancelled | html %] cancelled)
129 <span title="[% basket.total_biblios | html %]">[% basket.total_biblios | html %]
130 [% IF basket.total_biblios_cancelled %]
131 ([% basket.total_biblios_cancelled | html %] cancelled)
135 <td>[% basket.expected_items | html %]</td>
137 [% IF basket.authorisedby %]
138 [% basket.authorisedby.firstname | html %]
139 [% basket.authorisedby.surname | html %]
142 <td><span title="[% basket.creationdate | html %]">[% basket.creationdate | $KohaDates %]</span></td>
144 [% IF basket.basketgroup %]
145 [% basketgroup = basket.basketgroup %]
146 [% IF basketgroup.closed %]
147 [% basketgroup.name | html %] (closed)
149 <a href="/cgi-bin/koha/acqui/basketgroup.pl?op=add&booksellerid=[% basket.booksellerid | uri %]&basketgroupid=[% basketgroup.id | uri %]">[% basketgroup.name | html %]</a>
154 [% IF ( basket.closedate ) %]
155 <span title="[% basket.closedate | html %]">[% basket.closedate | $KohaDates %]</span>
157 <span title="9999-99-99"></span>
161 [% IF not basket.closedate and supplier.active %]
162 [% IF basket.uncertainprices OR ( basket.total_items && !basket.is_standing ) %]
164 <div class="btn-group">
165 [%# There should be no space between these two buttons, it would render badly %]
166 <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><a class="btn btn-default btn-xs dropdown-toggle" id="basketactions[% basket.basknetno | html %]" role="button" data-toggle="dropdown" href="#"><b class="caret"></b></a>
167 <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="basketactions[% basketn.basketno | html %]">
168 [% IF basket.uncertainprices %]
169 <li><a href="/cgi-bin/koha/acqui/uncertainprice.pl?booksellerid=[% basket.booksellerid | uri %]&owner=1"><i class="fa fa-usd"></i> Uncertain prices</a></li>
170 [% ELSIF basket.total_items && !basket.is_standing %]
171 <li><a href="/cgi-bin/koha/acqui/basket.pl?op=close&basketno=[% basket.basketno | uri %]&booksellerid=[% basket.booksellerid | uri %]"><i class="fa fa-times-circle"></i> Close this basket</a></li>
177 <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>
180 <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 %]">
181 <div class="modal-dialog">
182 <div class="modal-content">
183 <div class="modal-body">
184 [% INCLUDE 'acquisitions-add-to-basket.inc' booksellerid=supplier.booksellerid basketno=basket.basketno %]
186 <div class="modal-footer">
187 <a href="#" class="cancel" data-dismiss="modal" aria-hidden="true">Cancel</a>
195 [% END %][%# FOREACH basket IN supplier.loop_basket %]
200 <p>No pending baskets</p>
201 [% END %][%# IF ( supplier.loop_basket.size ) %]
204 [% END %][%# FOREACH supplier IN loop_suppliers %]
206 [% END %][%# IF ( loop_suppliers.size ) %]
208 </div> <!-- /.col-sm-10.col-sm-push-2 -->
209 <div class="col-sm-2 col-sm-pull-10">
211 [% IF ( booksellerid ) %]
212 [% INCLUDE 'vendor-menu.inc' %]
214 [% INCLUDE 'acquisitions-menu.inc' %]
217 </div> <!-- /.row -->
219 [% MACRO jsinclude BLOCK %]
220 [% Asset.js("js/acquisitions-menu.js") | $raw %]
221 [% INCLUDE 'datatables.inc' %]
222 [% Asset.js("js/acq.js") | $raw %]
224 $(document).ready(function() {
225 $("table.baskets").dataTable($.extend(true, {}, dataTablesDefaults, {
230 "aaSorting": [[ 1, "asc" ]],
232 { "sType": "title-string", "aTargets" : [ "title-string" ] },
233 { "sType": "title-numeric", "aTargets" : [ "title-numeric" ] },
234 { 'aTargets': [-1], 'bSortable': false }
237 $("#supplierlist").change(function() {
238 var id = $(this).find("option:selected").val();
239 window.location.href = "#" + id;
241 $(".modal").on("show", function(){
242 var basket = $(this).data("basketno");
243 var legend = _("Add order to basket %s").format(basket);
244 $(this).find("legend").html(legend);
246 $("#show_all_vendors").hide();
247 $("#show_active_vendors").on('click', function(e){
249 $(".inactive").hide();
250 $("#show_active_vendors").hide();
251 $("#show_all_vendors").show();
253 $("#show_all_vendors").on('click', function(e){
255 $(".inactive").show();
256 $("#show_all_vendors").hide();
257 $("#show_active_vendors").show();
263 [% INCLUDE 'intranet-bottom.inc' %]