1 [% USE KohaBranchName %]
2 [% INCLUDE 'doc-head-open.inc' %]
3 <title>Koha › Basket grouping for [% booksellername |html %]</title>
4 <link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
5 [% INCLUDE 'doc-head-close.inc' %]
6 <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.dataTables.min.js"></script>
7 [% INCLUDE 'datatables-strings.inc' %]
8 <script type="text/javascript" src="[% themelang %]/js/datatables.js"></script>
9 <script type="text/javascript" src="[% yuipath %]/utilities/utilities.js"></script>
10 <script type="text/javascript" src="[% yuipath %]/button/button-min.js"></script>
11 <script type="text/javascript" src="[% yuipath %]/container/container_core-min.js"></script>
12 <script type="text/javascript" src="[% yuipath %]/menu/menu-min.js"></script>
13 <script type="text/javascript" src="[% themelang %]/js/acq.js"></script>
15 <script type="text/javascript" src="[% yuipath %]/yahoo-dom-event/yahoo-dom-event.js"></script>
16 <script type="text/javascript" src="[% yuipath %]/animation/animation-min.js"></script>
17 <script type="text/javascript" src="[% yuipath %]/dragdrop/dragdrop-min.js"></script>
18 <script type="text/javascript" src="[% yuipath %]/element/element-min.js"></script>
19 <style type="text/css">
20 /*margin and padding on body element
21 can introduce errors in determining
22 element position and are not recommended;
23 we turn them off as a foundation for YUI
43 div.workarea_alt { padding: 5px; float:left; width: 95%;}
44 div.closed { background-color: pink; padding:10px; float:left; width: 45%;}
50 border: 1px inset gray;
64 border: 1px solid gray;
78 background-color: #D1E6EC;
79 border:1px solid #7EA6B2;
84 background-color: #D8D4E2;
85 border:1px solid #6B4C86;
95 <script type="text/javascript">
97 YAHOO.util.Event.onDOMReady(DDApp.init, DDApp, true);
99 var MSG_CONFIRM_CLOSE_BASKETGROUP = _("Are you sure you want to close this basketgroup?");
100 var MSG_CLOSE_EMPTY_BASKET = _("Why close an empty basket?");
101 var MSG_SAVE_BEFORE_PRINTING = _("You need to save the page before printing");
102 var MSG_REOPEN_BASKETGROUP = _("reopen basketgroup");
103 var MSG_FILE_DOWNLOAD_ERROR = _("Error downloading the file");
105 function submitForm(form) {
106 if (form.close.checked == true) {
107 var input = document.createElement("input");
108 input.setAttribute("type", "hidden");
109 input.setAttribute("name", "closed");
110 input.setAttribute("value", "1");
111 form.appendChild(input);
115 $(document).ready(function() {
116 $("#basket_groups").tabs();
118 $("table").dataTable($.extend(true, {}, dataTablesDefaults, {
120 { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
132 <body id="acq_basketgroup" class="acq">
133 [% INCLUDE 'header.inc' %]
134 [% INCLUDE 'acquisitions-search.inc' %]
136 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> ›
137 [% IF ( grouping ) %]
138 <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>
140 <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid %]">[% booksellername |html %]</a> › Basket grouping</div>
143 <div id="doc3" class="yui-t2">
148 [% IF ( grouping ) %]
149 <h1>Add basket group for <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid %]">[% booksellername |html %]</a></h1>
150 <div id="basketgroupcolumns" class="yui-g">
153 <form action="[% scriptname %]" method="post" name="basketgroups" id="basketgroups">
155 <fieldset class="brief">
156 <div class="workarea_alt" >
157 <h3>Ungrouped baskets</h3>
158 <ul id="ungrouped" class="draglist_alt">
160 [% FOREACH basket IN baskets %]
161 <li class="ungrouped" id="b-[% basket.basketno %]" >
162 <a href="basket.pl?basketno=[% basket.basketno %]">
163 [% IF ( basket.basketname ) %]
164 [% basket.basketname %]
166 No name, basketnumber: [% basket.basketno %]
169 Total: [% basket.total %]
170 <input type="hidden" class="basket" name="basket" value="[% basket.basketno %]" />
182 <div class="yui-u first">
183 <form action="" method="post" id="groupingform" onsubmit="return submitForm(this)">
184 <fieldset id="various" class="brief">
186 <li><label for="basketgroupname">Basket group name:</label>
187 <input type="text" name="basketgroupname" id="basketgroupname" value="[% name %]" /></li>
188 <li><label for="billingplace">Billing place:</label>
189 <select name="billingplace" id="billingplace" style="width:13em;">
190 <option value="">--</option>
191 [% FOREACH billingplaceloo IN billingplaceloop %]
192 [% IF ( billingplaceloo.selected ) %]<option value="[% billingplaceloo.value %]" selected="selected">[% billingplaceloo.branchname %]</option>
193 [% ELSE %]<option value="[% billingplaceloo.value %]">[% billingplaceloo.branchname %]</option>[% END%]
196 <li><label for="deliveryplace">Delivery place:</label>
197 <select name="deliveryplace" id="deliveryplace" style="width:13em;">
198 <option value="">--</option>
199 [% FOREACH deliveryplaceloo IN deliveryplaceloop %]
200 [% IF ( deliveryplaceloo.selected ) %]<option value="[% deliveryplaceloo.value %]" selected="selected">[% deliveryplaceloo.branchname %]</option>
201 [% ELSE %]<option value="[% deliveryplaceloo.value %]">[% deliveryplaceloo.branchname %]</option>[% END %]
205 <li><label for="freedeliveryplace">Delivery place:</label>
206 <textarea cols="26" rows="3" name="freedeliveryplace" id="freedeliveryplace">[% freedeliveryplace %]</textarea></li>
207 <li><label for="deliverycomment">Delivery comment:</label>
208 <textarea cols="26" rows="3" name="deliverycomment" id="deliverycomment">[% deliverycomment %]</textarea>
210 <li><span class="label">Baskets in this group:</span>
211 <ul class="draglist" id="bg">
212 [% FOREACH selectedbasket IN selectedbaskets %]
213 <li class="grouped" id="b-[% selectedbasket.basketno %]" >
214 <a href="basket.pl?basketno=[% selectedbasket.basketno %]">
215 [% IF ( selectedbasket.basketname ) %]
216 [% selectedbasket.basketname %]
218 No name, basketnumber: [% selectedbasket.basketno %]
221 Total: [% selectedbasket.total %]
222 <input type="hidden" class="basket" name="basket" value="[% selectedbasket.basketno %]" />
227 <li><label><input type="checkbox" id="close" name="close" /> Close basket group</label></li>
231 <fieldset class="action"><input type="hidden" name="booksellerid" value="[% booksellerid %]" />
232 [% IF ( basketgroupid ) %]
233 <input type="hidden" name="basketgroupid" value="[% basketgroupid %]" />
235 <input type="hidden" name="op" value="attachbasket" />
236 <input type="submit" value="Save" /> <a href="/cgi-bin/koha/acqui/basketgroup.pl?booksellerid=[% booksellerid %]" class="cancel">Cancel</a>
243 <div id="toolbar" class="btn-toolbar">
244 <div class="btn-group"><a href="/cgi-bin/koha/acqui/basketgroup.pl?op=add&booksellerid=[% booksellerid %]" class="btn btn-small" id="newbasketgroup"><i class="icon-plus"></i> New basket group</a></div>
246 <h1>Basket grouping for <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid %]">[% booksellername |html %]</a></h1>
248 <div id="basket_groups" class="toptabs">
249 <ul class="ui-tabs-nav">
250 [% UNLESS ( closed ) %]<li class="ui-tabs-selected"><a href="#opened">Open</a></li>
251 [% ELSE%]<li><a href="#opened">Open</a></li>[% END %]
252 [% IF ( closed ) %]<li class="ui-tabs-selected"><a href="#closed">Closed</a></li>
253 [% ELSE %]<li><a href="#closed">Closed</a></li>[% END %]
256 <table id="basket_group_opened">
261 <th>Billing place</th>
262 <th>Delivery place</th>
263 <th>Number of baskets</th>
268 [% FOREACH basketgroup IN basketgroups %]
269 [% UNLESS ( basketgroup.closed ) %]
271 <td>[% IF ( basketgroup.name ) %]
272 [% basketgroup.name %]
274 Basket group no. [% basketgroup.id %]
277 <td>[% basketgroup.id %]</td>
278 <td>[% basketgroup.billingplace | $KohaBranchName %]</td>
279 <td>[% IF (basketgroup.freedeliveryplace) %]Free delivery place[% ELSE %][% basketgroup.deliveryplace | $KohaBranchName %][% END %]</td>
280 <td>[% basketgroup.basketsqty %]</td>
282 <input type="button" onclick="closeandprint([% basketgroup.id %])" value="Close and print" />
283 <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>
284 <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>
293 <table id="basket_group_closed">
298 <th>Billing place</th>
299 <th>Delivery place</th>
300 <th>Number of baskets</th>
305 [% FOREACH basketgroup IN basketgroups %]
306 [% IF ( basketgroup.closed ) %]
309 [% IF ( basketgroup.name ) %]
310 [% basketgroup.name %]
312 Basket group no. [% basketgroup.id %]
315 <td>[% basketgroup.id %]</td>
316 <td>[% basketgroup.billingplace | $KohaBranchName %]</td>
317 <td>[% IF (basketgroup.freedeliveryplace) %]Free delivery place[% ELSE %][% basketgroup.deliveryplace | $KohaBranchName %][% END %]</td>
318 <td>[% basketgroup.basketsqty %]</td>
320 <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>
321 <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="Print" /></form>
322 <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>
335 [% IF ( booksellerid ) %]
336 [% INCLUDE 'vendor-menu.inc' %]
338 [% INCLUDE 'acquisitions-menu.inc' %]
341 [% INCLUDE 'intranet-bottom.inc' %]