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 | html %]?op=reopen&basketgroupid=[% basketgroupid | html %]&booksellerid=[% booksellerid | html %]&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 | html %]?op=export&basketgroupid=[% basketgroupid | html %]&booksellerid=[% booksellerid | html %]" 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 | html %]?op=print&basketgroupid=[% basketgroupid | html %]&booksellerid=[% booksellerid | html %]" class="btn btn-default btn-sm" id="printbutton"><i class="fa fa-download"></i> Print this basket group in PDF</a></div>
150 <div class="btn-group"><a href="[% script_name | html %]?op=ediprint&basketgroupid=[% basketgroupid | html %]&booksellerid=[% booksellerid | html %]" class="btn btn-default btn-sm" id="printbutton"><i class="fa fa-download"></i> Generate EDIFACT order</a></div>
153 [% IF (name && closedbg) %]
154 <h1>Basket group [% name | html %] ([% basketgroupid | html %]) for <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid | html %]">[% booksellername | html %]</a></h1>
156 <h1>Edit basket group [% name | html %] ([% basketgroupid | html %]) for <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid | html %]">[% booksellername | html %]</a></h1>
158 <h1>Add basket group for <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid | html %]">[% booksellername | html %]</a></h1>
160 <div id="basketgroupcolumns" class="row">
161 [% UNLESS (closedbg) %]
162 <div class="col-xs-6 col-xs-push-6">
163 <form action="[% scriptname | html %]" method="post" name="basketgroups" id="basketgroups">
165 <fieldset class="brief">
166 <div class="workarea_alt" >
167 <h3>Ungrouped baskets</h3>
168 <ul id="ungrouped" class="draglist_alt">
170 [% FOREACH basket IN baskets %]
171 <li class="ungrouped" id="b-[% basket.basketno | html %]" >
172 <a href="basket.pl?basketno=[% basket.basketno | html %]">
173 [% IF ( basket.basketname ) %]
174 [% basket.basketname | html %]
176 No name, basketnumber: [% basket.basketno | html %]
179 Total: [% basket.total | $Price | html %]
180 <input type="hidden" class="basket" name="basket" value="[% basket.basketno | html %]" />
191 [% IF ( closedbg ) %]
192 <div class="col-xs-12">
194 <div class="col-xs-6 col-xs-pull-6">
196 <form action="" method="post" id="groupingform" onsubmit="return submitForm(this)">
197 <fieldset id="various" class="brief">
199 [% UNLESS (closedbg) %]
201 <label for="basketgroupname">Basket group name:</label>
202 <input type="text" name="basketgroupname" id="basketgroupname" value="[% name | html %]" class="focus" />
205 <input type="hidden" name="basketgroupname" id="basketgroupname" value="[% name | html %]" />
208 [% UNLESS (closedbg) %]
209 <label for="billingplace">Billing place:</label>
210 <select name="billingplace" id="billingplace">
211 <option value="">--</option>
212 [% PROCESS options_for_libraries libraries => Branches.all( selected => billingplace ) %]
215 <span class="label">Billing place:</span>
216 <input name="billingplace" id="billingplace" type ="hidden" value="[% billingplace | html %]" />[% Branches.GetName( billingplace ) | html %]
219 [% UNLESS (closedbg) %]
221 <label for="deliveryplace">Delivery place:</label>
222 <select name="deliveryplace" id="deliveryplace">
223 <option value="">--</option>
224 [% PROCESS options_for_libraries libraries => Branches.all( selected => deliveryplace ) %]
229 <label for="freedeliveryplace">Delivery place:</label>
230 <textarea cols="26" rows="3" name="freedeliveryplace" id="freedeliveryplace">[% freedeliveryplace | html %]</textarea>
234 <span class="label">Delivery place:</span>
235 [% IF (freedeliveryplace) %]
236 <input name="freedeliveryplace" id="freedeliveryplace" type ="hidden" value="[% freedeliveryplace | html %]" />[% freedeliveryplace | html %]
237 <input name="deliveryplace" id="deliveryplace" type ="hidden" value="" />
239 <input name="deliveryplace" id="deliveryplace" type ="hidden" value="[% deliveryplace | html %]" />[% Branches.GetName( deliveryplace ) | html %]
240 <input name="freedeliveryplace" id="freedeliveryplace" type ="hidden" value="" />
245 [% UNLESS (closedbg) %]
246 <label for="deliverycomment">Delivery comment:</label>
247 <textarea cols="26" rows="3" name="deliverycomment" id="deliverycomment">[% deliverycomment | html %]</textarea>
249 <span class="label">Delivery comment:</span>[% deliverycomment | html %]
250 <input name="deliverycomment" id="deliverycomment" type="hidden" value = "[% deliverycomment | html %]" />
254 <span class="label">Baskets in this group:</span>
255 [% UNLESS (closedbg) %]
256 <ul class="draglist" id="bg">
260 [% FOREACH selectedbasket IN selectedbaskets %]
261 <li class="grouped" id="b-[% selectedbasket.basketno | html %]" >
262 <a href="basket.pl?basketno=[% selectedbasket.basketno | html %]">
263 [% IF ( selectedbasket.basketname ) %]
264 [% selectedbasket.basketname | html %]
266 No name, basketnumber: [% selectedbasket.basketno | html %]
269 Total: [% selectedbasket.total | $Price | html %]
270 <input type="hidden" class="basket" name="basket" value="[% selectedbasket.basketno | html %]" />
275 [% UNLESS (closedbg) %]
276 <li><label><input type="checkbox" id="closedbg" name="closedbg" />Close basket group</label></li>
278 <input type="hidden" id="closedbg" name="closedbg" value ="1"/>
282 [% UNLESS (closedbg) %]
283 <fieldset class="action"><input type="hidden" name="booksellerid" value="[% booksellerid | html %]" />
284 [% IF ( basketgroupid ) %]
285 <input type="hidden" name="basketgroupid" value="[% basketgroupid | html %]" />
287 <input type="hidden" name="op" value="attachbasket" />
288 <input type="submit" value="Save" /> <a href="/cgi-bin/koha/acqui/basketgroup.pl?booksellerid=[% booksellerid | html %]" class="cancel">Cancel</a>
295 <div id="toolbar" class="btn-toolbar">
296 <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>
298 <h1>Basket grouping for <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid | html %]">[% booksellername | html %]</a></h1>
299 <div id="basket_groups" class="toptabs">
300 <ul class="ui-tabs-nav">
301 [% UNLESS ( listclosed) %]<li class="ui-tabs-active"><a href="#opened">Open</a></li>
302 [% ELSE%]<li><a href="#opened">Open</a></li>[% END %]
303 [% IF ( listclosed) %]<li class="ui-tabs-active"><a href="#closed">Closed</a></li>
304 [% ELSE %]<li><a href="#closed">Closed</a></li>[% END %]
307 <table id="basket_group_opened">
312 <th>Billing place</th>
313 <th>Delivery place</th>
314 <th>Number of baskets</th>
319 [% FOREACH basketgroup IN basketgroups %]
320 [% UNLESS ( basketgroup.closed ) %]
322 <td>[% IF ( basketgroup.name ) %]
323 [% basketgroup.name | html %]
325 Basket group no. [% basketgroup.id | html %]
328 <td>[% basketgroup.id | html %]</td>
329 <td>[% Branches.GetName( basketgroup.billingplace ) | html %]</td>
330 <td>[% IF (basketgroup.freedeliveryplace) %]Free delivery place[% ELSE %][% Branches.GetName( basketgroup.deliveryplace ) | html %][% END %]</td>
331 <td>[% basketgroup.basketsqty | html %]</td>
333 <input type="button" onclick="closeandprint('[% basketgroup.id | html %]');" value="Close and export as PDF" />
334 <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>
335 [% UNLESS basketgroup.basketsqty %]
336 <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>
346 <table id="basket_group_closed">
351 <th>Billing place</th>
352 <th>Delivery place</th>
353 <th>Number of baskets</th>
358 [% FOREACH basketgroup IN basketgroups %]
359 [% IF ( basketgroup.closed ) %]
362 [% IF ( basketgroup.name ) %]
363 [% basketgroup.name | html %]
365 Basket group no. [% basketgroup.id | html %]
368 <td>[% basketgroup.id | html %]</td>
369 <td>[% Branches.GetName( basketgroup.billingplace ) | html %]</td>
370 <td>[% IF (basketgroup.freedeliveryplace) %]Free delivery place[% ELSE %][% Branches.GetName( basketgroup.deliveryplace ) | html %][% END %]</td>
371 <td>[% basketgroup.basketsqty | html %]</td>
373 <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>
374 <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>
375 <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>
376 <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>
377 <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>
388 </div> <!-- /.col-sm-10.col-sm-push-2 -->
390 <div class="col-sm-2 col-sm-pull-10">
392 [% IF ( booksellerid ) %]
393 [% INCLUDE 'vendor-menu.inc' %]
395 [% INCLUDE 'acquisitions-menu.inc' %]
398 </div> <!-- /.row -->
399 [% INCLUDE 'intranet-bottom.inc' %]