Koha/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/uncertainprice.tt
Owen Leonard e86a951617 Bug 10649 - Upgrade DataTables and move scripts out of theme directory
This patch adds an upgraded copy of the DataTables plugin to the jQuery
plugin directory outside the theme directories. Copies of the old
DataTables plugin scripts have been left in the old location while
templates are incrementally updated.

To test, visit each affected page in Acquisitions and confirm that table
sorting still words correctly:

- Acquisitions home
- Acquisitions -> Late orders
- Acquisitions -> Order search
- Acquisitions -> Ordered (from table of available funds)
- Acquisitions -> Spent (from table of available funds)
- Acquisitions -> Vendor search
- Acquisitions -> Vendor detail
- Acquisitions -> Vendor -> Basket
- Acquisitions -> Vendor -> Basket -> Add order from existing record
                                   -> Add order from suggestion
                                   -> Add order from subscription
                                   -> Add order from external source
                                   -> Add order from staged file
- Acquisitions -> Vendor -> Basket groups
- Acquisitions -> Vendor -> Uncertain prices
- Acquisitions -> Vendor -> Invoices
- Acquisitions -> Vendor -> Invoices -> Invoice
- Acquisitions -> Vendor -> Receive shipments
- Acquisitions -> Vendor -> Receive shipments -> Receipt summary (click
  invoice number)

Also test one or more pages which have not been modified to confirm that
old DataTables assets are still in place and working (ex: Circulation,
Quotes editor, Saved reports, etc.)

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>

Edit: Rebased on current master

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
All tests und QA script pass. I found some smaller bugs, that
also appeared on master without the patch applied. For some datatables
I struggled with a result set of over 5.000 lines - there is room for
improvement where a lot of data can be shown.

testing notes:
    - Acquisitions home
      - Amounts don't sort correctly before and after the patch, see bug 10792.
    - Acquisitions -> Late orders
      - OK.
    - Acquisitions -> Order search
      - OK.
    - Acquisitions -> Ordered (from table of available funds)
      - OK.
    - Acquisitions -> Spent (from table of available funds)
      - OK.
    - Acquisitions -> Vendor detail
      - OK.
    - Acquisitions -> Vendor -> Basket
      - OK.
    - Acquisitions -> Vendor -> Basket -> Add order from existing record
      - Datatables seems not to be in use here?
                                       -> Add order from suggestion
      - OK.
                                       -> Add order from subscription
      - OK.
                                       -> Add order from external source
      - OK.
                                       -> Add order from staged file

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-09-05 15:43:36 +00:00

144 lines
5.7 KiB
Text

