3 [% INCLUDE 'doc-head-open.inc' %]
4 <title>Koha › Basket grouping for [% booksellername |html %]</title>
5 [% Asset.css("css/datatables.css") %]
6 [% INCLUDE 'doc-head-close.inc' %]
7 [% INCLUDE 'datatables.inc' %]
8 [% Asset.js("lib/yui/utilities/utilities.js") %]
9 [% Asset.js("lib/yui/button/button-min.js") %]
10 [% Asset.js("lib/yui/container/container_core-min.js") %]
11 [% Asset.js("lib/yui/menu/menu-min.js") %]
12 [% Asset.js("js/basketgroup.js") %]
14 [% Asset.js("lib/yui/yahoo-dom-event/yahoo-dom-event.js") %]
15 [% Asset.js("lib/yui/animation/animation-min.js") %]
16 [% Asset.js("lib/yui/dragdrop/dragdrop-min.js") %]
17 [% Asset.js("lib/yui/element/element-min.js") %]
18 <style type="text/css">
19 /*margin and padding on body element
20 can introduce errors in determining
21 element position and are not recommended;
22 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 %]">[% booksellername |html %]</a> › <a href="/cgi-bin/koha/acqui/basketgroup.pl?booksellerid=[% booksellerid %]">Basket grouping</a> › Add basket group for [% booksellername |html %]</div>
135 <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid %]">[% booksellername |html %]</a> › Basket grouping</div>
138 <div id="doc3" class="yui-t2">
142 [% IF ( grouping ) %]
144 <div id="toolbar" class="btn-toolbar">
145 <div class="btn-group"><a href="[% script_name %]?op=reopen&basketgroupid=[% basketgroupid %]&booksellerid=[% booksellerid %]&mode=singlebg" class="btn btn-default btn-sm" id="reopenbutton"><i class="fa fa-download"></i> Reopen this basket group</a></div>
146 <div class="btn-group"><a href="[% script_name %]?op=export&basketgroupid=[% basketgroupid %]&booksellerid=[% booksellerid %]" class="btn btn-default btn-sm" id="exportbutton"><i class="fa fa-download"></i> Export this basket group as CSV</a></div>
147 <div class="btn-group"><a href="[% script_name %]?op=print&basketgroupid=[% basketgroupid %]&booksellerid=[% booksellerid %]" class="btn btn-default btn-sm" id="printbutton"><i class="fa fa-download"></i> Print this basket group in PDF</a></div>
148 <div class="btn-group"><a href="[% script_name %]?op=ediprint&basketgroupid=[% basketgroupid %]&booksellerid=[% booksellerid %]" class="btn btn-default btn-sm" id="printbutton"><i class="fa fa-download"></i> Generate EDIFACT order</a></div>
151 [% IF (name && closedbg) %]
152 <h1>Basket group [% name %] ([% basketgroupid %]) for <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid %]">[% booksellername |html %]</a></h1>
154 <h1>Edit basket group [% name %] ([% basketgroupid %]) for <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid %]">[% booksellername |html %]</a></h1>
156 <h1>Add basket group for <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid %]">[% booksellername |html %]</a></h1>
158 <div id="basketgroupcolumns" class="yui-g">
159 [% UNLESS (closedbg) %]
161 <form action="[% scriptname %]" method="post" name="basketgroups" id="basketgroups">
163 <fieldset class="brief">
164 <div class="workarea_alt" >
165 <h3>Ungrouped baskets</h3>
166 <ul id="ungrouped" class="draglist_alt">
168 [% FOREACH basket IN baskets %]
169 <li class="ungrouped" id="b-[% basket.basketno %]" >
170 <a href="basket.pl?basketno=[% basket.basketno %]">
171 [% IF ( basket.basketname ) %]
172 [% basket.basketname %]
174 No name, basketnumber: [% basket.basketno %]
177 Total: [% basket.total %]
178 <input type="hidden" class="basket" name="basket" value="[% basket.basketno %]" />
189 <div class="yui-u first">
190 <form action="" method="post" id="groupingform" onsubmit="return submitForm(this)">
191 <fieldset id="various" class="brief">
193 [% UNLESS (closedbg) %]
195 <label for="basketgroupname">Basket group name:</label>
196 <input type="text" name="basketgroupname" id="basketgroupname" value="[% name %]" class="focus" />
199 <input type="hidden" name="basketgroupname" id="basketgroupname" value="[% name %]" />
202 [% UNLESS (closedbg) %]
203 <label for="billingplace">Billing place:</label>
204 <select name="billingplace" id="billingplace" style="width:13em;">
205 <option value="">--</option>
206 [% PROCESS options_for_libraries libraries => Branches.all( selected => billingplace ) %]
209 <span class="label">Billing place:</span>
210 <input name="billingplace" id="billingplace" type ="hidden" value="[% billingplace %]" />[% Branches.GetName( billingplace ) %]
213 [% UNLESS (closedbg) %]
215 <label for="deliveryplace">Delivery place:</label>
216 <select name="deliveryplace" id="deliveryplace" style="width:13em;">
217 <option value="">--</option>
218 [% PROCESS options_for_libraries libraries => Branches.all( selected => deliveryplace ) %]
223 <label for="freedeliveryplace">Delivery place:</label>
224 <textarea cols="26" rows="3" name="freedeliveryplace" id="freedeliveryplace">[% freedeliveryplace %]</textarea>
228 <span class="label">Delivery place:</span>
229 [% IF (freedeliveryplace) %]
230 <input name="freedeliveryplace" id="freedeliveryplace" type ="hidden" value="[% freedeliveryplace %]" />[% freedeliveryplace %]
231 <input name="deliveryplace" id="deliveryplace" type ="hidden" value="" />
233 <input name="deliveryplace" id="deliveryplace" type ="hidden" value="[% deliveryplace %]" />[% Branches.GetName( deliveryplace ) %]
234 <input name="freedeliveryplace" id="freedeliveryplace" type ="hidden" value="" />
239 [% UNLESS (closedbg) %]
240 <label for="deliverycomment">Delivery comment:</label>
241 <textarea cols="26" rows="3" name="deliverycomment" id="deliverycomment">[% deliverycomment %]</textarea>
243 <span class="label">Delivery comment:</span>[% deliverycomment %]
244 <input name="deliverycomment" id="deliverycomment" type="hidden" value = "[% deliverycomment %]" />
248 <span class="label">Baskets in this group:</span>
249 [% UNLESS (closedbg) %]
250 <ul class="draglist" id="bg">
254 [% FOREACH selectedbasket IN selectedbaskets %]
255 <li class="grouped" id="b-[% selectedbasket.basketno %]" >
256 <a href="basket.pl?basketno=[% selectedbasket.basketno %]">
257 [% IF ( selectedbasket.basketname ) %]
258 [% selectedbasket.basketname %]
260 No name, basketnumber: [% selectedbasket.basketno %]
263 Total: [% selectedbasket.total %]
264 <input type="hidden" class="basket" name="basket" value="[% selectedbasket.basketno %]" />
269 [% UNLESS (closedbg) %]
270 <li><label><input type="checkbox" id="closedbg" name="closedbg" />Close basket group</label></li>
272 <input type="hidden" id="closedbg" name="closedbg" value ="1"/>
276 [% UNLESS (closedbg) %]
277 <fieldset class="action"><input type="hidden" name="booksellerid" value="[% booksellerid %]" />
278 [% IF ( basketgroupid ) %]
279 <input type="hidden" name="basketgroupid" value="[% basketgroupid %]" />
281 <input type="hidden" name="op" value="attachbasket" />
282 <input type="submit" value="Save" /> <a href="/cgi-bin/koha/acqui/basketgroup.pl?booksellerid=[% booksellerid %]" class="cancel">Cancel</a>
289 <div id="toolbar" class="btn-toolbar">
290 <div class="btn-group"><a href="/cgi-bin/koha/acqui/basketgroup.pl?op=add&booksellerid=[% booksellerid %]" class="btn btn-default btn-sm" id="newbasketgroup"><i class="fa fa-plus"></i> New basket group</a></div>
292 <h1>Basket grouping for <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid %]">[% booksellername |html %]</a></h1>
293 <div id="basket_groups" class="toptabs">
294 <ul class="ui-tabs-nav">
295 [% UNLESS ( listclosed) %]<li class="ui-tabs-active"><a href="#opened">Open</a></li>
296 [% ELSE%]<li><a href="#opened">Open</a></li>[% END %]
297 [% IF ( listclosed) %]<li class="ui-tabs-active"><a href="#closed">Closed</a></li>
298 [% ELSE %]<li><a href="#closed">Closed</a></li>[% END %]
301 <table id="basket_group_opened">
306 <th>Billing place</th>
307 <th>Delivery place</th>
308 <th>Number of baskets</th>
313 [% FOREACH basketgroup IN basketgroups %]
314 [% UNLESS ( basketgroup.closed ) %]
316 <td>[% IF ( basketgroup.name ) %]
317 [% basketgroup.name %]
319 Basket group no. [% basketgroup.id %]
322 <td>[% basketgroup.id %]</td>
323 <td>[% Branches.GetName( basketgroup.billingplace ) %]</td>
324 <td>[% IF (basketgroup.freedeliveryplace) %]Free delivery place[% ELSE %][% Branches.GetName( basketgroup.deliveryplace ) %][% END %]</td>
325 <td>[% basketgroup.basketsqty %]</td>
327 <input type="button" onclick="closeandprint('[% basketgroup.id %]');" value="Close and export as PDF" />
328 <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 %]" /><input type="hidden" name="basketgroupid" value="[% basketgroup.id %]" /><input type="submit" value="Edit" /></form>
329 [% UNLESS basketgroup.basketsqty %]
330 <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 %]" /><input type="hidden" name="basketgroupid" value="[% basketgroup.id %]" /><input type="submit" value="Delete" /></form>
340 <table id="basket_group_closed">
345 <th>Billing place</th>
346 <th>Delivery place</th>
347 <th>Number of baskets</th>
352 [% FOREACH basketgroup IN basketgroups %]
353 [% IF ( basketgroup.closed ) %]
356 [% IF ( basketgroup.name ) %]
357 [% basketgroup.name %]
359 Basket group no. [% basketgroup.id %]
362 <td>[% basketgroup.id %]</td>
363 <td>[% Branches.GetName( basketgroup.billingplace ) %]</td>
364 <td>[% IF (basketgroup.freedeliveryplace) %]Free delivery place[% ELSE %][% Branches.GetName( basketgroup.deliveryplace ) %][% END %]</td>
365 <td>[% basketgroup.basketsqty %]</td>
367 <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 %]" /><input type="hidden" name="basketgroupid" value="[% basketgroup.id %]" /><input type="submit" value="View" /></form>
368 <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 %]" /><input type="hidden" name="basketgroupid" value="[% basketgroup.id %]" /><input type="submit" value="Reopen" /></form>
369 <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 %]" /><input type="submit" value="Export as PDF" /></form>
370 <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 %]" /><input type="submit" value="Export as CSV" /></form>
371 <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 %]" /><input type="submit" value="Generate EDIFACT order" /></form>
384 [% IF ( booksellerid ) %]
385 [% INCLUDE 'vendor-menu.inc' %]
387 [% INCLUDE 'acquisitions-menu.inc' %]
390 [% INCLUDE 'intranet-bottom.inc' %]