Koha/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/uncertainprice.tt
Owen Leonard 81c90ba3bf Bug 8913 [Revised] Improve acquisitions navigation
This patch adds a new menu for vendor-related pages in which
vendor related "views" can be linked to: baskets, basket groups,
contracts, invoices, uncertain prices.

The acquisitions toolbar is pared down to vendor-related actions:
New basket, contract, or vendor; edit vendor, delete vendor,
receive shipment.

Other small improvements have been made to other pages: corrections
to breadcrumbs and title tags, adding useful links betweeen pages.

Vendor menu and toolbar are added to booksellers.pl
when there is only one "search result" (i.e. a vendor id is passed).

- Menu appears when booksellerid variable is present
- Redundant heading removed
- Additional variables added to enable proper display of the toolbar

- Revision corrects broken links pointed out by QA.
- Revision adds check of existing baskets and subscriptions as a
  condition on display of the vendor delete button.

TODO: Add coverage of Basket groups page.

To test, navigate Acquisitions pages and test as many links and buttons
as you can, confirming that nothing is broken on vendor pages, invoice
pages, contract pages, uncertain price pages, etc.

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>

All tests pass - I like this very much!

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
All tests and QA script pass.

Tests done:
1) New toolbar - vendor search
  - no results = button to create new vendor shows
  - 1 result = additional new options show
  - more than one result = button to create new vendor shows

2) Vendor views
  - acq toolbar consistent with 1 result in vendor search
  - new tabs on the left
  - checked all links have the needed parameters and work correctly

3) New toolbar - different pages
  - Toolbar is formatted consistently
  - Delete vendor shows only up when it should - no baskets or
    subscriptions
  - Links work correctly

Works nicely, great groundwork for further improvements.

TODO Add new toolbar to (new) invoices page.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2013-02-20 09:17:21 -05:00

145 lines
5.8 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' %]
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.dataTables.min.js"></script>
[% INCLUDE 'datatables-strings.inc' %]
<script type="text/javascript" src="[% themelang %]/js/datatables.js"></script>
<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"
} ) );
});
//]]>
</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' %]