[% INCLUDE 'doc-head-open.inc' %]
<title>Koha &rsaquo; Acquisitions &rsaquo; [% IF ( booksellername ) %]Orders with uncertain prices for vendor [% booksellername %][% ELSE %]Orders with uncertain prices[% END %]</title>
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
[% INCLUDE 'doc-head-close.inc' %]
[% INCLUDE 'datatables.inc' %]
<script type="text/javascript">
//<![CDATA[
$(document).ready(function() {
var uncertainpricet = $("#uncertainpricet").dataTable($.extend(true, {}, dataTablesDefaults, {
"aoColumnDefs": [
{ "aTargets": [ -1, -2, -3 ], "bSortable": false, "bSearchable": false },
],
"sPaginationType": "four_button"
} ) );
});
var MSG_INVALIDPRICE = _("ERROR: Price is not a valid number, please check the price and try again!");
//]]>
</script>
<script type="text/javascript" src="[% themelang %]/js/acq.js"></script>
<script type="text/javascript">
//<![CDATA[
function check(form) {
form.submit();
}
//]]>
</script>
</head>
<body id="acq_uncertainprice" class="acq">
[% INCLUDE 'header.inc' %]
[% INCLUDE 'acquisitions-search.inc' %]
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> &rsaquo; [% IF ( booksellername ) %]<a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid %]">[% booksellername %]</a> &rsaquo; Uncertain prices for vendor [% booksellername %][% ELSE %]Uncertain prices[% END %]</div>
<div id="doc3" class="yui-t2">
<div id="bd">
<div id="yui-main">
<div class="yui-b">
[% INCLUDE 'acquisitions-toolbar.inc' %]
[% IF ( validate ) %]
<META HTTP-EQUIV=Refresh CONTENT="0; url=[% scriptname %]?booksellerid=[% booksellerid %]">
[% ELSE %]
[% IF ( booksellername ) %]
<h1>Orders with uncertain prices for vendor <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid %]">[% booksellername %]</a></h1>
<h2>Contact information</h2>
<p><strong>Address: </strong>
[% booksellerpostal %]
[% bookselleraddress1 %]
[% bookselleraddress2 %]
[% bookselleraddress3 %]
[% bookselleraddress4 %]
<a href="[% booksellerurl %]">[% booksellerurl %]</a>
</p>
<p><strong>Phone: </strong>
[% booksellerphone %] / Fax:
[% booksellerfax %]</p>
<dl>
<dt><strong>Contact: </strong></dt>
<dd>[% booksellercontact %]
[% booksellercontpos %]
[% booksellercontphone %]
[% booksellercontaltphone %]
[% booksellercontemail %]
[% booksellercontnotes %]
</dd>
</dl>
[% IF ( booksellernotes ) %]
<p><strong>Notes: </strong>
[% booksellernotes %]</p>
[% END %]
[% END %]
<h2>Orders with uncertain prices</h2>
<form action="[% scriptname %]" method="post" name="uncertainprices">
<input type="hidden" name="booksellerid" value="[% booksellerid %]" />
Orders from:
<select name="owner">
[% IF ( owner ) %]
<option value="0">Everyone</option>
<option value="1" selected="selected">me</option>
[% ELSE %]
<option value="0" selected="selected">Everyone</option>
<option value="1">me</option>
[% END %]
</select>
<input type="submit" value="Filter" />
</form>
<form action="[% scriptname %]" method="post" name="uncertainprices">
<input type="hidden" name="booksellerid" value="[% booksellerid %]" />
<input type="hidden" name="op" value="validate" />
<table id="uncertainpricet">
<thead>
<tr>
<th>Basket</th>
<th>Order</th>
<th>By</th>
<th>Uncertain</th>
<th>Price</th>
<th>Quantity</th>
</tr>
</thead>
<tbody>
[% FOREACH uncertainpriceorder IN uncertainpriceorders %]
<tr>
<td>
[% uncertainpriceorder.basketname %]
</td>
<td>
[% uncertainpriceorder.bibtitle %] / [% uncertainpriceorder.bibauthor %] <br /> [% uncertainpriceorder.bibpublishercode %], [% uncertainpriceorder.bibpublicationyear %]<br />[% uncertainpriceorder.bibisbn %]<br />
<a href="neworderempty.pl?ordernumber=[% uncertainpriceorder.ordernumber %]&amp;booksellerid=[% booksellerid %]&amp;basketno=[% uncertainpriceorder.basketno %]">
edit
</a>
</td>
<td>
[% uncertainpriceorder.firstname %] [% uncertainpriceorder.surname %]
</td>
<td>
<input type="checkbox" name="uncertainprice[% uncertainpriceorder.ordernumber %]" value="1" checked="checked" />
</td>
<td>
<input type="text" size="10" name="price[% uncertainpriceorder.ordernumber %]" value="[% uncertainpriceorder.listprice %]"
onchange="uncheckbox(this.form, [% uncertainpriceorder.ordernumber %]);" />
</td>
<td>
<input type="text" size="10" name="qty[% uncertainpriceorder.ordernumber %]" value="[% uncertainpriceorder.quantity %]"
onchange="uncheckbox(this.form, [% uncertainpriceorder.ordernumber %]);" />
</td>
</tr>
[% END %]
</tbody>
</table>
<fieldset class="action"><input type="button" value="Save" onclick="check(this.form)" /></fieldset>
</form>
[% END %]
</div>
</div>
<div class="yui-b">
[% INCLUDE 'vendor-menu.inc' %]
</div>
</div>
[% INCLUDE 'intranet-bottom.inc' %]