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 <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 | uri %]">[% supplier.name | html %]</a>
66 <a name="[% supplier.booksellerid | html %]" href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% supplier.booksellerid | uri %]">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 | uri %]&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 | uri %]"><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>
91 <th>[% tp('basket created by', 'Created by') | html %]</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><a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basket.basketno | uri %]">[% basket.basketname | html %]</a></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 [% IF not basket.closedate and supplier.active %]
148 [% IF basket.uncertainprices OR ( basket.total_items && !basket.is_standing ) %]
150 <div class="btn-group">
151 [%# There should be no space between these two buttons, it would render badly %]
152 <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>
153 <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="basketactions[% basketn.basketno | html %]">
154 [% IF basket.uncertainprices %]
155 <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>
156 [% ELSIF basket.total_items && !basket.is_standing %]
157 <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>
163 <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>
166 <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 %]">
167 <div class="modal-dialog">
168 <div class="modal-content">
169 <div class="modal-body">
170 [% INCLUDE 'acquisitions-add-to-basket.inc' booksellerid=supplier.booksellerid basketno=basket.basketno %]
172 <div class="modal-footer">
173 <a href="#" class="cancel" data-dismiss="modal" aria-hidden="true">Cancel</a>
181 [% END %][%# FOREACH basket IN supplier.loop_basket %]
186 <p>No pending baskets</p>
187 [% END %][%# IF ( supplier.loop_basket.size ) %]
190 [% END %][%# FOREACH supplier IN loop_suppliers %]
192 [% END %][%# IF ( loop_suppliers.size ) %]
194 </div> <!-- /.col-sm-10.col-sm-push-2 -->
195 <div class="col-sm-2 col-sm-pull-10">
197 [% IF ( booksellerid ) %]
198 [% INCLUDE 'vendor-menu.inc' %]
200 [% INCLUDE 'acquisitions-menu.inc' %]
203 </div> <!-- /.row -->
205 [% MACRO jsinclude BLOCK %]
206 [% Asset.js("js/acquisitions-menu.js") | $raw %]
207 [% INCLUDE 'datatables.inc' %]
208 [% Asset.js("js/acq.js") | $raw %]
210 $(document).ready(function() {
211 $("table.baskets").dataTable($.extend(true, {}, dataTablesDefaults, {
216 "aaSorting": [[ 1, "asc" ]],
218 { "sType": "title-string", "aTargets" : [ "title-string" ] },
219 { "sType": "title-numeric", "aTargets" : [ "title-numeric" ] },
220 { 'aTargets': [-1], 'bSortable': false }
223 $("#supplierlist").change(function() {
224 var id = $(this).find("option:selected").val();
225 window.location.href = "#" + id;
227 $(".modal").on("show", function(){
228 var basket = $(this).data("basketno");
229 var legend = _("Add order to basket %s").format(basket);
230 $(this).find("legend").html(legend);
232 $("#show_all_vendors").hide();
233 $("#show_active_vendors").on('click', function(e){
235 $(".inactive").hide();
236 $("#show_active_vendors").hide();
237 $("#show_all_vendors").show();
239 $("#show_all_vendors").on('click', function(e){
241 $(".inactive").show();
242 $("#show_all_vendors").hide();
243 $("#show_active_vendors").show();
249 [% INCLUDE 'intranet-bottom.inc' %]