Koha/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/uncertainprice.tt
Owen Leonard 609f2f1fc7 Bug 19755: Move template JavaScript to the footer: Acquisitions, part 3
This patch modifies even more staff client acquisitions templates so
that JavaScript is included in the footer instead of the header.

To test, apply the patch and test the JavaScript-driven features of the
modified templates: All button controls, DataTables functionality, tabs,
etc.

- Acquisitions -> Vendor -> Vendor details
  - Contracts datatable
  - Edit vendor
    - Add contacts, form validation
- Acquisitions -> Vendor -> Invoices -> Invoice -> "Go to receipt"
  - Datatables, MARC and Card previews
    - Transfer
      - Confirmation of transfer, window closes
- Acquisitions -> Vendor -> Receive shipments
  - Datatables, date pickers
- Acquisitions -> Available funds table -> Spent report
  - Datatables
- Acquisitions -> Vendor -> Uncertain prices
  - Datatables, form validation
- Acquisitions -> Vendor -> Basket -> Add to basket from external source
  - Select and clear all on search form
  - Search results
    - Datatables, MARC and Card previews, in-table pop-up controls
      (click any table cell)

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2018-02-15 13:30:23 -03:00

162 lines
7.1 KiB
Text

[% USE Koha %]
[% SET footerjs = 1 %]
[% 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="[% interface %]/[% theme %]/css/datatables_[% KOHA_VERSION %].css" />
[% INCLUDE 'doc-head-close.inc' %]
</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 ) %]
[% SET metacontent = '0; url=' _ scriptname _ '?booksellerid=' _ booksellerid %]
<META HTTP-EQUIV=Refresh CONTENT="[% metacontent %]">
[% 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>
[% FOREACH contact IN contacts %]
<dt><strong>Contact: </strong></dt>
<dd>[% contact.name %]
[% contact.position %]
[% contact.phone %]
[% contact.altphone %]
[% contact.email %]
[% contact.notes %]
</dd>
[% END %]
</dl>
[% IF ( booksellernotes ) %]
<p><strong>Notes: </strong>
[% booksellernotes %]</p>
[% END %]
[% END %]
<h2>Orders with uncertain prices</h2>
<form action="[% scriptname %]" method="post">
<input type="hidden" name="booksellerid" value="[% booksellerid %]" />
<label for="owner">Orders from:</label>
<select id="owner" 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" id="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>
<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% uncertainpriceorder.biblionumber %]">[% uncertainpriceorder.title |html %]</a>
[% IF ( uncertainpriceorder.author ) %] <em>by</em> [% uncertainpriceorder.author %][% END %]
[% IF ( uncertainpriceorder.publishercode ) %]
<br /><em>Publisher:</em> [% uncertainpriceorder.publishercode %]
[%- IF ( uncertainpriceorder.publicationyear ) -%], [% uncertainpriceorder.publicationyear %]
[%- ELSIF ( uncertainpriceorder.copyrightdate ) -%] [% uncertainpriceorder.copyrightdate %]
[% END %]
[% END %]
[% IF ( uncertainpriceorder.isbn ) %]<br />[% uncertainpriceorder.isbn %][% END %]
<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 class="check_uncertain" data-ordernumber="[% uncertainpriceorder.ordernumber %]" type="text" size="10" name="price[% uncertainpriceorder.ordernumber %]" value="[% uncertainpriceorder.listprice %]" />
</td>
<td>
[% IF basket.effective_create_items == 'ordering' %]
[% uncertainpriceorder.quantity %]
<input type="hidden" name="qty[% uncertainpriceorder.ordernumber %]" value="[% uncertainpriceorder.quantity %]" />
[% ELSE %]
<input class="check_uncertain" data-ordernumber="[% uncertainpriceorder.ordernumber %]" type="text" size="10" name="qty[% uncertainpriceorder.ordernumber %]" value="[% uncertainpriceorder.quantity %]" />
[% END %]
</td>
</tr>
[% END %]
</tbody>
</table>
<fieldset class="action"><input type="submit" value="Save" /></fieldset>
</form>
[% END %]
</div>
</div>
<div class="yui-b">
[% INCLUDE 'vendor-menu.inc' %]
</div>
</div>
[% MACRO jsinclude BLOCK %]
<script type="text/javascript" src="[% interface %]/[% theme %]/js/acquisitions-menu_[% KOHA_VERSION %].js"></script>
[% INCLUDE 'datatables.inc' %]
<script type="text/javascript">
$(document).ready(function() {
var uncertainpricet = $("#uncertainpricet").dataTable($.extend(true, {}, dataTablesDefaults, {
"aoColumnDefs": [
{ "aTargets": [ -1, -2, -3 ], "bSortable": false, "bSearchable": false },
],
"sPaginationType": "four_button"
}));
$(".check_uncertain").on("change",function(){
var form = document.getElementById("uncertainprices");
var ordernumber = $(this).data("ordernumber");
uncheckbox( form, ordernumber );
});
});
var MSG_INVALIDPRICE = _("ERROR: Price is not a valid number, please check the price and try again!");
</script>
<script type="text/javascript" src="[% interface %]/[% theme %]/js/acq_[% KOHA_VERSION %].js"></script>
[% END %]
[% INCLUDE 'intranet-bottom.inc' %]