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">
103 <th>Bibliographic record count</th>
104 <th>Items expected</th>
105 <th>[% tp('basket created by', 'Created by') | html %]</th>
107 <th>Basket group</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>
121 <td data-order="[% basket.total_items | html %]">
122 [% basket.total_items | html %]
123 [% IF basket.total_items_cancelled %]
124 ([% basket.total_items_cancelled | html %] cancelled)
127 <td data-order="[% basket.total_biblios | html %]">
128 [% basket.total_biblios | html %]
129 [% IF basket.total_biblios_cancelled %]
130 ([% basket.total_biblios_cancelled | html %] cancelled)
133 <td>[% basket.expected_items | html %]</td>
135 [% IF basket.authorisedby %]
136 [% basket.authorisedby.firstname | html %]
137 [% basket.authorisedby.surname | html %]
140 <td data-order="[% basket.creationdate | html %]">[% basket.creationdate | $KohaDates %]</td>
142 [% IF basket.basketgroup %]
143 [% basketgroup = basket.basketgroup %]
144 [% IF basketgroup.closed %]
145 [% basketgroup.name | html %] (closed)
147 <a href="/cgi-bin/koha/acqui/basketgroup.pl?op=add&booksellerid=[% basket.booksellerid | uri %]&basketgroupid=[% basketgroup.id | uri %]">[% basketgroup.name | html %]</a>
151 <td data-order="[% basket.closedate | html %]">
152 [% basket.closedate | $KohaDates %]
155 [% IF not basket.closedate and supplier.active %]
156 [% IF basket.uncertainprices OR ( basket.total_items && !basket.is_standing ) %]
158 <div class="btn-group">
159 [%# There should be no space between these two buttons, it would render badly %]
160 <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>
161 <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="basketactions[% basketn.basketno | html %]">
162 [% IF basket.uncertainprices %]
163 <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>
164 [% ELSIF basket.total_items && !basket.is_standing %]
165 <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>
171 <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>
174 <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 %]">
175 <div class="modal-dialog">
176 <div class="modal-content">
177 <div class="modal-body">
178 [% INCLUDE 'acquisitions-add-to-basket.inc' booksellerid=supplier.booksellerid basketno=basket.basketno %]
180 <div class="modal-footer">
181 <a href="#" class="cancel" data-dismiss="modal" aria-hidden="true">Cancel</a>
189 [% END %][%# FOREACH basket IN supplier.loop_basket %]
194 <p>No pending baskets</p>
195 [% END %][%# IF ( supplier.loop_basket.size ) %]
198 [% END %][%# FOREACH supplier IN loop_suppliers %]
200 [% END %][%# IF ( loop_suppliers.size ) %]
202 </div> <!-- /.col-sm-10.col-sm-push-2 -->
203 <div class="col-sm-2 col-sm-pull-10">
205 [% IF ( booksellerid ) %]
206 [% INCLUDE 'vendor-menu.inc' %]
208 [% INCLUDE 'acquisitions-menu.inc' %]
211 </div> <!-- /.row -->
213 [% MACRO jsinclude BLOCK %]
214 [% Asset.js("js/acquisitions-menu.js") | $raw %]
215 [% INCLUDE 'datatables.inc' %]
216 [% Asset.js("js/acq.js") | $raw %]
218 $(document).ready(function() {
219 $("table.baskets").dataTable($.extend(true, {}, dataTablesDefaults, {
224 "aaSorting": [[ 1, "asc" ]],
226 { 'aTargets': [-1], 'bSortable': false }
229 $("#supplierlist").change(function() {
230 var id = $(this).find("option:selected").val();
231 window.location.href = "#" + id;
233 $(".modal").on("show", function(){
234 var basket = $(this).data("basketno");
235 var legend = _("Add order to basket %s").format(basket);
236 $(this).find("legend").html(legend);
238 $("#show_all_vendors").hide();
239 $("#show_active_vendors").on('click', function(e){
241 $(".inactive").hide();
242 $("#show_active_vendors").hide();
243 $("#show_all_vendors").show();
245 $("#show_all_vendors").on('click', function(e){
247 $(".inactive").show();
248 $("#show_all_vendors").hide();
249 $("#show_active_vendors").show();
255 [% INCLUDE 'intranet-bottom.inc' %]