Owen Leonard
c1dbd7bbbf
I've made changes to the basket grouping interface to bring it in line with other interfaces in Koha. I think it's better to keep things following a consistent pattern. On the page which lists basket groups: - Basket groups listed in a table instead of as custom-styled lists - Buttons use standard style - Tabs are generated by jQuery On the page for managing baskets in a group: - Markup has been revised to be more consistent with established patterns. - Corrections have been made for validity On the basket view page: - Display of data has been streamlined a little bit - An option has been added to the "Basket group" dropdown for adding a new group - Markup has been corrected for validity and consistency Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> 1) Basket group page The blue is gone and the new buttons are much better readable than before. 2) Basket grouping page Works. 3) Basket view page I like the new option to create a new group from here. Nice improvement to the workflow! I removed a spare 'td' from line 264. Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
318 lines
12 KiB
Text
318 lines
12 KiB
Text
[% INCLUDE 'doc-head-open.inc' %]
|
|
<title>Koha › Basket Grouping for [% booksellername |html %]</title>
|
|
[% INCLUDE 'doc-head-close.inc' %]
|
|
<script type="text/javascript" src="[% themelang %]/js/acq.js"></script>
|
|
[% IF ( grouping ) %]
|
|
<script type="text/javascript" src="[% yuipath %]/yahoo-dom-event/yahoo-dom-event.js"></script>
|
|
<script type="text/javascript" src="[% yuipath %]/animation/animation-min.js"></script>
|
|
<script type="text/javascript" src="[% yuipath %]/dragdrop/dragdrop-min.js"></script>
|
|
<script type="text/javascript" src="[% yuipath %]/element/element-min.js"></script>
|
|
<style type="text/css">
|
|
/*margin and padding on body element
|
|
can introduce errors in determining
|
|
element position and are not recommended;
|
|
we turn them off as a foundation for YUI
|
|
CSS treatments. */
|
|
body {
|
|
margin:0;
|
|
padding:0;
|
|
}
|
|
|
|
#ungrouped {
|
|
overflow: auto;
|
|
height: 400px;
|
|
}
|
|
|
|
.draglist{
|
|
width: 200px;
|
|
height: 300px;
|
|
overflow: auto;
|
|
}
|
|
|
|
div.workarea_alt { padding: 5px; float:left; width: 95%;}
|
|
div.closed { background-color: pink; padding:10px; float:left; width: 45%;}
|
|
|
|
ul.draglist {
|
|
position: relative;
|
|
background: #EEE;
|
|
padding-bottom:10;
|
|
border: 1px inset gray;
|
|
list-style: none;
|
|
margin:0;
|
|
padding: 5px;
|
|
}
|
|
|
|
ul.draglist li {
|
|
margin: 1px;
|
|
cursor: move;
|
|
list-style: none;
|
|
}
|
|
|
|
ul.draglist_alt {
|
|
position: relative;
|
|
border: 1px solid gray;
|
|
list-style: none;
|
|
margin: 0;
|
|
background: #f7f7f7;
|
|
padding: 5px;
|
|
cursor: move;
|
|
}
|
|
|
|
ul.draglist_alt li {
|
|
margin: 1px;
|
|
list-style: none;
|
|
}
|
|
|
|
li.grouped {
|
|
background-color: #D1E6EC;
|
|
border:1px solid #7EA6B2;
|
|
list-style: none;
|
|
}
|
|
|
|
li.ungrouped {
|
|
background-color: #D8D4E2;
|
|
border:1px solid #6B4C86;
|
|
}
|
|
|
|
fieldset.various li {
|
|
list-style: none;
|
|
clear: none;
|
|
}
|
|
|
|
</style>
|
|
[% END %]
|
|
<script type="text/javascript">
|
|
//<![CDATA[
|
|
YAHOO.util.Event.onDOMReady(DDApp.init, DDApp, true);
|
|
|
|
function submitForm(form) {
|
|
if (form.close.checked == true) {
|
|
var input = document.createElement("input");
|
|
input.setAttribute("type", "hidden");
|
|
input.setAttribute("name", "closed");
|
|
input.setAttribute("value", "1");
|
|
form.appendChild(input);
|
|
}
|
|
}
|
|
// prepare DOM for YUI Toolbar
|
|
|
|
$(document).ready(function() {
|
|
// $("#toolbar").empty();
|
|
yuiToolbar();
|
|
$("#basket_groups > ul").tabs();
|
|
});
|
|
|
|
// YUI Toolbar Functions
|
|
|
|
function yuiToolbar() {
|
|
var booksellermenu = [
|
|
{ text: _("Vendor"), url: "/cgi-bin/koha/acqui/supplier.pl?supplierid=[% booksellerid %]" },
|
|
{ text: _("Edit vendor"), url: "/cgi-bin/koha/acqui/booksellers.pl?booksellerid=[% booksellerid %]"},
|
|
]
|
|
var ordersbutton = [
|
|
{ text: _("Manage orders"), url: "/cgi-bin/koha/acqui/booksellers.pl?supplierid=[% booksellerid %]" },
|
|
{ text: _("Edit uncertain prices"), url: "/cgi-bin/koha/acqui/uncertainprice.pl?booksellerid=[% booksellerid %]&owner=1" },
|
|
]
|
|
new YAHOO.widget.Button("newbasketgroup");
|
|
new YAHOO.widget.Button({
|
|
type: "menu",
|
|
label: _("Vendor"),
|
|
name: "booksellerbutton",
|
|
menu: booksellermenu,
|
|
container: "toolbar"
|
|
});
|
|
|
|
new YAHOO.widget.Button({
|
|
type: "menu",
|
|
label: _("Orders"),
|
|
name: "ordersbutton",
|
|
menu: ordersbutton,
|
|
container: "toolbar"
|
|
});
|
|
}
|
|
//]]>
|
|
</script>
|
|
</head>
|
|
<body>
|
|
[% INCLUDE 'header.inc' %]
|
|
[% INCLUDE 'acquisitions-search.inc' %]
|
|
|
|
<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?supplierid=[% booksellerid %]">[% booksellername |html %]</a> › Basket Grouping</div>
|
|
|
|
<div id="doc" class="yui-t7">
|
|
|
|
<div class="yui-b">
|
|
<div id="toolbar">
|
|
<a href="?op=add&booksellerid=[% booksellerid %]" name="newbasketgroup" id="newbasketgroup">New Basket Group</a>
|
|
</div>
|
|
<h1>Basket Grouping for <a href="/cgi-bin/koha/acqui/supplier.pl?supplierid=[% booksellerid %]">[% booksellername |html %]</a></h1>
|
|
</div>
|
|
[% IF ( grouping ) %]
|
|
<div id="bd">
|
|
<div class="yui-g">
|
|
<div class="yui-u">
|
|
|
|
<form action="[% scriptname %]" method="post" name="basketgroups" id="basketgroups">
|
|
<div id="groups">
|
|
<fieldset class="brief">
|
|
<div class="workarea_alt" >
|
|
<h3>Ungrouped Baskets</h3>
|
|
<ul id="ungrouped" class="draglist_alt">
|
|
[% IF ( baskets ) %]
|
|
[% FOREACH basket IN baskets %]
|
|
<li class="ungrouped" id="b-[% basket.basketno %]" >
|
|
<a href="basket.pl?basketno=[% basket.basketno %]">
|
|
[% IF ( basket.basketname ) %]
|
|
[% basket.basketname %]
|
|
[% ELSE %]
|
|
No name, basketnumber: [% basket.basketno %]
|
|
[% END %]
|
|
</a>, <br />
|
|
Total: [% basket.total %]
|
|
<input type="hidden" class="basket" name="basket" value="[% basket.basketno %]" />
|
|
</li>
|
|
[% END %]
|
|
[% END %]
|
|
</ul>
|
|
</div>
|
|
</fieldset>
|
|
</div>
|
|
</form>
|
|
|
|
</div>
|
|
|
|
<div class="yui-u first">
|
|
<form action="" method="post" id="groupingform" onsubmit="return submitForm(this)">
|
|
<fieldset id="various" class="brief">
|
|
<ol>
|
|
<li><label for="basketgroupname">Basket Group Name:</label>
|
|
<input type="text" name="basketgroupname" id="basketgroupname" value="[% name %]" /></li>
|
|
<li><label for="billingplace">Billing Place:</label>
|
|
<select name="billingplace" id="billingplace" style="width:13em;">
|
|
[% FOREACH billingplaceloo IN billingplaceloop %]
|
|
[% IF ( billingplaceloo.selected ) %]<option value="[% billingplaceloo.value %]" selected="selected">[% billingplaceloo.branchname %]</option>
|
|
[% ELSE %]<option value="[% billingplaceloo.value %]">[% billingplaceloo.branchname %]</option>[% END%]
|
|
[% END %]
|
|
</select></li>
|
|
<li><label for="deliveryplace">Delivery Place:</label>
|
|
<select name="deliveryplace" id="deliveryplace" style="width:13em;">
|
|
<option value="">--</option>
|
|
[% FOREACH deliveryplaceloo IN deliveryplaceloop %]
|
|
[% IF ( deliveryplaceloo.selected ) %]<option value="[% deliveryplaceloo.value %]" selected="selected">[% deliveryplaceloo.branchname %]</option>
|
|
[% ELSE %]<option value="[% deliveryplaceloo.value %]">[% deliveryplaceloo.branchname %]</option>[% END %]
|
|
[% END %]
|
|
</select></li>
|
|
<li><p>or</p></li>
|
|
<li><label for="freedeliveryplace">Delivery Place:</label>
|
|
<textarea cols="26" rows="3" name="freedeliveryplace" id="freedeliveryplace">[% freedeliveryplace %]</textarea></li>
|
|
<li><label for="deliverycomment">Delivery comment:</label>
|
|
<textarea cols="26" rows="3" name="deliverycomment" id="deliverycomment">[% deliverycomment %]</textarea>
|
|
</li>
|
|
<li><span class="label">Baskets in this group:</span>
|
|
<ul class="draglist" id="bg">
|
|
[% FOREACH selectedbasket IN selectedbaskets %]
|
|
<li class="grouped" id="b-[% selectedbasket.basketno %]" >
|
|
<a href="basket.pl?basketno=[% selectedbasket.basketno %]">
|
|
[% IF ( selectedbasket.basketname ) %]
|
|
[% selectedbasket.basketname %]
|
|
[% ELSE %]
|
|
No name, basketnumber: [% selectedbasket.basketno %]
|
|
[% END %]
|
|
</a>, <br />
|
|
Total: [% selectedbasket.total %]
|
|
<input type="hidden" class="basket" name="basket" value="[% selectedbasket.basketno %]" />
|
|
</li>
|
|
[% END %]
|
|
</ul>
|
|
</li>
|
|
<li><label><input type="checkbox" id="close" name="close" /> Close basket group</label></li>
|
|
</ol>
|
|
</fieldset>
|
|
|
|
<fieldset class="action"><input type="hidden" name="booksellerid" value="[% booksellerid %]" />
|
|
[% IF ( basketgroupid ) %]
|
|
<input type="hidden" name="basketgroupid" value="[% basketgroupid %]" />
|
|
[% END %]
|
|
<input type="hidden" name="op" value="attachbasket" />
|
|
<input type="submit" value="Save" />
|
|
</fieldset>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
[% ELSE %]
|
|
<div class="yui-g">
|
|
<div id="basket_groups" class="toptabs">
|
|
<ul class="ui-tabs-nav">
|
|
[% UNLESS ( closed ) %]<li class="ui-tabs-selected"><a href="#opened">Open</a></li>
|
|
[% ELSE%]<li><a href="#opened">Open</a></li>[% END %]
|
|
[% IF ( closed ) %]<li class="ui-tabs-selected"><a href="#closed">Closed</a></li>
|
|
[% ELSE %]<li><a href="#closed">Closed</a></li>[% END %]
|
|
</ul>
|
|
<div id="opened">
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Basket Group</th><th colspan="3">Action</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
[% FOREACH basketgroup IN basketgroups %]
|
|
[% UNLESS ( basketgroup.closed ) %]
|
|
<tr>
|
|
<td><a href="/cgi-bin/koha/acqui/basketgroup.pl?op=add&booksellerid=[% basketgroup.booksellerid %]&basketgroupid=[% basketgroup.id %]">[% IF ( basketgroup.name ) %]
|
|
[% basketgroup.name %]
|
|
[% ELSE %]
|
|
Basket group no. [% basketgroup.id %]
|
|
[% END %]</a>
|
|
</td>
|
|
<td>
|
|
<input type="button" onclick="closeandprint([% basketgroup.id %])" value="Close and Print" />
|
|
</td>
|
|
<td>
|
|
<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>
|
|
</td>
|
|
<td>
|
|
<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>
|
|
</td>
|
|
</tr>
|
|
[% END %]
|
|
[% END %]
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<div id="closed">
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Basket Group</th><th colspan="3">Action</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
[% FOREACH basketgroup IN basketgroups %]
|
|
[% IF ( basketgroup.closed ) %]
|
|
<tr>
|
|
<td>
|
|
<a href="/cgi-bin/koha/acqui/basketgroup.pl?op=reopen&booksellerid=[% basketgroup.booksellerid %]&basketgroupid[% basketgroup.id %]">[% IF ( basketgroup.name ) %]
|
|
[% basketgroup.name %]
|
|
[% ELSE %]
|
|
Basket group no. [% basketgroup.id %]
|
|
[% END %]</a>
|
|
</td>
|
|
<td>
|
|
<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>
|
|
</td>
|
|
<td>
|
|
<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>
|
|
</td>
|
|
</tr>
|
|
[% END %]
|
|
[% END %]
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
[% END %]
|
|
|
|
[% INCLUDE 'intranet-bottom.inc' %]
|