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;
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 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> ›
127 [% IF ( grouping ) %]
128 <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>
130 <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid | uri %]">[% booksellername | html %]</a> › Basket grouping</div>
134 <div class="main container-fluid">
136 <div class="col-sm-10 col-sm-push-2">
139 [% IF ( grouping ) %]
141 <div id="toolbar" class="btn-toolbar">
142 <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>
143 <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>
144 <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>
145 [% IF (ediaccount) %]
146 <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>
150 [% IF (name && closedbg) %]
151 <h1>Basket group [% name | html %] ([% basketgroupid | html %]) for <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid | uri %]">[% booksellername | html %]</a></h1>
153 <h1>Edit basket group [% name | html %] ([% basketgroupid | html %]) for <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid | uri %]">[% booksellername | html %]</a></h1>
155 <h1>Add basket group for <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid | uri %]">[% booksellername | html %]</a></h1>
157 <div id="basketgroupcolumns" class="row">
158 [% UNLESS (closedbg) %]
159 <div class="col-xs-6 col-xs-push-6">
160 <form action="[% scriptname | html %]" method="post" name="basketgroups" id="basketgroups">
162 <fieldset class="brief">
163 <div class="workarea_alt" >
164 <h3>Ungrouped baskets</h3>
165 <ul id="ungrouped" class="draglist_alt">
167 [% FOREACH basket IN baskets %]
168 <li class="ungrouped" id="b-[% basket.basketno | html %]" >
169 <a href="basket.pl?basketno=[% basket.basketno | uri %]">
170 [% IF ( basket.basketname ) %]
171 [% basket.basketname | html %]
173 No name, basketnumber: [% basket.basketno | html %]
176 Total: [% basket.total | $Price %]
177 <input type="hidden" class="basket" name="basket" value="[% basket.basketno | html %]" />
188 [% IF ( closedbg ) %]
189 <div class="col-xs-12">
191 <div class="col-xs-6 col-xs-pull-6">
193 <form action="" method="post" id="groupingform" onsubmit="return submitForm(this)">
194 <fieldset id="various" class="brief">
196 [% UNLESS (closedbg) %]
198 <label for="basketgroupname">Basket group name:</label>
199 <input type="text" name="basketgroupname" id="basketgroupname" value="[% name | html %]" class="focus" />
202 <input type="hidden" name="basketgroupname" id="basketgroupname" value="[% name | html %]" />
205 [% UNLESS (closedbg) %]
206 <label for="billingplace">Billing place:</label>
207 <select name="billingplace" id="billingplace">
208 <option value="">--</option>
209 [% PROCESS options_for_libraries libraries => Branches.all( selected => billingplace ) %]
212 <span class="label">Billing place:</span>
213 <input name="billingplace" id="billingplace" type ="hidden" value="[% billingplace | html %]" />[% Branches.GetName( billingplace ) | html %]
216 [% UNLESS (closedbg) %]
218 <label for="deliveryplace">Delivery place:</label>
219 <select name="deliveryplace" id="deliveryplace">
220 <option value="">--</option>
221 [% PROCESS options_for_libraries libraries => Branches.all( selected => deliveryplace ) %]
226 <label for="freedeliveryplace">Delivery place:</label>
227 <textarea cols="26" rows="3" name="freedeliveryplace" id="freedeliveryplace">[% freedeliveryplace | html %]</textarea>
231 <span class="label">Delivery place:</span>
232 [% IF (freedeliveryplace) %]
233 <input name="freedeliveryplace" id="freedeliveryplace" type ="hidden" value="[% freedeliveryplace | html %]" />[% freedeliveryplace | html %]
234 <input name="deliveryplace" id="deliveryplace" type ="hidden" value="" />
236 <input name="deliveryplace" id="deliveryplace" type ="hidden" value="[% deliveryplace | html %]" />[% Branches.GetName( deliveryplace ) | html %]
237 <input name="freedeliveryplace" id="freedeliveryplace" type ="hidden" value="" />
242 [% UNLESS (closedbg) %]
243 <label for="deliverycomment">Delivery comment:</label>
244 <textarea cols="26" rows="3" name="deliverycomment" id="deliverycomment">[% deliverycomment | html %]</textarea>
246 <span class="label">Delivery comment:</span>[% deliverycomment | html %]
247 <input name="deliverycomment" id="deliverycomment" type="hidden" value = "[% deliverycomment | html %]" />
251 <span class="label">Baskets in this group:</span>
252 [% UNLESS (closedbg) %]
253 <ul class="draglist" id="bg">
257 [% FOREACH selectedbasket IN selectedbaskets %]
258 <li class="grouped" id="b-[% selectedbasket.basketno | html %]" >
259 <a href="basket.pl?basketno=[% selectedbasket.basketno | uri %]">
260 [% IF ( selectedbasket.basketname ) %]
261 [% selectedbasket.basketname | html %]
263 No name, basketnumber: [% selectedbasket.basketno | html %]
266 Total: [% selectedbasket.total | $Price %]
267 <input type="hidden" class="basket" name="basket" value="[% selectedbasket.basketno | html %]" />
272 [% UNLESS (closedbg) %]
273 <li><label><input type="checkbox" id="closedbg" name="closedbg" />Close basket group</label></li>
275 <input type="hidden" id="closedbg" name="closedbg" value ="1"/>
279 [% UNLESS (closedbg) %]
280 <fieldset class="action"><input type="hidden" name="booksellerid" value="[% booksellerid | html %]" />
281 [% IF ( basketgroupid ) %]
282 <input type="hidden" name="basketgroupid" value="[% basketgroupid | html %]" />
284 <input type="hidden" name="op" value="attachbasket" />
285 <input type="submit" value="Save" /> <a href="/cgi-bin/koha/acqui/basketgroup.pl?booksellerid=[% booksellerid | uri %]" class="cancel">Cancel</a>
292 <div id="toolbar" class="btn-toolbar">
293 <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>
295 <h1>Basket grouping for <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid | uri %]">[% booksellername | html %]</a></h1>
296 [% IF (NoEDIMessage) %]<div><strong>No EDIFACT configuration for [% booksellername | html %]</strong></div>[% END %]
297 <div id="basket_groups" class="toptabs">
298 <ul class="ui-tabs-nav">
299 [% UNLESS ( listclosed) %]<li class="ui-tabs-active"><a href="#opened">Open</a></li>
300 [% ELSE%]<li><a href="#opened">Open</a></li>[% END %]
301 [% IF ( listclosed) %]<li class="ui-tabs-active"><a href="#closed">Closed</a></li>
302 [% ELSE %]<li><a href="#closed">Closed</a></li>[% END %]
305 <table id="basket_group_opened">
310 <th>Billing place</th>
311 <th>Delivery place</th>
312 <th>Number of baskets</th>
317 [% FOREACH basketgroup IN basketgroups %]
318 [% UNLESS ( basketgroup.closed ) %]
320 <td>[% IF ( basketgroup.name ) %]
321 [% basketgroup.name | html %]
323 Basket group no. [% basketgroup.id | html %]
326 <td>[% basketgroup.id | html %]</td>
327 <td>[% Branches.GetName( basketgroup.billingplace ) | html %]</td>
328 <td>[% IF (basketgroup.freedeliveryplace) %]Free delivery place[% ELSE %][% Branches.GetName( basketgroup.deliveryplace ) | html %][% END %]</td>
329 <td>[% basketgroup.basketsqty | html %]</td>
331 <input type="button" onclick="closeandprint('[% basketgroup.id | html %]');" value="Close and export as PDF" />
332 <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>
333 [% UNLESS basketgroup.basketsqty %]
334 <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>
344 <table id="basket_group_closed">
349 <th>Billing place</th>
350 <th>Delivery place</th>
351 <th>Number of baskets</th>
356 [% FOREACH basketgroup IN basketgroups %]
357 [% IF ( basketgroup.closed ) %]
360 [% IF ( basketgroup.name ) %]
361 [% basketgroup.name | html %]
363 Basket group no. [% basketgroup.id | html %]
366 <td>[% basketgroup.id | html %]</td>
367 <td>[% Branches.GetName( basketgroup.billingplace ) | html %]</td>
368 <td>[% IF (basketgroup.freedeliveryplace) %]Free delivery place[% ELSE %][% Branches.GetName( basketgroup.deliveryplace ) | html %][% END %]</td>
369 <td>[% basketgroup.basketsqty | html %]</td>
371 <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>
372 <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>
373 <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>
374 <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>
375 [% IF (ediaccount) %]
376 <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>
378 <div>No EDIFACT configuration for [% booksellername | html %]</div>
390 </div> <!-- /.col-sm-10.col-sm-push-2 -->
392 <div class="col-sm-2 col-sm-pull-10">
394 [% IF ( booksellerid ) %]
395 [% INCLUDE 'vendor-menu.inc' %]
397 [% INCLUDE 'acquisitions-menu.inc' %]
400 </div> <!-- /.row -->
401 [% INCLUDE 'intranet-bottom.inc' %]