5 [% INCLUDE 'doc-head-open.inc' %]
6 <title>Koha › Basket grouping for [% booksellername | html %]</title>
7 [% INCLUDE 'doc-head-close.inc' %]
8 [% INCLUDE 'datatables.inc' %]
9 [% Asset.js("lib/yui/utilities/utilities.js") | $raw %]
10 [% Asset.js("lib/yui/button/button-min.js") | $raw %]
11 [% Asset.js("lib/yui/container/container_core-min.js") | $raw %]
12 [% Asset.js("lib/yui/menu/menu-min.js") | $raw %]
13 [% Asset.js("js/basketgroup.js") | $raw %]
15 [% Asset.js("lib/yui/yahoo-dom-event/yahoo-dom-event.js") | $raw %]
16 [% Asset.js("lib/yui/animation/animation-min.js") | $raw %]
17 [% Asset.js("lib/yui/dragdrop/dragdrop-min.js") | $raw %]
18 [% Asset.js("lib/yui/element/element-min.js") | $raw %]
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
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 | uri %]">[% booksellername | html %]</a> › <a href="/cgi-bin/koha/acqui/basketgroup.pl?booksellerid=[% booksellerid | html %]">Basket grouping</a> › Add basket group for [% booksellername | html %]</div>
134 <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid | uri %]">[% booksellername | html %]</a> › Basket grouping</div>
138 <div class="main container-fluid">
140 <div class="col-sm-10 col-sm-push-2">
143 [% IF ( grouping ) %]
145 <div id="toolbar" class="btn-toolbar">
146 <div class="btn-group"><a href="[% script_name | url %]?op=reopen&basketgroupid=[% basketgroupid | uri %]&booksellerid=[% booksellerid | uri %]&mode=singlebg" class="btn btn-default" id="reopenbutton"><i class="fa fa-download"></i> Reopen this basket group</a></div>
147 <div class="btn-group"><a href="[% script_name | url %]?op=export&basketgroupid=[% basketgroupid | uri %]&booksellerid=[% booksellerid | uri %]" class="btn btn-default" id="exportbutton"><i class="fa fa-download"></i> Export this basket group as CSV</a></div>
148 <div class="btn-group"><a href="[% script_name | url %]?op=print&basketgroupid=[% basketgroupid | uri %]&booksellerid=[% booksellerid | uri %]" class="btn btn-default" id="printbutton"><i class="fa fa-download"></i> Print this basket group in PDF</a></div>
149 [% IF (ediaccount) %]
150 <div class="btn-group"><a href="[% script_name | url %]?op=ediprint&basketgroupid=[% basketgroupid | uri %]&booksellerid=[% booksellerid | uri %]" class="btn btn-default" id="printbutton"><i class="fa fa-download"></i> Generate EDIFACT order</a></div>
154 [% IF (name && closedbg) %]
155 <h1>Basket group [% name | html %] ([% basketgroupid | html %]) for <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid | uri %]">[% booksellername | html %]</a></h1>
157 <h1>Edit basket group [% name | html %] ([% basketgroupid | html %]) for <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid | uri %]">[% booksellername | html %]</a></h1>
159 <h1>Add basket group for <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid | uri %]">[% booksellername | html %]</a></h1>
161 <div id="basketgroupcolumns" class="row">
162 [% UNLESS (closedbg) %]
163 <div class="col-xs-6 col-xs-push-6">
164 <form action="[% scriptname | html %]" method="post" name="basketgroups" id="basketgroups">
166 <fieldset class="brief">
167 <div class="workarea_alt" >
168 <h3>Ungrouped baskets</h3>
169 <ul id="ungrouped" class="draglist_alt">
171 [% FOREACH basket IN baskets %]
172 <li class="ungrouped" id="b-[% basket.basketno | html %]" >
173 <a href="basket.pl?basketno=[% basket.basketno | uri %]">
174 [% IF ( basket.basketname ) %]
175 [% basket.basketname | html %]
177 No name, basketnumber: [% basket.basketno | html %]
180 Total: [% basket.total | $Price %]
181 <input type="hidden" class="basket" name="basket" value="[% basket.basketno | html %]" />
192 [% IF ( closedbg ) %]
193 <div class="col-xs-12">
195 <div class="col-xs-6 col-xs-pull-6">
197 <form action="" method="post" id="groupingform" onsubmit="return submitForm(this)">
198 <fieldset id="various" class="brief">
200 [% UNLESS (closedbg) %]
202 <label for="basketgroupname">Basket group name:</label>
203 <input type="text" name="basketgroupname" id="basketgroupname" value="[% name | html %]" class="focus" />
206 <input type="hidden" name="basketgroupname" id="basketgroupname" value="[% name | html %]" />
209 [% UNLESS (closedbg) %]
210 <label for="billingplace">Billing place:</label>
211 <select name="billingplace" id="billingplace">
212 <option value="">--</option>
213 [% PROCESS options_for_libraries libraries => Branches.all( selected => billingplace ) %]
216 <span class="label">Billing place:</span>
217 <input name="billingplace" id="billingplace" type ="hidden" value="[% billingplace | html %]" />[% Branches.GetName( billingplace ) | html %]
220 [% UNLESS (closedbg) %]
222 <label for="deliveryplace">Delivery place:</label>
223 <select name="deliveryplace" id="deliveryplace">
224 <option value="">--</option>
225 [% PROCESS options_for_libraries libraries => Branches.all( selected => deliveryplace ) %]
230 <label for="freedeliveryplace">Delivery place:</label>
231 <textarea cols="26" rows="3" name="freedeliveryplace" id="freedeliveryplace">[% freedeliveryplace | html %]</textarea>
235 <span class="label">Delivery place:</span>
236 [% IF (freedeliveryplace) %]
237 <input name="freedeliveryplace" id="freedeliveryplace" type ="hidden" value="[% freedeliveryplace | html %]" />[% freedeliveryplace | html %]
238 <input name="deliveryplace" id="deliveryplace" type ="hidden" value="" />
240 <input name="deliveryplace" id="deliveryplace" type ="hidden" value="[% deliveryplace | html %]" />[% Branches.GetName( deliveryplace ) | html %]
241 <input name="freedeliveryplace" id="freedeliveryplace" type ="hidden" value="" />
246 [% UNLESS (closedbg) %]
247 <label for="deliverycomment">Delivery comment:</label>
248 <textarea cols="26" rows="3" name="deliverycomment" id="deliverycomment">[% deliverycomment | html %]</textarea>
250 <span class="label">Delivery comment:</span>[% deliverycomment | html %]
251 <input name="deliverycomment" id="deliverycomment" type="hidden" value = "[% deliverycomment | html %]" />
255 <span class="label">Baskets in this group:</span>
256 [% UNLESS (closedbg) %]
257 <ul class="draglist" id="bg">
261 [% FOREACH selectedbasket IN selectedbaskets %]
262 <li class="grouped" id="b-[% selectedbasket.basketno | html %]" >
263 <a href="basket.pl?basketno=[% selectedbasket.basketno | uri %]">
264 [% IF ( selectedbasket.basketname ) %]
265 [% selectedbasket.basketname | html %]
267 No name, basketnumber: [% selectedbasket.basketno | html %]
270 Total: [% selectedbasket.total | $Price %]
271 <input type="hidden" class="basket" name="basket" value="[% selectedbasket.basketno | html %]" />
276 [% UNLESS (closedbg) %]
277 <li><label><input type="checkbox" id="closedbg" name="closedbg" />Close basket group</label></li>
279 <input type="hidden" id="closedbg" name="closedbg" value ="1"/>
283 [% UNLESS (closedbg) %]
284 <fieldset class="action"><input type="hidden" name="booksellerid" value="[% booksellerid | html %]" />
285 [% IF ( basketgroupid ) %]
286 <input type="hidden" name="basketgroupid" value="[% basketgroupid | html %]" />
288 <input type="hidden" name="op" value="attachbasket" />
289 <input type="submit" value="Save" /> <a href="/cgi-bin/koha/acqui/basketgroup.pl?booksellerid=[% booksellerid | uri %]" class="cancel">Cancel</a>
296 <div id="toolbar" class="btn-toolbar">
297 <div class="btn-group"><a href="/cgi-bin/koha/acqui/basketgroup.pl?op=add&booksellerid=[% booksellerid | uri %]" class="btn btn-default" id="newbasketgroup"><i class="fa fa-plus"></i> New basket group</a></div>
299 <h1>Basket grouping for <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid | uri %]">[% booksellername | html %]</a></h1>
300 [% IF (NoEDIMessage) %]<div><strong>No EDIFACT configuration for [% booksellername | html %]</strong></div>[% END %]
301 <div id="basket_groups" class="toptabs">
302 <ul class="ui-tabs-nav">
303 [% UNLESS ( listclosed) %]<li class="ui-tabs-active"><a href="#opened">Open</a></li>
304 [% ELSE%]<li><a href="#opened">Open</a></li>[% END %]
305 [% IF ( listclosed) %]<li class="ui-tabs-active"><a href="#closed">Closed</a></li>
306 [% ELSE %]<li><a href="#closed">Closed</a></li>[% END %]
309 <table id="basket_group_opened">
314 <th>Billing place</th>
315 <th>Delivery place</th>
316 <th>Number of baskets</th>
321 [% FOREACH basketgroup IN basketgroups %]
322 [% UNLESS ( basketgroup.closed ) %]
324 <td>[% IF ( basketgroup.name ) %]
325 [% basketgroup.name | html %]
327 Basket group no. [% basketgroup.id | html %]
330 <td>[% basketgroup.id | html %]</td>
331 <td>[% Branches.GetName( basketgroup.billingplace ) | html %]</td>
332 <td>[% IF (basketgroup.freedeliveryplace) %]Free delivery place[% ELSE %][% Branches.GetName( basketgroup.deliveryplace ) | html %][% END %]</td>
333 <td>[% basketgroup.basketsqty | html %]</td>
335 <input type="button" onclick="closeandprint('[% basketgroup.id | html %]');" value="Close and export as PDF" />
336 <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>
337 [% UNLESS basketgroup.basketsqty %]
338 <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>
348 <table id="basket_group_closed">
353 <th>Billing place</th>
354 <th>Delivery place</th>
355 <th>Number of baskets</th>
360 [% FOREACH basketgroup IN basketgroups %]
361 [% IF ( basketgroup.closed ) %]
364 [% IF ( basketgroup.name ) %]
365 [% basketgroup.name | html %]
367 Basket group no. [% basketgroup.id | html %]
370 <td>[% basketgroup.id | html %]</td>
371 <td>[% Branches.GetName( basketgroup.billingplace ) | html %]</td>
372 <td>[% IF (basketgroup.freedeliveryplace) %]Free delivery place[% ELSE %][% Branches.GetName( basketgroup.deliveryplace ) | html %][% END %]</td>
373 <td>[% basketgroup.basketsqty | html %]</td>
375 <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>
376 <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>
377 <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>
378 <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>
379 [% IF (ediaccount) %]
380 <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>
382 <div>No EDIFACT configuration for [% booksellername | html %]</div>
394 </div> <!-- /.col-sm-10.col-sm-push-2 -->
396 <div class="col-sm-2 col-sm-pull-10">
398 [% IF ( booksellerid ) %]
399 [% INCLUDE 'vendor-menu.inc' %]
401 [% INCLUDE 'acquisitions-menu.inc' %]
404 </div> <!-- /.row -->
405 [% INCLUDE 'intranet-bottom.inc' %]