5 [% INCLUDE 'doc-head-open.inc' %]
6 <title>Basket grouping for [% booksellername | html %] › Koha</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;
90 YAHOO.util.Event.onDOMReady(DDApp.init, DDApp, true);
92 var MSG_CONFIRM_CLOSE_BASKETGROUP = _("Are you sure you want to close this basketgroup?");
93 var MSG_CLOSE_EMPTY_BASKET = _("Why close an empty basket?");
94 var MSG_SAVE_BEFORE_PRINTING = _("You need to save the page before printing");
95 var MSG_REOPEN_BASKETGROUP = _("reopen basketgroup");
96 var MSG_FILE_DOWNLOAD_ERROR = _("Error downloading the file");
98 function submitForm(form) {
99 if (form.close.checked == true) {
100 var input = document.createElement("input");
101 input.setAttribute("type", "hidden");
102 input.setAttribute("name", "closed");
103 input.setAttribute("value", "1");
104 form.appendChild(input);
108 $(document).ready(function() {
109 $("#basket_groups").tabs();
111 $("table").dataTable($.extend(true, {}, dataTablesDefaults, {
113 { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
116 "sPaginationType": "full"
122 <body id="acq_basketgroup" class="acq">
123 [% INCLUDE 'header.inc' %]
124 [% INCLUDE 'acquisitions-search.inc' %]
126 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
129 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
132 <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a>
135 [% IF ( grouping ) %]
137 <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid | uri %]">[% booksellername | html %]</a>
140 <a href="/cgi-bin/koha/acqui/basketgroup.pl?booksellerid=[% booksellerid | uri %]">Basket grouping</a>
143 <a href="#" aria-current="page">
144 Add basket group for [% booksellername | html %]
152 <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid | uri %]">[% booksellername | html %]</a>
155 <a href="#" aria-current="page">
164 <div class="main container-fluid">
166 <div class="col-sm-10 col-sm-push-2">
169 [% IF ( grouping ) %]
171 <div id="toolbar" class="btn-toolbar">
172 <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 basket group</a></div>
173 <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 basket group as CSV</a></div>
174 <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 basket group in PDF</a></div>
175 [% IF (ediaccount) %]
176 <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>
180 [% IF (name && closedbg) %]
181 <h1>Basket group [% name | html %] ([% basketgroupid | html %]) for <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid | uri %]">[% booksellername | html %]</a></h1>
183 <h1>Edit basket group [% name | html %] ([% basketgroupid | html %]) for <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid | uri %]">[% booksellername | html %]</a></h1>
185 <h1>Add basket group for <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid | uri %]">[% booksellername | html %]</a></h1>
187 <div id="basketgroupcolumns" class="row">
188 [% UNLESS (closedbg) %]
189 <div class="col-xs-6 col-xs-push-6">
190 <form action="[% scriptname | html %]" method="post" name="basketgroups" id="basketgroups">
192 <fieldset class="brief">
193 <div class="workarea_alt" >
194 <h3>Ungrouped baskets</h3>
195 <ul id="ungrouped" class="draglist_alt">
197 [% FOREACH basket IN baskets %]
198 <li class="ungrouped" id="b-[% basket.basketno | html %]" >
199 <a href="basket.pl?basketno=[% basket.basketno | uri %]">
200 [% IF ( basket.basketname ) %]
201 [% basket.basketname | html %]
203 No name, basketnumber: [% basket.basketno | html %]
206 Total: [% basket.total | $Price %]
207 <input type="hidden" class="basket" name="basket" value="[% basket.basketno | html %]" />
218 [% IF ( closedbg ) %]
219 <div class="col-xs-12">
221 <div class="col-xs-6 col-xs-pull-6">
223 <form action="" method="post" id="groupingform" onsubmit="return submitForm(this)">
224 <fieldset id="various" class="brief">
226 [% UNLESS (closedbg) %]
228 <label for="basketgroupname">Basket group name:</label>
229 <input type="text" name="basketgroupname" id="basketgroupname" value="[% name | html %]" class="focus" />
232 <input type="hidden" name="basketgroupname" id="basketgroupname" value="[% name | html %]" />
235 [% UNLESS (closedbg) %]
236 <label for="billingplace">Billing place:</label>
237 <select name="billingplace" id="billingplace">
238 <option value="">--</option>
239 [% PROCESS options_for_libraries libraries => Branches.all( selected => billingplace ) %]
242 <span class="label">Billing place:</span>
243 <input name="billingplace" id="billingplace" type ="hidden" value="[% billingplace | html %]" />[% Branches.GetName( billingplace ) | html %]
246 [% UNLESS (closedbg) %]
248 <label for="deliveryplace">Delivery place:</label>
249 <select name="deliveryplace" id="deliveryplace">
250 <option value="">--</option>
251 [% PROCESS options_for_libraries libraries => Branches.all( selected => deliveryplace ) %]
256 <label for="freedeliveryplace">Delivery place:</label>
257 <textarea cols="26" rows="3" name="freedeliveryplace" id="freedeliveryplace">[% freedeliveryplace | html %]</textarea>
261 <span class="label">Delivery place:</span>
262 [% IF (freedeliveryplace) %]
263 <input name="freedeliveryplace" id="freedeliveryplace" type ="hidden" value="[% freedeliveryplace | html %]" />[% freedeliveryplace | html %]
264 <input name="deliveryplace" id="deliveryplace" type ="hidden" value="" />
266 <input name="deliveryplace" id="deliveryplace" type ="hidden" value="[% deliveryplace | html %]" />[% Branches.GetName( deliveryplace ) | html %]
267 <input name="freedeliveryplace" id="freedeliveryplace" type ="hidden" value="" />
272 [% UNLESS (closedbg) %]
273 <label for="deliverycomment">Delivery comment:</label>
274 <textarea cols="26" rows="3" name="deliverycomment" id="deliverycomment">[% deliverycomment | html %]</textarea>
276 <span class="label">Delivery comment:</span>[% deliverycomment | html %]
277 <input name="deliverycomment" id="deliverycomment" type="hidden" value = "[% deliverycomment | html %]" />
281 <span class="label">Baskets in this group:</span>
282 [% UNLESS (closedbg) %]
283 <ul class="draglist" id="bg">
287 [% FOREACH selectedbasket IN selectedbaskets %]
288 <li class="grouped" id="b-[% selectedbasket.basketno | html %]" >
289 <a href="basket.pl?basketno=[% selectedbasket.basketno | uri %]">
290 [% IF ( selectedbasket.basketname ) %]
291 [% selectedbasket.basketname | html %]
293 No name, basketnumber: [% selectedbasket.basketno | html %]
296 Total: [% selectedbasket.total | $Price %]
297 <input type="hidden" class="basket" name="basket" value="[% selectedbasket.basketno | html %]" />
302 [% UNLESS (closedbg) %]
303 <li><label><input type="checkbox" id="closedbg" name="closedbg" />Close basket group</label></li>
305 <input type="hidden" id="closedbg" name="closedbg" value ="1"/>
309 [% UNLESS (closedbg) %]
310 <fieldset class="action"><input type="hidden" name="booksellerid" value="[% booksellerid | html %]" />
311 [% IF ( basketgroupid ) %]
312 <input type="hidden" name="basketgroupid" value="[% basketgroupid | html %]" />
314 <input type="hidden" name="op" value="attachbasket" />
315 <input type="submit" value="Save" /> <a href="/cgi-bin/koha/acqui/basketgroup.pl?booksellerid=[% booksellerid | uri %]" class="cancel">Cancel</a>
322 <div id="toolbar" class="btn-toolbar">
323 <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>
325 <h1>Basket grouping for <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid | uri %]">[% booksellername | html %]</a></h1>
326 [% IF (NoEDIMessage) %]<div><strong>No EDIFACT configuration for [% booksellername | html %]</strong></div>[% END %]
327 <div id="basket_groups" class="toptabs">
328 <ul class="ui-tabs-nav">
329 [% UNLESS ( listclosed) %]<li class="ui-tabs-active"><a href="#opened">Open</a></li>
330 [% ELSE%]<li><a href="#opened">Open</a></li>[% END %]
331 [% IF ( listclosed) %]<li class="ui-tabs-active"><a href="#closed">Closed</a></li>
332 [% ELSE %]<li><a href="#closed">Closed</a></li>[% END %]
335 <table id="basket_group_opened">
340 <th>Billing place</th>
341 <th>Delivery place</th>
342 <th>Number of baskets</th>
347 [% FOREACH basketgroup IN basketgroups %]
348 [% UNLESS ( basketgroup.closed ) %]
350 <td>[% IF ( basketgroup.name ) %]
351 [% basketgroup.name | html %]
353 Basket group no. [% basketgroup.id | html %]
356 <td>[% basketgroup.id | html %]</td>
357 <td>[% Branches.GetName( basketgroup.billingplace ) | html %]</td>
358 <td>[% IF (basketgroup.freedeliveryplace) %]Free delivery place[% ELSE %][% Branches.GetName( basketgroup.deliveryplace ) | html %][% END %]</td>
359 <td>[% basketgroup.basketsqty | html %]</td>
361 <input type="button" onclick="closeandprint('[% basketgroup.id | html %]');" value="Close and export as PDF" />
362 <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>
363 [% UNLESS basketgroup.basketsqty %]
364 <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>
374 <table id="basket_group_closed">
379 <th>Billing place</th>
380 <th>Delivery place</th>
381 <th>Number of baskets</th>
386 [% FOREACH basketgroup IN basketgroups %]
387 [% IF ( basketgroup.closed ) %]
390 [% IF ( basketgroup.name ) %]
391 [% basketgroup.name | html %]
393 Basket group no. [% basketgroup.id | html %]
396 <td>[% basketgroup.id | html %]</td>
397 <td>[% Branches.GetName( basketgroup.billingplace ) | html %]</td>
398 <td>[% IF (basketgroup.freedeliveryplace) %]Free delivery place[% ELSE %][% Branches.GetName( basketgroup.deliveryplace ) | html %][% END %]</td>
399 <td>[% basketgroup.basketsqty | html %]</td>
401 <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>
402 <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>
403 <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>
404 <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>
405 [% IF (ediaccount) %]
406 <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>
408 <div>No EDIFACT configuration for [% booksellername | html %]</div>
420 </div> <!-- /.col-sm-10.col-sm-push-2 -->
422 <div class="col-sm-2 col-sm-pull-10">
424 [% IF ( booksellerid ) %]
425 [% INCLUDE 'vendor-menu.inc' %]
427 [% INCLUDE 'acquisitions-menu.inc' %]
430 </div> <!-- /.row -->
431 [% INCLUDE 'intranet-bottom.inc' %]