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 [% IF ( listclosed) %]
110 $("#basket_groups a[href='#closed']").tab("show");
112 $("#basket_groups a[href='#opened']").tab("show");
114 $("table").dataTable($.extend(true, {}, dataTablesDefaults, {
116 { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
119 "sPaginationType": "full"
125 <body id="acq_basketgroup" class="acq">
126 [% INCLUDE 'header.inc' %]
127 [% INCLUDE 'acquisitions-search.inc' %]
129 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
132 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
135 <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a>
138 [% IF ( grouping ) %]
140 <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid | uri %]">[% booksellername | html %]</a>
143 <a href="/cgi-bin/koha/acqui/basketgroup.pl?booksellerid=[% booksellerid | uri %]">Basket grouping</a>
146 <a href="#" aria-current="page">
147 Add basket group for [% booksellername | html %]
155 <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid | uri %]">[% booksellername | html %]</a>
158 <a href="#" aria-current="page">
167 <div class="main container-fluid">
169 <div class="col-sm-10 col-sm-push-2">
172 [% IF ( grouping ) %]
174 <div id="toolbar" class="btn-toolbar">
175 <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>
176 <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>
177 <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>
178 [% IF (ediaccount) %]
179 <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>
183 [% IF (name && closedbg) %]
184 <h1>Basket group [% name | html %] ([% basketgroupid | html %]) for <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid | uri %]">[% booksellername | html %]</a></h1>
186 <h1>Edit basket group [% name | html %] ([% basketgroupid | html %]) for <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid | uri %]">[% booksellername | html %]</a></h1>
188 <h1>Add basket group for <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid | uri %]">[% booksellername | html %]</a></h1>
190 <div id="basketgroupcolumns" class="row">
191 [% UNLESS (closedbg) %]
192 <div class="col-xs-6 col-xs-push-6">
193 <form action="[% scriptname | html %]" method="post" name="basketgroups" id="basketgroups">
195 <fieldset class="brief">
196 <div class="workarea_alt" >
197 <h3>Ungrouped baskets</h3>
198 <ul id="ungrouped" class="draglist_alt">
200 [% FOREACH basket IN baskets %]
201 <li class="ungrouped" id="b-[% basket.basketno | html %]" >
202 <a href="basket.pl?basketno=[% basket.basketno | uri %]">
203 [% IF ( basket.basketname ) %]
204 [% basket.basketname | html %]
206 <span>No name, basketnumber: [% basket.basketno | html %]</span>
209 Total: [% basket.total | $Price %]
210 <input type="hidden" class="basket" name="basket" value="[% basket.basketno | html %]" />
221 [% IF ( closedbg ) %]
222 <div class="col-xs-12">
224 <div class="col-xs-6 col-xs-pull-6">
226 <form action="" method="post" id="groupingform" onsubmit="return submitForm(this)">
227 <fieldset id="various" class="brief">
229 [% UNLESS (closedbg) %]
231 <label for="basketgroupname">Basket group name:</label>
232 <input type="text" name="basketgroupname" id="basketgroupname" value="[% name | html %]" class="focus" />
235 <input type="hidden" name="basketgroupname" id="basketgroupname" value="[% name | html %]" />
238 [% UNLESS (closedbg) %]
239 <label for="billingplace">Billing place:</label>
240 <select name="billingplace" id="billingplace">
241 <option value="">--</option>
242 [% PROCESS options_for_libraries libraries => Branches.all( selected => billingplace ) %]
245 <span class="label">Billing place:</span>
246 <input name="billingplace" id="billingplace" type ="hidden" value="[% billingplace | html %]" />[% Branches.GetName( billingplace ) | html %]
249 [% UNLESS (closedbg) %]
251 <label for="deliveryplace">Delivery place:</label>
252 <select name="deliveryplace" id="deliveryplace">
253 <option value="">--</option>
254 [% PROCESS options_for_libraries libraries => Branches.all( selected => deliveryplace ) %]
259 <label for="freedeliveryplace">Delivery place:</label>
260 <textarea cols="26" rows="3" name="freedeliveryplace" id="freedeliveryplace">[% freedeliveryplace | html %]</textarea>
264 <span class="label">Delivery place:</span>
265 [% IF (freedeliveryplace) %]
266 <input name="freedeliveryplace" id="freedeliveryplace" type ="hidden" value="[% freedeliveryplace | html %]" />[% freedeliveryplace | html %]
267 <input name="deliveryplace" id="deliveryplace" type ="hidden" value="" />
269 <input name="deliveryplace" id="deliveryplace" type ="hidden" value="[% deliveryplace | html %]" />[% Branches.GetName( deliveryplace ) | html %]
270 <input name="freedeliveryplace" id="freedeliveryplace" type ="hidden" value="" />
275 [% UNLESS (closedbg) %]
276 <label for="deliverycomment">Delivery comment:</label>
277 <textarea cols="26" rows="3" name="deliverycomment" id="deliverycomment">[% deliverycomment | html %]</textarea>
279 <span class="label">Delivery comment:</span>[% deliverycomment | html %]
280 <input name="deliverycomment" id="deliverycomment" type="hidden" value = "[% deliverycomment | html %]" />
284 <span class="label">Baskets in this group:</span>
285 [% UNLESS (closedbg) %]
286 <ul class="draglist" id="bg">
290 [% FOREACH selectedbasket IN selectedbaskets %]
291 <li class="grouped" id="b-[% selectedbasket.basketno | html %]" >
292 <a href="basket.pl?basketno=[% selectedbasket.basketno | uri %]">
293 [% IF ( selectedbasket.basketname ) %]
294 [% selectedbasket.basketname | html %]
296 <span>No name, basketnumber: [% selectedbasket.basketno | html %]</span>
299 Total: [% selectedbasket.total | $Price %]
300 <input type="hidden" class="basket" name="basket" value="[% selectedbasket.basketno | html %]" />
305 [% UNLESS (closedbg) %]
306 <li><label><input type="checkbox" id="closedbg" name="closedbg" />Close basket group</label></li>
308 <input type="hidden" id="closedbg" name="closedbg" value ="1"/>
312 [% UNLESS (closedbg) %]
313 <fieldset class="action"><input type="hidden" name="booksellerid" value="[% booksellerid | html %]" />
314 [% IF ( basketgroupid ) %]
315 <input type="hidden" name="basketgroupid" value="[% basketgroupid | html %]" />
317 <input type="hidden" name="op" value="attachbasket" />
318 <input type="submit" value="Save" /> <a href="/cgi-bin/koha/acqui/basketgroup.pl?booksellerid=[% booksellerid | uri %]" class="cancel">Cancel</a>
325 <div id="toolbar" class="btn-toolbar">
326 <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>
328 <h1>Basket grouping for <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid | uri %]">[% booksellername | html %]</a></h1>
329 [% IF (NoEDIMessage) %]<div><strong>No EDIFACT configuration for [% booksellername | html %]</strong></div>[% END %]
330 <div id="basket_groups" class="toptabs">
331 <ul class="nav nav-tabs" role="tablist">
332 <li role="presentation"><a href="#opened" aria-controls="opened" role="tab" data-toggle="tab">Open</a></li>
333 <li role="presentation"><a href="#closed" aria-controls="closed" role="tab" data-toggle="tab">Closed</a></li>
335 <div class="tab-content">
336 <div role="tabpanel" class="tab-pane active" id="opened">
337 <table id="basket_group_opened">
342 <th>Billing place</th>
343 <th>Delivery place</th>
344 <th>Number of baskets</th>
349 [% FOREACH basketgroup IN basketgroups %]
350 [% UNLESS ( basketgroup.closed ) %]
352 <td>[% IF ( basketgroup.name ) %]
353 [% basketgroup.name | html %]
355 <span>Basket group no. [% basketgroup.id | html %]</span>
358 <td>[% basketgroup.id | html %]</td>
359 <td>[% Branches.GetName( basketgroup.billingplace ) | html %]</td>
360 <td>[% IF (basketgroup.freedeliveryplace) %]Free delivery place[% ELSE %][% Branches.GetName( basketgroup.deliveryplace ) | html %][% END %]</td>
361 <td>[% basketgroup.basketsqty | html %]</td>
363 <input type="button" onclick="closeandprint('[% basketgroup.id | html %]');" value="Close and export as PDF" />
364 <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>
365 [% UNLESS basketgroup.basketsqty %]
366 <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>
375 <div role="tabpanel" class="tab-pane" id="closed">
376 <table id="basket_group_closed">
381 <th>Billing place</th>
382 <th>Delivery place</th>
383 <th>Number of baskets</th>
388 [% FOREACH basketgroup IN basketgroups %]
389 [% IF ( basketgroup.closed ) %]
392 [% IF ( basketgroup.name ) %]
393 [% basketgroup.name | html %]
395 <span>Basket group no. [% basketgroup.id | html %]</span>
398 <td>[% basketgroup.id | html %]</td>
399 <td>[% Branches.GetName( basketgroup.billingplace ) | html %]</td>
400 <td>[% IF (basketgroup.freedeliveryplace) %]Free delivery place[% ELSE %][% Branches.GetName( basketgroup.deliveryplace ) | html %][% END %]</td>
401 <td>[% basketgroup.basketsqty | html %]</td>
403 <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>
404 <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>
405 <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>
406 <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>
407 [% IF (ediaccount) %]
408 <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>
410 <div>No EDIFACT configuration for [% booksellername | html %]</div>
423 </div> <!-- /.col-sm-10.col-sm-push-2 -->
425 <div class="col-sm-2 col-sm-pull-10">
427 [% IF ( booksellerid ) %]
428 [% INCLUDE 'vendor-menu.inc' %]
430 [% INCLUDE 'acquisitions-menu.inc' %]
433 </div> <!-- /.row -->
434 [% INCLUDE 'intranet-bottom.inc' %]