2 [% INCLUDE 'doc-head-open.inc' %]
3 <title>Koha › Basket grouping for [% booksellername |html %]</title>
4 <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
5 [% INCLUDE 'doc-head-close.inc' %]
6 [% INCLUDE 'datatables.inc' %]
7 <script type="text/javascript" src="[% interface %]/lib/yui/utilities/utilities.js"></script>
8 <script type="text/javascript" src="[% interface %]/lib/yui/button/button-min.js"></script>
9 <script type="text/javascript" src="[% interface %]/lib/yui/container/container_core-min.js"></script>
10 <script type="text/javascript" src="[% interface %]/lib/yui/menu/menu-min.js"></script>
11 <script type="text/javascript" src="[% interface %]/[% theme %]/js/basketgroup.js"></script>
13 <script type="text/javascript" src="[% interface %]/lib/yui/yahoo-dom-event/yahoo-dom-event.js"></script>
14 <script type="text/javascript" src="[% interface %]/lib/yui/animation/animation-min.js"></script>
15 <script type="text/javascript" src="[% interface %]/lib/yui/dragdrop/dragdrop-min.js"></script>
16 <script type="text/javascript" src="[% interface %]/lib/yui/element/element-min.js"></script>
17 <style type="text/css">
18 /*margin and padding on body element
19 can introduce errors in determining
20 element position and are not recommended;
21 we turn them off as a foundation for YUI
37 div.workarea_alt { padding: 5px; float:left; width: 95%;}
38 div.closed { background-color: pink; padding:10px; float:left; width: 45%;}
44 border: 1px inset gray;
58 border: 1px solid gray;
72 background-color: #D1E6EC;
73 border:1px solid #7EA6B2;
78 background-color: #D8D4E2;
79 border:1px solid #6B4C86;
89 <script type="text/javascript">
91 YAHOO.util.Event.onDOMReady(DDApp.init, DDApp, true);
93 var MSG_CONFIRM_CLOSE_BASKETGROUP = _("Are you sure you want to close this basketgroup?");
94 var MSG_CLOSE_EMPTY_BASKET = _("Why close an empty basket?");
95 var MSG_SAVE_BEFORE_PRINTING = _("You need to save the page before printing");
96 var MSG_REOPEN_BASKETGROUP = _("reopen basketgroup");
97 var MSG_FILE_DOWNLOAD_ERROR = _("Error downloading the file");
99 function submitForm(form) {
100 if (form.close.checked == true) {
101 var input = document.createElement("input");
102 input.setAttribute("type", "hidden");
103 input.setAttribute("name", "closed");
104 input.setAttribute("value", "1");
105 form.appendChild(input);
109 $(document).ready(function() {
110 $("#basket_groups").tabs();
112 $("table").dataTable($.extend(true, {}, dataTablesDefaults, {
114 { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
117 "sPaginationType": "four_button"
126 <body id="acq_basketgroup" class="acq">
127 [% INCLUDE 'header.inc' %]
128 [% INCLUDE 'acquisitions-search.inc' %]
130 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> ›
131 [% IF ( grouping ) %]
132 <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>
134 <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid %]">[% booksellername |html %]</a> › Basket grouping</div>
137 <div id="doc3" class="yui-t2">
141 [% IF ( grouping ) %]
143 <div id="toolbar" class="btn-toolbar">
144 <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>
145 <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>
146 <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>
147 [% IF (ediaccount) %]
148 <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>
152 [% IF (name && closedbg) %]
153 <h1>Basket group [% name %] ([% basketgroupid %]) for <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid %]">[% booksellername |html %]</a></h1>
155 <h1>Edit basket group [% name %] ([% basketgroupid %]) for <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid %]">[% booksellername |html %]</a></h1>
157 <h1>Add basket group for <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid %]">[% booksellername |html %]</a></h1>
159 <div id="basketgroupcolumns" class="yui-g">
160 [% UNLESS (closedbg) %]
162 <form action="[% scriptname %]" method="post" name="basketgroups" id="basketgroups">
164 <fieldset class="brief">
165 <div class="workarea_alt" >
166 <h3>Ungrouped baskets</h3>
167 <ul id="ungrouped" class="draglist_alt">
169 [% FOREACH basket IN baskets %]
170 <li class="ungrouped" id="b-[% basket.basketno %]" >
171 <a href="basket.pl?basketno=[% basket.basketno %]">
172 [% IF ( basket.basketname ) %]
173 [% basket.basketname %]
175 No name, basketnumber: [% basket.basketno %]
178 Total: [% basket.total %]
179 <input type="hidden" class="basket" name="basket" value="[% basket.basketno %]" />
190 <div class="yui-u first">
191 <form action="" method="post" id="groupingform" onsubmit="return submitForm(this)">
192 <fieldset id="various" class="brief">
194 [% UNLESS (closedbg) %]
196 <label for="basketgroupname">Basket group name:</label>
197 <input type="text" name="basketgroupname" id="basketgroupname" value="[% name %]" class="focus" />
200 <input type="hidden" name="basketgroupname" id="basketgroupname" value="[% name %]" />
203 [% UNLESS (closedbg) %]
204 <label for="billingplace">Billing place:</label>
205 <select name="billingplace" id="billingplace" style="width:13em;">
206 <option value="">--</option>
207 [% PROCESS options_for_libraries libraries => Branches.all( selected => billingplace ) %]
210 <span class="label">Billing place:</span>
211 <input name="billingplace" id="billingplace" type ="hidden" value="[% billingplace %]" />[% Branches.GetName( billingplace ) %]
214 [% UNLESS (closedbg) %]
216 <label for="deliveryplace">Delivery place:</label>
217 <select name="deliveryplace" id="deliveryplace" style="width:13em;">
218 <option value="">--</option>
219 [% PROCESS options_for_libraries libraries => Branches.all( selected => deliveryplace ) %]
224 <label for="freedeliveryplace">Delivery place:</label>
225 <textarea cols="26" rows="3" name="freedeliveryplace" id="freedeliveryplace">[% freedeliveryplace %]</textarea>
229 <span class="label">Delivery place:</span>
230 [% IF (freedeliveryplace) %]
231 <input name="freedeliveryplace" id="freedeliveryplace" type ="hidden" value="[% freedeliveryplace %]" />[% freedeliveryplace %]
232 <input name="deliveryplace" id="deliveryplace" type ="hidden" value="" />
234 <input name="deliveryplace" id="deliveryplace" type ="hidden" value="[% deliveryplace %]" />[% Branches.GetName( deliveryplace ) %]
235 <input name="freedeliveryplace" id="freedeliveryplace" type ="hidden" value="" />
240 [% UNLESS (closedbg) %]
241 <label for="deliverycomment">Delivery comment:</label>
242 <textarea cols="26" rows="3" name="deliverycomment" id="deliverycomment">[% deliverycomment %]</textarea>
244 <span class="label">Delivery comment:</span>[% deliverycomment %]
245 <input name="deliverycomment" id="deliverycomment" type="hidden" value = "[% deliverycomment %]" />
249 <span class="label">Baskets in this group:</span>
250 [% UNLESS (closedbg) %]
251 <ul class="draglist" id="bg">
255 [% FOREACH selectedbasket IN selectedbaskets %]
256 <li class="grouped" id="b-[% selectedbasket.basketno %]" >
257 <a href="basket.pl?basketno=[% selectedbasket.basketno %]">
258 [% IF ( selectedbasket.basketname ) %]
259 [% selectedbasket.basketname %]
261 No name, basketnumber: [% selectedbasket.basketno %]
264 Total: [% selectedbasket.total %]
265 <input type="hidden" class="basket" name="basket" value="[% selectedbasket.basketno %]" />
270 [% UNLESS (closedbg) %]
271 <li><label><input type="checkbox" id="closedbg" name="closedbg" />Close basket group</label></li>
273 <input type="hidden" id="closedbg" name="closedbg" value ="1"/>
277 [% UNLESS (closedbg) %]
278 <fieldset class="action"><input type="hidden" name="booksellerid" value="[% booksellerid %]" />
279 [% IF ( basketgroupid ) %]
280 <input type="hidden" name="basketgroupid" value="[% basketgroupid %]" />
282 <input type="hidden" name="op" value="attachbasket" />
283 <input type="submit" value="Save" /> <a href="/cgi-bin/koha/acqui/basketgroup.pl?booksellerid=[% booksellerid %]" class="cancel">Cancel</a>
290 <div id="toolbar" class="btn-toolbar">
291 <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>
293 <h1>Basket grouping for <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid | uri %]">[% booksellername | html %]</a></h1>
294 [% IF (NoEDIMessage) %]<div><strong>No EDIFACT configuration for [% booksellername | html %]</strong></div>[% END %]
295 <div id="basket_groups" class="toptabs">
296 <ul class="ui-tabs-nav">
297 [% UNLESS ( listclosed) %]<li class="ui-tabs-active"><a href="#opened">Open</a></li>
298 [% ELSE%]<li><a href="#opened">Open</a></li>[% END %]
299 [% IF ( listclosed) %]<li class="ui-tabs-active"><a href="#closed">Closed</a></li>
300 [% ELSE %]<li><a href="#closed">Closed</a></li>[% END %]
303 <table id="basket_group_opened">
308 <th>Billing place</th>
309 <th>Delivery place</th>
310 <th>Number of baskets</th>
315 [% FOREACH basketgroup IN basketgroups %]
316 [% UNLESS ( basketgroup.closed ) %]
318 <td>[% IF ( basketgroup.name ) %]
319 [% basketgroup.name %]
321 Basket group no. [% basketgroup.id %]
324 <td>[% basketgroup.id %]</td>
325 <td>[% Branches.GetName( basketgroup.billingplace ) %]</td>
326 <td>[% IF (basketgroup.freedeliveryplace) %]Free delivery place[% ELSE %][% Branches.GetName( basketgroup.deliveryplace ) %][% END %]</td>
327 <td>[% basketgroup.basketsqty %]</td>
329 <input type="button" onclick="closeandprint('[% basketgroup.id %]');" value="Close and export as PDF" />
330 <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>
331 [% UNLESS basketgroup.basketsqty %]
332 <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>
342 <table id="basket_group_closed">
347 <th>Billing place</th>
348 <th>Delivery place</th>
349 <th>Number of baskets</th>
354 [% FOREACH basketgroup IN basketgroups %]
355 [% IF ( basketgroup.closed ) %]
358 [% IF ( basketgroup.name ) %]
359 [% basketgroup.name %]
361 Basket group no. [% basketgroup.id %]
364 <td>[% basketgroup.id %]</td>
365 <td>[% Branches.GetName( basketgroup.billingplace ) %]</td>
366 <td>[% IF (basketgroup.freedeliveryplace) %]Free delivery place[% ELSE %][% Branches.GetName( basketgroup.deliveryplace ) %][% END %]</td>
367 <td>[% basketgroup.basketsqty %]</td>
369 <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>
370 <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>
371 <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>
372 <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>
373 [% IF (ediaccount) %]
374 <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>
376 <div>No EDIFACT configuration for [% booksellername | html %]</div>
390 [% IF ( booksellerid ) %]
391 [% INCLUDE 'vendor-menu.inc' %]
393 [% INCLUDE 'acquisitions-menu.inc' %]
396 [% INCLUDE 'intranet-bottom.inc' %]