1 [% INCLUDE 'doc-head-open.inc' %]
2 <title>Koha › Basket grouping for [% booksellername |html %]</title>
3 <link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
4 [% INCLUDE 'doc-head-close.inc' %]
5 <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.dataTables.min.js"></script>
6 <script type="text/javascript" src="[% themelang %]/js/datatables.js"></script>
7 <script type="text/javascript" src="[% themelang %]/js/acq.js"></script>
9 <script type="text/javascript" src="[% yuipath %]/yahoo-dom-event/yahoo-dom-event.js"></script>
10 <script type="text/javascript" src="[% yuipath %]/animation/animation-min.js"></script>
11 <script type="text/javascript" src="[% yuipath %]/dragdrop/dragdrop-min.js"></script>
12 <script type="text/javascript" src="[% yuipath %]/element/element-min.js"></script>
13 <style type="text/css">
14 /*margin and padding on body element
15 can introduce errors in determining
16 element position and are not recommended;
17 we turn them off as a foundation for YUI
35 div.workarea_alt { padding: 5px; float:left; width: 95%;}
36 div.closed { background-color: pink; padding:10px; float:left; width: 45%;}
42 border: 1px inset gray;
56 border: 1px solid gray;
70 background-color: #D1E6EC;
71 border:1px solid #7EA6B2;
76 background-color: #D8D4E2;
77 border:1px solid #6B4C86;
87 <script type="text/javascript">
89 YAHOO.util.Event.onDOMReady(DDApp.init, DDApp, true);
91 function submitForm(form) {
92 if (form.close.checked == true) {
93 var input = document.createElement("input");
94 input.setAttribute("type", "hidden");
95 input.setAttribute("name", "closed");
96 input.setAttribute("value", "1");
97 form.appendChild(input);
100 // prepare DOM for YUI Toolbar
102 $(document).ready(function() {
103 // $("#toolbar").empty();
105 $("#basket_groups").tabs();
107 $("table").dataTable($.extend(true, {}, dataTablesDefaults, {
109 { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
119 // YUI Toolbar Functions
121 function yuiToolbar() {
122 var booksellermenu = [
123 { text: _("Vendor"), url: "/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid %]" },
124 { text: _("Edit vendor"), url: "/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid %]&op=enter"},
127 { text: _("Manage orders"), url: "/cgi-bin/koha/acqui/booksellers.pl?booksellerid=[% booksellerid %]" },
128 { text: _("Edit uncertain prices"), url: "/cgi-bin/koha/acqui/uncertainprice.pl?booksellerid=[% booksellerid %]&owner=1" },
130 new YAHOO.widget.Button("newbasketgroup");
131 new YAHOO.widget.Button({
134 name: "booksellerbutton",
135 menu: booksellermenu,
139 new YAHOO.widget.Button({
142 name: "ordersbutton",
150 <body id="acq_basketgroup" class="acq">
151 [% INCLUDE 'header.inc' %]
152 [% INCLUDE 'acquisitions-search.inc' %]
154 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> › <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid %]">[% booksellername |html %]</a> › Basket grouping</div>
156 <div id="doc" class="yui-t7">
160 <a href="?op=add&booksellerid=[% booksellerid %]" name="newbasketgroup" id="newbasketgroup">New basket group</a>
162 <h1>Basket grouping for <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid %]">[% booksellername |html %]</a></h1>
164 [% IF ( grouping ) %]
169 <form action="[% scriptname %]" method="post" name="basketgroups" id="basketgroups">
171 <fieldset class="brief">
172 <div class="workarea_alt" >
173 <h3>Ungrouped baskets</h3>
174 <ul id="ungrouped" class="draglist_alt">
176 [% FOREACH basket IN baskets %]
177 <li class="ungrouped" id="b-[% basket.basketno %]" >
178 <a href="basket.pl?basketno=[% basket.basketno %]">
179 [% IF ( basket.basketname ) %]
180 [% basket.basketname %]
182 No name, basketnumber: [% basket.basketno %]
185 Total: [% basket.total %]
186 <input type="hidden" class="basket" name="basket" value="[% basket.basketno %]" />
198 <div class="yui-u first">
199 <form action="" method="post" id="groupingform" onsubmit="return submitForm(this)">
200 <fieldset id="various" class="brief">
202 <li><label for="basketgroupname">Basket group name:</label>
203 <input type="text" name="basketgroupname" id="basketgroupname" value="[% name %]" /></li>
204 <li><label for="billingplace">Billing place:</label>
205 <select name="billingplace" id="billingplace" style="width:13em;">
206 [% FOREACH billingplaceloo IN billingplaceloop %]
207 [% IF ( billingplaceloo.selected ) %]<option value="[% billingplaceloo.value %]" selected="selected">[% billingplaceloo.branchname %]</option>
208 [% ELSE %]<option value="[% billingplaceloo.value %]">[% billingplaceloo.branchname %]</option>[% END%]
211 <li><label for="deliveryplace">Delivery place:</label>
212 <select name="deliveryplace" id="deliveryplace" style="width:13em;">
213 <option value="">--</option>
214 [% FOREACH deliveryplaceloo IN deliveryplaceloop %]
215 [% IF ( deliveryplaceloo.selected ) %]<option value="[% deliveryplaceloo.value %]" selected="selected">[% deliveryplaceloo.branchname %]</option>
216 [% ELSE %]<option value="[% deliveryplaceloo.value %]">[% deliveryplaceloo.branchname %]</option>[% END %]
220 <li><label for="freedeliveryplace">Delivery place:</label>
221 <textarea cols="26" rows="3" name="freedeliveryplace" id="freedeliveryplace">[% freedeliveryplace %]</textarea></li>
222 <li><label for="deliverycomment">Delivery comment:</label>
223 <textarea cols="26" rows="3" name="deliverycomment" id="deliverycomment">[% deliverycomment %]</textarea>
225 <li><span class="label">Baskets in this group:</span>
226 <ul class="draglist" id="bg">
227 [% FOREACH selectedbasket IN selectedbaskets %]
228 <li class="grouped" id="b-[% selectedbasket.basketno %]" >
229 <a href="basket.pl?basketno=[% selectedbasket.basketno %]">
230 [% IF ( selectedbasket.basketname ) %]
231 [% selectedbasket.basketname %]
233 No name, basketnumber: [% selectedbasket.basketno %]
236 Total: [% selectedbasket.total %]
237 <input type="hidden" class="basket" name="basket" value="[% selectedbasket.basketno %]" />
242 <li><label><input type="checkbox" id="close" name="close" /> Close basket group</label></li>
246 <fieldset class="action"><input type="hidden" name="booksellerid" value="[% booksellerid %]" />
247 [% IF ( basketgroupid ) %]
248 <input type="hidden" name="basketgroupid" value="[% basketgroupid %]" />
250 <input type="hidden" name="op" value="attachbasket" />
251 <input type="submit" value="Save" />
259 <div id="basket_groups" class="toptabs">
260 <ul class="ui-tabs-nav">
261 [% UNLESS ( closed ) %]<li class="ui-tabs-selected"><a href="#opened">Open</a></li>
262 [% ELSE%]<li><a href="#opened">Open</a></li>[% END %]
263 [% IF ( closed ) %]<li class="ui-tabs-selected"><a href="#closed">Closed</a></li>
264 [% ELSE %]<li><a href="#closed">Closed</a></li>[% END %]
267 <table id="basket_group_opened">
270 <th>Basket group</th><th>Action</th>
274 [% FOREACH basketgroup IN basketgroups %]
275 [% UNLESS ( basketgroup.closed ) %]
277 <td><a href="/cgi-bin/koha/acqui/basketgroup.pl?op=add&booksellerid=[% basketgroup.booksellerid %]&basketgroupid=[% basketgroup.id %]">[% IF ( basketgroup.name ) %]
278 [% basketgroup.name %]
280 Basket group no. [% basketgroup.id %]
285 <input type="button" onclick="closeandprint([% basketgroup.id %])" value="Close and Print" />
286 <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 %]" /><input type="hidden" name="basketgroupid" value="[% basketgroup.id %]" /><input type="submit" value="Edit" /></form>
287 <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 %]" /><input type="hidden" name="basketgroupid" value="[% basketgroup.id %]" /><input type="submit" value="Delete" /></form>
297 <table id="basket_group_closed">
300 <th>Basket group</th><th>Action</th>
304 [% FOREACH basketgroup IN basketgroups %]
305 [% IF ( basketgroup.closed ) %]
308 <a href="/cgi-bin/koha/acqui/basketgroup.pl?op=reopen&booksellerid=[% basketgroup.booksellerid %]&basketgroupid=[% basketgroup.id %]">[% IF ( basketgroup.name ) %]
309 [% basketgroup.name %]
311 Basket group no. [% basketgroup.id %]
315 <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 %]" /><input type="hidden" name="basketgroupid" value="[% basketgroup.id %]" /><input type="submit" value="Reopen" /></form>
316 <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 %]" /><input type="submit" value="Print" /></form>
317 <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 %]" /><input type="submit" value="Export as CSV" /></form>
329 [% INCLUDE 'intranet-bottom.inc' %]