5 [% INCLUDE 'doc-head-open.inc' %]
6 <title>Koha › Basket grouping for [% booksellername | html %]</title>
7 [% Asset.css("css/datatables.css") | $raw %]
8 [% INCLUDE 'doc-head-close.inc' %]
9 [% INCLUDE 'datatables.inc' %]
10 [% Asset.js("lib/yui/utilities/utilities.js") | $raw %]
11 [% Asset.js("lib/yui/button/button-min.js") | $raw %]
12 [% Asset.js("lib/yui/container/container_core-min.js") | $raw %]
13 [% Asset.js("lib/yui/menu/menu-min.js") | $raw %]
14 [% Asset.js("js/basketgroup.js") | $raw %]
16 [% Asset.js("lib/yui/yahoo-dom-event/yahoo-dom-event.js") | $raw %]
17 [% Asset.js("lib/yui/animation/animation-min.js") | $raw %]
18 [% Asset.js("lib/yui/dragdrop/dragdrop-min.js") | $raw %]
19 [% Asset.js("lib/yui/element/element-min.js") | $raw %]
20 <style type="text/css">
21 /*margin and padding on body element
22 can introduce errors in determining
23 element position and are not recommended;
24 we turn them off as a foundation for YUI
38 div.workarea_alt { padding: 5px; float:left; width: 95%;}
39 div.closed { background-color: pink; padding:10px; float:left; width: 45%;}
45 border: 1px inset gray;
59 border: 1px solid gray;
73 background-color: #D1E6EC;
74 border:1px solid #7EA6B2;
79 background-color: #D8D4E2;
80 border:1px solid #6B4C86;
90 <script type="text/javascript">
92 YAHOO.util.Event.onDOMReady(DDApp.init, DDApp, true);
94 var MSG_CONFIRM_CLOSE_BASKETGROUP = _("Are you sure you want to close this basketgroup?");
95 var MSG_CLOSE_EMPTY_BASKET = _("Why close an empty basket?");
96 var MSG_SAVE_BEFORE_PRINTING = _("You need to save the page before printing");
97 var MSG_REOPEN_BASKETGROUP = _("reopen basketgroup");
98 var MSG_FILE_DOWNLOAD_ERROR = _("Error downloading the file");
100 function submitForm(form) {
101 if (form.close.checked == true) {
102 var input = document.createElement("input");
103 input.setAttribute("type", "hidden");
104 input.setAttribute("name", "closed");
105 input.setAttribute("value", "1");
106 form.appendChild(input);
110 $(document).ready(function() {
111 $("#basket_groups").tabs();
113 $("table").dataTable($.extend(true, {}, dataTablesDefaults, {
115 { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
118 "sPaginationType": "four_button"
127 <body id="acq_basketgroup" class="acq">
128 [% INCLUDE 'header.inc' %]
129 [% INCLUDE 'acquisitions-search.inc' %]
131 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> ›
132 [% IF ( grouping ) %]
133 <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid | html %]">[% booksellername | html %]</a> › <a href="/cgi-bin/koha/acqui/basketgroup.pl?booksellerid=[% booksellerid | html %]">Basket grouping</a> › Add basket group for [% booksellername | html %]</div>
135 <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid | html %]">[% booksellername | html %]</a> › Basket grouping</div>
139 <div class="main container-fluid">
141 <div class="col-sm-10 col-sm-push-2">
144 [% IF ( grouping ) %]
146 <div id="toolbar" class="btn-toolbar">
147 <div class="btn-group"><a href="[% script_name | uri %]?op=reopen&basketgroupid=[% basketgroupid | uri %]&booksellerid=[% booksellerid | uri %]&mode=singlebg" class="btn btn-default btn-sm" id="reopenbutton"><i class="fa fa-download"></i> Reopen this basket group</a></div>
148 <div class="btn-group"><a href="[% script_name | uri %]?op=export&basketgroupid=[% basketgroupid | uri %]&booksellerid=[% booksellerid | uri %]" class="btn btn-default btn-sm" id="exportbutton"><i class="fa fa-download"></i> Export this basket group as CSV</a></div>
149 <div class="btn-group"><a href="[% script_name | uri %]?op=print&basketgroupid=[% basketgroupid | uri %]&booksellerid=[% booksellerid | uri %]" class="btn btn-default btn-sm" id="printbutton"><i class="fa fa-download"></i> Print this basket group in PDF</a></div>
150 [% IF (ediaccount) %]
151 <div class="btn-group"><a href="[% script_name | uri %]?op=ediprint&basketgroupid=[% basketgroupid | uri %]&booksellerid=[% booksellerid | uri %]" class="btn btn-default btn-sm" id="printbutton"><i class="fa fa-download"></i> Generate EDIFACT order</a></div>
155 [% IF (name && closedbg) %]
156 <h1>Basket group [% name | html %] ([% basketgroupid | html %]) for <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid | html %]">[% booksellername | html %]</a></h1>
158 <h1>Edit basket group [% name | html %] ([% basketgroupid | html %]) for <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid | html %]">[% booksellername | html %]</a></h1>
160 <h1>Add basket group for <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid | html %]">[% booksellername | html %]</a></h1>
162 <div id="basketgroupcolumns" class="row">
163 [% UNLESS (closedbg) %]
164 <div class="col-xs-6 col-xs-push-6">
165 <form action="[% scriptname | html %]" method="post" name="basketgroups" id="basketgroups">
167 <fieldset class="brief">
168 <div class="workarea_alt" >
169 <h3>Ungrouped baskets</h3>
170 <ul id="ungrouped" class="draglist_alt">
172 [% FOREACH basket IN baskets %]
173 <li class="ungrouped" id="b-[% basket.basketno | html %]" >
174 <a href="basket.pl?basketno=[% basket.basketno | html %]">
175 [% IF ( basket.basketname ) %]
176 [% basket.basketname | html %]
178 No name, basketnumber: [% basket.basketno | html %]
181 Total: [% basket.total | $Price | html %]
182 <input type="hidden" class="basket" name="basket" value="[% basket.basketno | html %]" />
193 [% IF ( closedbg ) %]
194 <div class="col-xs-12">
196 <div class="col-xs-6 col-xs-pull-6">
198 <form action="" method="post" id="groupingform" onsubmit="return submitForm(this)">
199 <fieldset id="various" class="brief">
201 [% UNLESS (closedbg) %]
203 <label for="basketgroupname">Basket group name:</label>
204 <input type="text" name="basketgroupname" id="basketgroupname" value="[% name | html %]" class="focus" />
207 <input type="hidden" name="basketgroupname" id="basketgroupname" value="[% name | html %]" />
210 [% UNLESS (closedbg) %]
211 <label for="billingplace">Billing place:</label>
212 <select name="billingplace" id="billingplace">
213 <option value="">--</option>
214 [% PROCESS options_for_libraries libraries => Branches.all( selected => billingplace ) %]
217 <span class="label">Billing place:</span>
218 <input name="billingplace" id="billingplace" type ="hidden" value="[% billingplace | html %]" />[% Branches.GetName( billingplace ) | html %]
221 [% UNLESS (closedbg) %]
223 <label for="deliveryplace">Delivery place:</label>
224 <select name="deliveryplace" id="deliveryplace">
225 <option value="">--</option>
226 [% PROCESS options_for_libraries libraries => Branches.all( selected => deliveryplace ) %]
231 <label for="freedeliveryplace">Delivery place:</label>
232 <textarea cols="26" rows="3" name="freedeliveryplace" id="freedeliveryplace">[% freedeliveryplace | html %]</textarea>
236 <span class="label">Delivery place:</span>
237 [% IF (freedeliveryplace) %]
238 <input name="freedeliveryplace" id="freedeliveryplace" type ="hidden" value="[% freedeliveryplace | html %]" />[% freedeliveryplace | html %]
239 <input name="deliveryplace" id="deliveryplace" type ="hidden" value="" />
241 <input name="deliveryplace" id="deliveryplace" type ="hidden" value="[% deliveryplace | html %]" />[% Branches.GetName( deliveryplace ) | html %]
242 <input name="freedeliveryplace" id="freedeliveryplace" type ="hidden" value="" />
247 [% UNLESS (closedbg) %]
248 <label for="deliverycomment">Delivery comment:</label>
249 <textarea cols="26" rows="3" name="deliverycomment" id="deliverycomment">[% deliverycomment | html %]</textarea>
251 <span class="label">Delivery comment:</span>[% deliverycomment | html %]
252 <input name="deliverycomment" id="deliverycomment" type="hidden" value = "[% deliverycomment | html %]" />
256 <span class="label">Baskets in this group:</span>
257 [% UNLESS (closedbg) %]
258 <ul class="draglist" id="bg">
262 [% FOREACH selectedbasket IN selectedbaskets %]
263 <li class="grouped" id="b-[% selectedbasket.basketno | html %]" >
264 <a href="basket.pl?basketno=[% selectedbasket.basketno | html %]">
265 [% IF ( selectedbasket.basketname ) %]
266 [% selectedbasket.basketname | html %]
268 No name, basketnumber: [% selectedbasket.basketno | html %]
271 Total: [% selectedbasket.total | $Price | html %]
272 <input type="hidden" class="basket" name="basket" value="[% selectedbasket.basketno | html %]" />
277 [% UNLESS (closedbg) %]
278 <li><label><input type="checkbox" id="closedbg" name="closedbg" />Close basket group</label></li>
280 <input type="hidden" id="closedbg" name="closedbg" value ="1"/>
284 [% UNLESS (closedbg) %]
285 <fieldset class="action"><input type="hidden" name="booksellerid" value="[% booksellerid | html %]" />
286 [% IF ( basketgroupid ) %]
287 <input type="hidden" name="basketgroupid" value="[% basketgroupid | html %]" />
289 <input type="hidden" name="op" value="attachbasket" />
290 <input type="submit" value="Save" /> <a href="/cgi-bin/koha/acqui/basketgroup.pl?booksellerid=[% booksellerid | html %]" class="cancel">Cancel</a>
297 <div id="toolbar" class="btn-toolbar">
298 <div class="btn-group"><a href="/cgi-bin/koha/acqui/basketgroup.pl?op=add&booksellerid=[% booksellerid | html %]" class="btn btn-default btn-sm" id="newbasketgroup"><i class="fa fa-plus"></i> New basket group</a></div>
300 <h1>Basket grouping for <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid | uri %]">[% booksellername | html %]</a></h1>
301 [% IF (NoEDIMessage) %]<div><strong>No EDIFACT configuration for [% booksellername | html %]</strong></div>[% END %]
302 <div id="basket_groups" class="toptabs">
303 <ul class="ui-tabs-nav">
304 [% UNLESS ( listclosed) %]<li class="ui-tabs-active"><a href="#opened">Open</a></li>
305 [% ELSE%]<li><a href="#opened">Open</a></li>[% END %]
306 [% IF ( listclosed) %]<li class="ui-tabs-active"><a href="#closed">Closed</a></li>
307 [% ELSE %]<li><a href="#closed">Closed</a></li>[% END %]
310 <table id="basket_group_opened">
315 <th>Billing place</th>
316 <th>Delivery place</th>
317 <th>Number of baskets</th>
322 [% FOREACH basketgroup IN basketgroups %]
323 [% UNLESS ( basketgroup.closed ) %]
325 <td>[% IF ( basketgroup.name ) %]
326 [% basketgroup.name | html %]
328 Basket group no. [% basketgroup.id | html %]
331 <td>[% basketgroup.id | html %]</td>
332 <td>[% Branches.GetName( basketgroup.billingplace ) | html %]</td>
333 <td>[% IF (basketgroup.freedeliveryplace) %]Free delivery place[% ELSE %][% Branches.GetName( basketgroup.deliveryplace ) | html %][% END %]</td>
334 <td>[% basketgroup.basketsqty | html %]</td>
336 <input type="button" onclick="closeandprint('[% basketgroup.id | html %]');" value="Close and export as PDF" />
337 <form action="/cgi-bin/koha/acqui/basketgroup.pl" method="get"><input type="hidden" name="op" value="add" /><input type="hidden" name="booksellerid" value="[% basketgroup.booksellerid | html %]" /><input type="hidden" name="basketgroupid" value="[% basketgroup.id | html %]" /><input type="submit" value="Edit" /></form>
338 [% UNLESS basketgroup.basketsqty %]
339 <form action="/cgi-bin/koha/acqui/basketgroup.pl" method="get"><input type="hidden" name="op" value="delete" /><input type="hidden" name="booksellerid" value="[% basketgroup.booksellerid | html %]" /><input type="hidden" name="basketgroupid" value="[% basketgroup.id | html %]" /><input type="submit" value="Delete" /></form>
349 <table id="basket_group_closed">
354 <th>Billing place</th>
355 <th>Delivery place</th>
356 <th>Number of baskets</th>
361 [% FOREACH basketgroup IN basketgroups %]
362 [% IF ( basketgroup.closed ) %]
365 [% IF ( basketgroup.name ) %]
366 [% basketgroup.name | html %]
368 Basket group no. [% basketgroup.id | html %]
371 <td>[% basketgroup.id | html %]</td>
372 <td>[% Branches.GetName( basketgroup.billingplace ) | html %]</td>
373 <td>[% IF (basketgroup.freedeliveryplace) %]Free delivery place[% ELSE %][% Branches.GetName( basketgroup.deliveryplace ) | html %][% END %]</td>
374 <td>[% basketgroup.basketsqty | html %]</td>
376 <form action="/cgi-bin/koha/acqui/basketgroup.pl" method="get"><input type="hidden" name="op" value="add" /><input type="hidden" name="booksellerid" value="[% basketgroup.booksellerid | html %]" /><input type="hidden" name="basketgroupid" value="[% basketgroup.id | html %]" /><input type="submit" value="View" /></form>
377 <form action="/cgi-bin/koha/acqui/basketgroup.pl" method="get"><input type="hidden" name="op" value="reopen" /><input type="hidden" name="booksellerid" value="[% basketgroup.booksellerid | html %]" /><input type="hidden" name="basketgroupid" value="[% basketgroup.id | html %]" /><input type="submit" value="Reopen" /></form>
378 <form action="/cgi-bin/koha/acqui/basketgroup.pl" method="get"><input type="hidden" name="op" value="print" /><input type="hidden" name="basketgroupid" value="[% basketgroup.id | html %]" /><input type="submit" value="Export as PDF" /></form>
379 <form action="/cgi-bin/koha/acqui/basketgroup.pl" method="get"><input type="hidden" name="op" value="export" /><input type="hidden" name="basketgroupid" value="[% basketgroup.id | html %]" /><input type="submit" value="Export as CSV" /></form>
380 [% IF (ediaccount) %]
381 <form action="/cgi-bin/koha/acqui/basketgroup.pl" method="get"><input type="hidden" name="op" value="ediprint" /><input type="hidden" name="basketgroupid" value="[% basketgroup.id | html %]" /><input type="submit" value="Generate EDIFACT order" /></form>
383 <div>No EDIFACT configuration for [% booksellername | html %]</div>
395 </div> <!-- /.col-sm-10.col-sm-push-2 -->
397 <div class="col-sm-2 col-sm-pull-10">
399 [% IF ( booksellerid ) %]
400 [% INCLUDE 'vendor-menu.inc' %]
402 [% INCLUDE 'acquisitions-menu.inc' %]
405 </div> <!-- /.row -->
406 [% INCLUDE 'intranet-bottom.inc' %]